Browse Source

added stabilized event to trigger storePositions()

css_transitions
Alex de Mulder 10 years ago
parent
commit
cbaf7587cc
2 changed files with 10 additions and 0 deletions
  1. +9
    -0
      docs/graph.html
  2. +1
    -0
      src/graph/Graph.js

+ 9
- 0
docs/graph.html View File

@ -2002,6 +2002,15 @@ graph.off('select', onSelect);
</ul>
</td>
</tr>
<tr>
<td>stabilized</td>
<td>Fired when the graph has been stabilized after initialization. This event can be used to trigger the .storePosition() function after stabilization.</td>
<td>
<ul>
<li><code>iterations</code>: number of iterations used to stabilize</li>
</ul>
</td>
</tr>
</table>

+ 1
- 0
src/graph/Graph.js View File

@ -1724,6 +1724,7 @@ Graph.prototype._stabilize = function() {
}
this.zoomExtent(false,true);
this.emit("stabilized",{iterations:count});
};

Loading…
Cancel
Save