From f4e4d2dc8e4245c496b76742e3868dae2e6a5900 Mon Sep 17 00:00:00 2001 From: Alex de Mulder Date: Tue, 15 Apr 2014 11:33:22 +0200 Subject: [PATCH] fixed color bug and fontsize bug from merge --- dist/vis.js | 3 ++- src/graph/Graph.js | 1 + src/graph/Popup.js | 2 +- 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/dist/vis.js b/dist/vis.js index 713bcb49..995c6568 100644 --- a/dist/vis.js +++ b/dist/vis.js @@ -11262,7 +11262,7 @@ function Popup(container, x, y, text, style) { styleAttr.visibility = "hidden"; styleAttr.border = "1px solid " + style.color.border; styleAttr.color = style.fontColor; - styleAttr.fontSize = style.fontSize; + styleAttr.fontSize = style.fontSize + "px"; styleAttr.fontFamily = style.fontFace; styleAttr.padding = this.padding + "px"; styleAttr.backgroundColor = style.color.background; @@ -16677,6 +16677,7 @@ Graph.prototype.setOptions = function (options) { if (options.edges.color !== undefined) { if (util.isString(options.edges.color)) { + this.constants.edges.color = {}; this.constants.edges.color.color = options.edges.color; this.constants.edges.color.highlight = options.edges.color; } diff --git a/src/graph/Graph.js b/src/graph/Graph.js index 08d4d286..dd85955b 100644 --- a/src/graph/Graph.js +++ b/src/graph/Graph.js @@ -629,6 +629,7 @@ Graph.prototype.setOptions = function (options) { if (options.edges.color !== undefined) { if (util.isString(options.edges.color)) { + this.constants.edges.color = {}; this.constants.edges.color.color = options.edges.color; this.constants.edges.color.highlight = options.edges.color; } diff --git a/src/graph/Popup.js b/src/graph/Popup.js index d288219a..d9397f5e 100644 --- a/src/graph/Popup.js +++ b/src/graph/Popup.js @@ -55,7 +55,7 @@ function Popup(container, x, y, text, style) { styleAttr.visibility = "hidden"; styleAttr.border = "1px solid " + style.color.border; styleAttr.color = style.fontColor; - styleAttr.fontSize = style.fontSize; + styleAttr.fontSize = style.fontSize + "px"; styleAttr.fontFamily = style.fontFace; styleAttr.padding = this.padding + "px"; styleAttr.backgroundColor = style.color.background;