Browse Source

fixed typo #467, removed old, unused options from network

v3_develop
Alex de Mulder 10 years ago
parent
commit
782e3f3468
2 changed files with 5 additions and 5 deletions
  1. +3
    -3
      lib/network/Network.js
  2. +2
    -2
      lib/timeline/Range.js

+ 3
- 3
lib/network/Network.js View File

@ -187,7 +187,6 @@ function Network (container, data, options) {
type: "continuous", type: "continuous",
roundness: 0.5 roundness: 0.5
}, },
dynamicSmoothCurves: true,
maxVelocity: 30, maxVelocity: 30,
minVelocity: 0.1, // px/s minVelocity: 0.1, // px/s
stabilize: true, // stabilize before displaying the network stabilize: true, // stabilize before displaying the network
@ -569,9 +568,10 @@ Network.prototype.setOptions = function (options) {
if (options) { if (options) {
var prop; var prop;
var fields = ['nodes','edges','smoothCurves','hierarchicalLayout','clustering','navigation','keyboard','dataManipulation',
'onAdd','onEdit','onEditEdge','onConnect','onDelete','clickToUse'
var fields = ['nodes','edges','smoothCurves','hierarchicalLayout','clustering','navigation',
'keyboard','dataManipulation','onAdd','onEdit','onEditEdge','onConnect','onDelete','clickToUse'
]; ];
// extend all but the values in fields
util.selectiveNotDeepExtend(fields,this.constants, options); util.selectiveNotDeepExtend(fields,this.constants, options);
util.selectiveNotDeepExtend(['color'],this.constants.nodes, options.nodes); util.selectiveNotDeepExtend(['color'],this.constants.nodes, options.nodes);
util.selectiveNotDeepExtend(['color','length'],this.constants.edges, options.edges); util.selectiveNotDeepExtend(['color','length'],this.constants.edges, options.edges);

+ 2
- 2
lib/timeline/Range.js View File

@ -285,8 +285,8 @@ Range.prototype._applyRange = function(start, end) {
var changed = (this.start != newStart || this.end != newEnd); var changed = (this.start != newStart || this.end != newEnd);
// if the new range does NOT overlap with the old range, emit checkRangedItems to avoid not showing ranged items (ranged meaning has end time, not neccesarily of type Range) // if the new range does NOT overlap with the old range, emit checkRangedItems to avoid not showing ranged items (ranged meaning has end time, not neccesarily of type Range)
if (!((newStart >= this.start && newStart <= this.start) || (newEnd >= this.start && newEnd <= this.end)) &&
!((this.start >= newStart && this.start <= newEnd) || (this.end >= newStart && this.end <= newEnd) )) {
if (!((newStart >= this.start && newStart <= this.end) || (newEnd >= this.start && newEnd <= this.end)) &&
!((this.start >= newStart && this.start <= newEnd) || (this.end >= newStart && this.end <= newEnd) )) {
this.body.emitter.emit('checkRangedItems'); this.body.emitter.emit('checkRangedItems');
} }

Loading…
Cancel
Save