Browse Source

Merge branch 'develop' of https://github.com/almende/vis into develop

revert-3409-performance
Yotam Berkowitz 7 years ago
parent
commit
001fd9f960
6 changed files with 15 additions and 7 deletions
  1. +2
    -1
      .babelrc
  2. +5
    -0
      .travis.yml
  3. +1
    -1
      lib/network/modules/InteractionHandler.js
  4. +2
    -2
      lib/network/modules/SelectionHandler.js
  5. +2
    -3
      lib/timeline/component/TimeAxis.js
  6. +3
    -0
      package.json

+ 2
- 1
.babelrc View File

@ -2,6 +2,7 @@
"presets": ["es2015"],
"plugins": [
"transform-es3-property-literals",
"transform-es3-member-expression-literals"
"transform-es3-member-expression-literals",
"transform-runtime"
]
}

+ 5
- 0
.travis.yml View File

@ -0,0 +1,5 @@
language: node_js
node_js: "6"
before_script:
- npm install -g gulp
script: gulp

+ 1
- 1
lib/network/modules/InteractionHandler.js View File

@ -694,7 +694,7 @@ class InteractionHandler {
// we initially only check stillOnObj because this is much faster.
if (stillOnObj === true) {
let overNode = this.selectionHandler.getNodeAt(pointer);
stillOnObj = overNode.id === this.popup.popupTargetId;
stillOnObj = overNode === undefined ? false : overNode.id === this.popup.popupTargetId;
}
}
}

+ 2
- 2
lib/network/modules/SelectionHandler.js View File

@ -535,8 +535,8 @@ class SelectionHandler {
delete this.hoverObj.edges[edgeId];
}
// if the blur remains the same and the object is undefined (mouse off) or another
// edge has been hovered, we blur the edge
else if (object === undefined || object instanceof Edge) {
// edge has been hovered, or another node has been hovered we blur the edge.
else if (object === undefined || (object instanceof Edge && object.id != edgeId) || (object instanceof Node && !object.hover)) {
this.blurObject(this.hoverObj.edges[edgeId]);
delete this.hoverObj.edges[edgeId];
hoverChanged = true;

+ 2
- 3
lib/timeline/component/TimeAxis.js View File

@ -364,14 +364,12 @@ TimeAxis.prototype._repaintMajorText = function (x, text, orientation, className
if (!label) {
// create label
var content = document.createElement('div');
content.innerHTML = text;
label = document.createElement('div');
label.appendChild(content);
this.dom.foreground.appendChild(label);
}
this.dom.majorTexts.push(label);
label.childNodes[0].nodeValue = text;
label.childNodes[0].innerHTML = text;
label.className = 'vis-text vis-major ' + className;
//label.title = title; // TODO: this is a heavy operation
@ -383,6 +381,7 @@ TimeAxis.prototype._repaintMajorText = function (x, text, orientation, className
label.style.left = x + 'px';
};
this.dom.majorTexts.push(label);
return label;
};

+ 3
- 0
package.json View File

@ -29,6 +29,8 @@
"watch-dev": "gulp watch --bundle"
},
"dependencies": {
"babel-polyfill": "^6.20.0",
"babel-runtime": "^6.20.0",
"emitter-component": "^1.1.1",
"moment": "^2.12.0",
"propagating-hammerjs": "^1.4.6",
@ -41,6 +43,7 @@
"babel-loader": "^6.2.10",
"babel-plugin-transform-es3-member-expression-literals": "^6.8.0",
"babel-plugin-transform-es3-property-literals": "^6.8.0",
"babel-plugin-transform-runtime": "^6.15.0",
"babel-preset-es2015": "^6.18.0",
"babelify": "^7.3.0",
"clean-css": "^3.4.10",

Loading…
Cancel
Save