Browse Source

renamed frameResize to resize

css_transitions
Alex de Mulder 10 years ago
parent
commit
e12406b59a
3 changed files with 5 additions and 5 deletions
  1. +3
    -3
      docs/graph.html
  2. +1
    -1
      examples/graph/21_data_manipulation.html
  3. +1
    -1
      src/graph/Graph.js

+ 3
- 3
docs/graph.html View File

@ -1390,12 +1390,12 @@ var options: {
};
</pre>
<p>
Because the interface elements are CSS and HTML, the user will have to correct for size changes of the canvas. To facilitate this, a new event has been added called frameResize.
Because the interface elements are CSS and HTML, the user will have to correct for size changes of the canvas. To facilitate this, a new event has been added called resize.
A function can be bound to this event. This function is supplied with the new widht and height of the canvas. The CSS can then be updated accordingly.
An code snippet from example 21 is shown below.
</p>
<pre class="prettyprint">
graph.on("frameResize", function(params) {console.log(params.width,params.height)});
graph.on("resize", function(params) {console.log(params.width,params.height)});
</pre>
<h3 id="Clustering">Clustering</h3>
@ -1882,7 +1882,7 @@ graph.off('select', onSelect);
</td>
</tr>
<tr>
<td>frameResize</td>
<td>resize</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>
<td>
<ul>

+ 1
- 1
examples/graph/21_data_manipulation.html View File

@ -166,7 +166,7 @@
document.getElementById('selection').innerHTML = 'Selection: ' + params.nodes;
});
graph.on("frameResize", function(params) {console.log(params.width,params.height)});
graph.on("resize", function(params) {console.log(params.width,params.height)});
function clearPopUp() {
var saveButton = document.getElementById('saveButton');

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

@ -1184,7 +1184,7 @@ Graph.prototype.setSize = function(width, height) {
this.manipulationDiv.style.width = this.frame.canvas.clientWidth;
}
this.emit('frameResize', {width:this.frame.canvas.width,height:this.frame.canvas.height});
this.emit('resize', {width:this.frame.canvas.width,height:this.frame.canvas.height});
};
/**

Loading…
Cancel
Save