Browse Source

- Added getOptionsFromConfigurator method.

flowchartTest
Alex de Mulder 9 years ago
parent
commit
ace45e6c2e
5 changed files with 13467 additions and 13430 deletions
  1. +1
    -0
      HISTORY.md
  2. +13440
    -13427
      dist/vis.js
  3. +13
    -2
      docs/network/index.html
  4. +7
    -0
      lib/network/Network.js
  5. +6
    -1
      lib/shared/Configurator.js

+ 1
- 0
HISTORY.md View File

@ -27,6 +27,7 @@ http://visjs.org
- Fixed #1039, icon now returns correct distance to border
- Added blurEdge and hoverEdge events.
- Added labelHighlightBold option to edges and nodes.
- Added getOptionsFromConfigurator method.
### Graph2d

+ 13440
- 13427
dist/vis.js
File diff suppressed because it is too large
View File


+ 13
- 2
docs/network/index.html View File

@ -834,7 +834,7 @@ function releaseFunction (clusterPosition, containedNodesPositions) {
<td>Start the physics simulation. This is normally done whenever needed and is only really useful if you
stop the simulation yourself and wish to continue it afterwards.
</td>
.</td></tr>
</tr>
<tr class="collapsible toggle" onclick="toggleTable('methodTable','stopSimulation', this);">
<td colspan="2"><span parent="stopSimulation" class="right-caret"></span> stopSimulation()</td>
</tr>
@ -1059,7 +1059,18 @@ function releaseFunction (clusterPosition, containedNodesPositions) {
<td class="midMethods">Returns: none</td>
<td>Programatically release the focussed node.</td>
</tr>
<tr class="subHeader">
<td colspan="2">Methods to use with the configurator module.</td>
</tr>
<tr class="collapsible toggle" onclick="toggleTable('methodTable','getOptionsFromConfigurator', this);">
<td colspan="2"><span parent="getOptionsFromConfigurator" class="right-caret"></span> getOptionsFromConfigurator()</td>
</tr>
<tr class="hidden" parent="getOptionsFromConfigurator">
<td class="midMethods">Returns: Object</td>
<td>If you use the configurator, you can call this method to get an options object that contains all differences from the default options
caused by users interacting with the configurator.
</td>
</tr>
</table>
<br>

+ 7
- 0
lib/network/Network.js View File

@ -485,5 +485,12 @@ Network.prototype.fit = function() {return this.view.fit.apply(t
Network.prototype.moveTo = function() {return this.view.moveTo.apply(this.view,arguments);};
Network.prototype.focus = function() {return this.view.focus.apply(this.view,arguments);};
Network.prototype.releaseNode = function() {return this.view.releaseNode.apply(this.view,arguments);};
Network.prototype.getOptionsFromConfigurator = function() {
let options = {};
if (this.configurator) {
options = this.configurator.getOptions.apply(this.configurator);
}
return options;
};
module.exports = Network;

+ 6
- 1
lib/shared/Configurator.js View File

@ -599,11 +599,16 @@ class Configurator {
}
_printOptions() {
let options = this.getOptions();
this.optionsContainer.innerHTML = '<pre>var options = ' + JSON.stringify(options, null, 2) + '</pre>';
}
getOptions() {
let options = {};
for (var i = 0; i < this.changedOptions.length; i++) {
this._constructOptions(this.changedOptions[i].value, this.changedOptions[i].path, options)
}
this.optionsContainer.innerHTML = '<pre>var options = ' + JSON.stringify(options, null, 2) + '</pre>';
return options;
}
}

Loading…
Cancel
Save