Browse Source

fixed bug per #70

css_transitions
Alex de Mulder 10 years ago
parent
commit
f3f718565b
4 changed files with 11 additions and 8 deletions
  1. +3
    -2
      dist/vis.js
  2. +6
    -5
      examples/graph/25_physics_configuration.html
  3. +1
    -0
      src/graph/Graph.js
  4. +1
    -1
      src/graph/Node.js

+ 3
- 2
dist/vis.js View File

@ -5,7 +5,7 @@
* A dynamic, browser-based visualization library. * A dynamic, browser-based visualization library.
* *
* @version 0.8.0-SNAPSHOT * @version 0.8.0-SNAPSHOT
* @date 2014-03-19
* @date 2014-03-21
* *
* @license * @license
* Copyright (C) 2011-2014 Almende B.V, http://almende.com * Copyright (C) 2011-2014 Almende B.V, http://almende.com
@ -9593,7 +9593,7 @@ Node.prototype.setProperties = function(properties, constants) {
if (properties.fontSize !== undefined) {this.fontSize = properties.fontSize;} if (properties.fontSize !== undefined) {this.fontSize = properties.fontSize;}
if (properties.fontFace !== undefined) {this.fontFace = properties.fontFace;} if (properties.fontFace !== undefined) {this.fontFace = properties.fontFace;}
if (this.image !== undefined) {
if (this.image !== undefined && this.image != "") {
if (this.imagelist) { if (this.imagelist) {
this.imageObj = this.imagelist.load(this.image); this.imageObj = this.imagelist.load(this.image);
} }
@ -17922,6 +17922,7 @@ Graph.prototype._createBezierNodes = function() {
{id:nodeId, {id:nodeId,
mass:1, mass:1,
shape:'circle', shape:'circle',
image:"",
internalMultiplier:1 internalMultiplier:1
},{},{},this.constants); },{},{},this.constants);
edge.via = this.sectors['support']['nodes'][nodeId]; edge.via = this.sectors['support']['nodes'][nodeId];

+ 6
- 5
examples/graph/25_physics_configuration.html View File

@ -77,11 +77,12 @@
}; };
var options = { var options = {
edges: {
},
stabilize: false,
configurePhysics:true
};
smoothCurves:true,
nodes: {
shape: 'image',
image: 'http://png-4.findicons.com/files/icons/1508/sketchcons_x/128/smiley.png'
},
};
graph = new vis.Graph(container, data, options); graph = new vis.Graph(container, data, options);
// add event listeners // add event listeners

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

@ -1922,6 +1922,7 @@ Graph.prototype._createBezierNodes = function() {
{id:nodeId, {id:nodeId,
mass:1, mass:1,
shape:'circle', shape:'circle',
image:"",
internalMultiplier:1 internalMultiplier:1
},{},{},this.constants); },{},{},this.constants);
edge.via = this.sectors['support']['nodes'][nodeId]; edge.via = this.sectors['support']['nodes'][nodeId];

+ 1
- 1
src/graph/Node.js View File

@ -182,7 +182,7 @@ Node.prototype.setProperties = function(properties, constants) {
if (properties.fontSize !== undefined) {this.fontSize = properties.fontSize;} if (properties.fontSize !== undefined) {this.fontSize = properties.fontSize;}
if (properties.fontFace !== undefined) {this.fontFace = properties.fontFace;} if (properties.fontFace !== undefined) {this.fontFace = properties.fontFace;}
if (this.image !== undefined) {
if (this.image !== undefined && this.image != "") {
if (this.imagelist) { if (this.imagelist) {
this.imageObj = this.imagelist.load(this.image); this.imageObj = this.imagelist.load(this.image);
} }

Loading…
Cancel
Save