Browse Source

fixed label color bug per #54

css_transitions
Alex de Mulder 10 years ago
parent
commit
f5523085cb
3 changed files with 10 additions and 2 deletions
  1. +5
    -1
      dist/vis.js
  2. +1
    -0
      src/graph/Edge.js
  3. +4
    -1
      src/graph/Graph.js

+ 5
- 1
dist/vis.js View File

@ -10494,6 +10494,7 @@ Edge.prototype.setProperties = function(properties, constants) {
this.fontSize = constants.edges.fontSize;
this.fontFace = constants.edges.fontFace;
this.fontColor = constants.edges.fontColor;
if (properties.fontColor !== undefined) {this.fontColor = properties.fontColor;}
if (properties.fontSize !== undefined) {this.fontSize = properties.fontSize;}
if (properties.fontFace !== undefined) {this.fontFace = properties.fontFace;}
@ -16389,7 +16390,10 @@ Graph.prototype.setOptions = function (options) {
}
if (!options.edges.fontColor) {
this.constants.edges.fontColor = options.edges.color;
if (options.edges.color !== undefined) {
if (util.isString(options.edges.color)) {this.constants.edges.fontColor = options.edges.color;}
else if (options.edges.color.color !== undefined) {this.constants.edges.fontColor = options.edges.color.color;}
}
}
// Added to support dashed lines

+ 1
- 0
src/graph/Edge.js View File

@ -81,6 +81,7 @@ Edge.prototype.setProperties = function(properties, constants) {
this.fontSize = constants.edges.fontSize;
this.fontFace = constants.edges.fontFace;
this.fontColor = constants.edges.fontColor;
if (properties.fontColor !== undefined) {this.fontColor = properties.fontColor;}
if (properties.fontSize !== undefined) {this.fontSize = properties.fontSize;}
if (properties.fontFace !== undefined) {this.fontFace = properties.fontFace;}

+ 4
- 1
src/graph/Graph.js View File

@ -594,7 +594,10 @@ Graph.prototype.setOptions = function (options) {
}
if (!options.edges.fontColor) {
this.constants.edges.fontColor = options.edges.color;
if (options.edges.color !== undefined) {
if (util.isString(options.edges.color)) {this.constants.edges.fontColor = options.edges.color;}
else if (options.edges.color.color !== undefined) {this.constants.edges.fontColor = options.edges.color.color;}
}
}
// Added to support dashed lines

Loading…
Cancel
Save