Browse Source

Merge remote-tracking branch 'origin/develop' into alex_dev

css_transitions
Alex de Mulder 10 years ago
parent
commit
cde8901c2c
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

@ -1399,12 +1399,12 @@ var options: {
}; };
</pre> </pre>
<p> <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. 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. An code snippet from example 21 is shown below.
</p> </p>
<pre class="prettyprint"> <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> </pre>
<h3 id="Clustering">Clustering</h3> <h3 id="Clustering">Clustering</h3>
@ -1892,7 +1892,7 @@ graph.off('select', onSelect);
</td> </td>
</tr> </tr>
<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>Fired when the size of the canvas has been updated (not neccecarily changed) by the setSize() function or by the setOptions() function.</td>
<td> <td>
<ul> <ul>

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

@ -166,7 +166,7 @@
document.getElementById('selection').innerHTML = 'Selection: ' + params.nodes; 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() { function clearPopUp() {
var saveButton = document.getElementById('saveButton'); var saveButton = document.getElementById('saveButton');

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

@ -1186,7 +1186,7 @@ Graph.prototype.setSize = function(width, height) {
this.manipulationDiv.style.width = this.frame.canvas.clientWidth; 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