Browse Source

Merge remote-tracking branch 'origin/v4' into v4

flowchartTest
jos 9 years ago
parent
commit
a60db8c22e
2 changed files with 15 additions and 7 deletions
  1. +8
    -4
      dist/vis.js
  2. +7
    -3
      lib/network/modules/ManipulationSystem.js

+ 8
- 4
dist/vis.js View File

@ -24655,7 +24655,6 @@ return /******/ (function(modules) { // webpackBootstrap
this.manipulationDiv.style.display = 'block';
this.closeDiv.style.display = 'block';
this.editModeDiv.style.display = 'none';
this._bindHammerToDiv(this.closeDiv, this.toggleEditMode.bind(this));
this.showManipulatorToolbar();
}
}
@ -24689,6 +24688,11 @@ return /******/ (function(modules) { // webpackBootstrap
// if the gui is enabled, draw all elements.
if (this.guiEnabled === true) {
// a _restore will hide these menus
this.editMode = true;
this.manipulationDiv.style.display = 'block';
this.closeDiv.style.display = 'block';
var selectedNodeCount = this.selectionHandler._getSelectedNodeCount();
var selectedEdgeCount = this.selectionHandler._getSelectedEdgeCount();
var selectedTotalCount = selectedNodeCount + selectedEdgeCount;
@ -25576,7 +25580,7 @@ return /******/ (function(modules) { // webpackBootstrap
alert(this.options.locales[this.options.locale].createEdgeError);
} else {
if (this.body.nodes[connectFromId] !== undefined && this.body.nodes[node.id] !== undefined) {
this._performCreateEdge(connectFromId, node.id);
this._performAddEdge(connectFromId, node.id);
}
}
}
@ -25621,14 +25625,14 @@ return /******/ (function(modules) { // webpackBootstrap
}
}
}, {
key: '_performCreateEdge',
key: '_performAddEdge',
/**
* connect two nodes with a new edge.
*
* @private
*/
value: function _performCreateEdge(sourceNodeId, targetNodeId) {
value: function _performAddEdge(sourceNodeId, targetNodeId) {
var _this5 = this;
var defaultData = { from: sourceNodeId, to: targetNodeId };

+ 7
- 3
lib/network/modules/ManipulationSystem.js View File

@ -116,7 +116,6 @@ class ManipulationSystem {
this.manipulationDiv.style.display = 'block';
this.closeDiv.style.display = 'block';
this.editModeDiv.style.display = 'none';
this._bindHammerToDiv(this.closeDiv, this.toggleEditMode.bind(this));
this.showManipulatorToolbar();
}
}
@ -147,6 +146,11 @@ class ManipulationSystem {
// if the gui is enabled, draw all elements.
if (this.guiEnabled === true) {
// a _restore will hide these menus
this.editMode = true;
this.manipulationDiv.style.display = 'block';
this.closeDiv.style.display = 'block';
let selectedNodeCount = this.selectionHandler._getSelectedNodeCount();
let selectedEdgeCount = this.selectionHandler._getSelectedEdgeCount();
let selectedTotalCount = selectedNodeCount + selectedEdgeCount;
@ -1006,7 +1010,7 @@ class ManipulationSystem {
}
else {
if (this.body.nodes[connectFromId] !== undefined && this.body.nodes[node.id] !== undefined) {
this._performCreateEdge(connectFromId, node.id);
this._performAddEdge(connectFromId, node.id);
}
}
}
@ -1055,7 +1059,7 @@ class ManipulationSystem {
*
* @private
*/
_performCreateEdge(sourceNodeId, targetNodeId) {
_performAddEdge(sourceNodeId, targetNodeId) {
let defaultData = {from: sourceNodeId, to: targetNodeId};
if (typeof this.options.addEdge === 'function') {
if (this.options.addEdge.length === 2) {

Loading…
Cancel
Save