Browse Source

minor bugfixes for git issues #157 #158 #159

css_transitions
Alex de Mulder 10 years ago
parent
commit
f998388c84
5 changed files with 29 additions and 19 deletions
  1. +8
    -0
      HISTORY.md
  2. +11
    -9
      dist/vis.js
  3. +6
    -6
      dist/vis.min.js
  4. +3
    -3
      src/graph/Graph.js
  5. +1
    -1
      src/graph/Node.js

+ 8
- 0
HISTORY.md View File

@ -2,6 +2,14 @@
http://visjs.org
## 2014-06-06, version 1.1.1
### Graph
- reduced the timestep a little for smoother animations.
- fixed dataManipulation.initiallyVisible functionality (thanks theGrue).
- forced typecast of fontSize to Number.
## 2014-06-06, version 1.1.0
### Timeline

+ 11
- 9
dist/vis.js View File

@ -5,7 +5,7 @@
* A dynamic, browser-based visualization library.
*
* @version 1.1.0
* @date 2014-06-06
* @date 2014-06-10
*
* @license
* Copyright (C) 2011-2014 Almende B.V, http://almende.com
@ -9083,7 +9083,7 @@ function Node(properties, imagelist, grouplist, constants) {
this.reroutedEdges = {};
this.group = constants.nodes.group;
this.fontSize = constants.nodes.fontSize;
this.fontSize = Number(constants.nodes.fontSize);
this.fontFace = constants.nodes.fontFace;
this.fontColor = constants.nodes.fontColor;
this.fontDrawThreshold = 3;
@ -15795,7 +15795,7 @@ function Graph (container, data, options) {
this.renderTimestep = 1000 / this.renderRefreshRate; // ms -- saves calculation later on
this.renderTime = 0.5 * this.renderTimestep; // measured time it takes to render a frame
this.maxPhysicsTicksPerRender = 3; // max amount of physics ticks per render step.
this.physicsDiscreteStepsize = 0.65; // discrete stepsize of the simulation
this.physicsDiscreteStepsize = 0.50; // discrete stepsize of the simulation
this.stabilize = true; // stabilize before displaying the graph
this.selectable = true;
@ -15958,12 +15958,13 @@ function Graph (container, data, options) {
background: '#FFFFC6'
}
},
moveable: true,
dragGraph: true,
dragNodes: true,
zoomable: true,
hover: false
};
this.hoverObj = {nodes:{},edges:{}};
this.editMode = this.constants.dataManipulation.initiallyVisible;
// Node variables
var graph = this;
@ -15997,7 +15998,6 @@ function Graph (container, data, options) {
this._setScale(1);
this.setOptions(options);
// other vars
this.freezeSimulation = false;// freeze the simulation
this.cachedFunctions = {};
@ -16301,7 +16301,8 @@ Graph.prototype.setOptions = function (options) {
if (options.freezeForStabilization !== undefined) {this.constants.freezeForStabilization = options.freezeForStabilization;}
if (options.configurePhysics !== undefined){this.constants.configurePhysics = options.configurePhysics;}
if (options.stabilizationIterations !== undefined) {this.constants.stabilizationIterations = options.stabilizationIterations;}
if (options.moveable !== undefined) {this.constants.moveable = options.moveable;}
if (options.dragGraph !== undefined) {this.constants.dragGraph = options.dragGraph;}
if (options.dragNodes !== undefined) {this.constants.dragNodes = options.dragNodes;}
if (options.zoomable !== undefined) {this.constants.zoomable = options.zoomable;}
if (options.hover !== undefined) {this.constants.hover = options.hover;}
@ -16415,6 +16416,7 @@ Graph.prototype.setOptions = function (options) {
this.constants.dataManipulation[prop] = options.dataManipulation[prop];
}
}
this.editMode = this.constants.dataManipulation.initiallyVisible;
}
else if (options.dataManipulation !== undefined) {
this.constants.dataManipulation.enabled = false;
@ -16728,7 +16730,7 @@ Graph.prototype._handleOnDrag = function(event) {
var me = this,
drag = this.drag,
selection = drag.selection;
if (selection && selection.length) {
if (selection && selection.length && this.constants.dragNodes == true) {
// calculate delta's and new location
var deltaX = pointer.x - drag.pointer.x,
deltaY = pointer.y - drag.pointer.y;
@ -16753,7 +16755,7 @@ Graph.prototype._handleOnDrag = function(event) {
}
}
else {
if (this.constants.moveable == true) {
if (this.constants.dragGraph == true) {
// move the graph
var diffX = pointer.x - this.drag.pointer.x;
var diffY = pointer.y - this.drag.pointer.y;

+ 6
- 6
dist/vis.min.js
File diff suppressed because it is too large
View File


+ 3
- 3
src/graph/Graph.js View File

@ -23,7 +23,7 @@ function Graph (container, data, options) {
this.renderTimestep = 1000 / this.renderRefreshRate; // ms -- saves calculation later on
this.renderTime = 0.5 * this.renderTimestep; // measured time it takes to render a frame
this.maxPhysicsTicksPerRender = 3; // max amount of physics ticks per render step.
this.physicsDiscreteStepsize = 0.65; // discrete stepsize of the simulation
this.physicsDiscreteStepsize = 0.50; // discrete stepsize of the simulation
this.stabilize = true; // stabilize before displaying the graph
this.selectable = true;
@ -192,7 +192,7 @@ function Graph (container, data, options) {
hover: false
};
this.hoverObj = {nodes:{},edges:{}};
this.editMode = this.constants.dataManipulation.initiallyVisible;
// Node variables
var graph = this;
@ -226,7 +226,6 @@ function Graph (container, data, options) {
this._setScale(1);
this.setOptions(options);
// other vars
this.freezeSimulation = false;// freeze the simulation
this.cachedFunctions = {};
@ -645,6 +644,7 @@ Graph.prototype.setOptions = function (options) {
this.constants.dataManipulation[prop] = options.dataManipulation[prop];
}
}
this.editMode = this.constants.dataManipulation.initiallyVisible;
}
else if (options.dataManipulation !== undefined) {
this.constants.dataManipulation.enabled = false;

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

@ -32,7 +32,7 @@ function Node(properties, imagelist, grouplist, constants) {
this.reroutedEdges = {};
this.group = constants.nodes.group;
this.fontSize = constants.nodes.fontSize;
this.fontSize = Number(constants.nodes.fontSize);
this.fontFace = constants.nodes.fontFace;
this.fontColor = constants.nodes.fontColor;
this.fontDrawThreshold = 3;

Loading…
Cancel
Save