Browse Source

removed superfluous events

css_transitions
Alex de Mulder 10 years ago
parent
commit
b86855f99a
3 changed files with 2 additions and 60 deletions
  1. +1
    -10
      dist/vis.js
  2. +0
    -40
      docs/graph.html
  3. +1
    -10
      src/graph/graphMixins/SelectionMixin.js

+ 1
- 10
dist/vis.js View File

@ -14920,13 +14920,11 @@ var SelectionMixin = {
var node = this._getNodeAt(pointer);
if (node != null) {
this._selectObject(node,false);
this.emit("clickNode", this.getSelection());
}
else {
var edge = this._getEdgeAt(pointer);
if (edge != null) {
this._selectObject(edge,false);
this.emit("clickEdge", this.getSelection());
}
else {
this._unselectAll();
@ -14945,20 +14943,13 @@ var SelectionMixin = {
*/
_handleDoubleTap : function(pointer) {
var node = this._getNodeAt(pointer);
var selection = this.getSelection();
if (node != null && node !== undefined) {
// we reset the areaCenter here so the opening of the node will occur
this.areaCenter = {"x" : this._canvasToX(pointer.x),
"y" : this._canvasToY(pointer.y)};
this.openCluster(node);
this.emit("doubleClickNode", selection);
}
else {
if (this._getSelectedEdgeCount() == 1) {
this.emit("doubleClickEdge", selection);
}
}
this.emit("doubleClick", selection);
this.emit("doubleClick", this.getSelection());
},

+ 0
- 40
docs/graph.html View File

@ -1871,26 +1871,6 @@ graph.off('select', onSelect);
</ul>
</td>
</tr>
<tr>
<td>clickNode</td>
<td>Fired after the user clicks on a node or taps a node on a touchscreen.</td>
<td>
<ul>
<li><code>nodes</code>: an array with the ids of the selected nodes</li>
<li><code>edges</code>: an array with the ids of the selected edges</li>
</ul>
</td>
</tr>
<tr>
<td>clickEdge</td>
<td>Fired after the user clicks on an edge or taps an edge on a touchscreen.</td>
<td>
<ul>
<li><code>nodes</code>: an array with the ids of the selected nodes</li>
<li><code>edges</code>: an array with the ids of the selected edges</li>
</ul>
</td>
</tr>
<tr>
<td>doubleClick</td>
<td>Fired after the user double clicks or double taps on a touchscreen.</td>
@ -1901,26 +1881,6 @@ graph.off('select', onSelect);
</ul>
</td>
</tr>
<tr>
<td>doubleClickEdge</td>
<td>Fired after the user double clicks on an edge or double taps an edge on a touchscreen.</td>
<td>
<ul>
<li><code>nodes</code>: an array with the ids of the selected nodes</li>
<li><code>edges</code>: an array with the ids of the selected edges</li>
</ul>
</td>
</tr>
<tr>
<td>doubleClickNode</td>
<td>Fired after the user double clicks on a node or double taps a node on a touchscreen.</td>
<td>
<ul>
<li><code>nodes</code>: an array with the ids of the selected nodes</li>
<li><code>edges</code>: an array with the ids of the selected edges</li>
</ul>
</td>
</tr>
<tr>
<td>frameResize</td>
<td>Fired when the size of the canvas has been updated (not neccecarily changed) by the setSize() function or by the setOptions() function.</td>

+ 1
- 10
src/graph/graphMixins/SelectionMixin.js View File

@ -392,13 +392,11 @@ var SelectionMixin = {
var node = this._getNodeAt(pointer);
if (node != null) {
this._selectObject(node,false);
this.emit("clickNode", this.getSelection());
}
else {
var edge = this._getEdgeAt(pointer);
if (edge != null) {
this._selectObject(edge,false);
this.emit("clickEdge", this.getSelection());
}
else {
this._unselectAll();
@ -417,20 +415,13 @@ var SelectionMixin = {
*/
_handleDoubleTap : function(pointer) {
var node = this._getNodeAt(pointer);
var selection = this.getSelection();
if (node != null && node !== undefined) {
// we reset the areaCenter here so the opening of the node will occur
this.areaCenter = {"x" : this._canvasToX(pointer.x),
"y" : this._canvasToY(pointer.y)};
this.openCluster(node);
this.emit("doubleClickNode", selection);
}
else {
if (this._getSelectedEdgeCount() == 1) {
this.emit("doubleClickEdge", selection);
}
}
this.emit("doubleClick", selection);
this.emit("doubleClick", this.getSelection());
},

Loading…
Cancel
Save