Felix Hayashi 8 years ago
parent
commit
8ed7b697bd
2 changed files with 16 additions and 0 deletions
  1. +11
    -0
      examples/network/other/configuration.html
  2. +5
    -0
      lib/shared/configuration.css

+ 11
- 0
examples/network/other/configuration.html View File

@ -52,6 +52,15 @@
configure: true
};
network = new vis.Network(container, data, options);
network.on("configChange", function() {
// this will immediately fix the height of the configuration
// wrapper to prevent unecessary scrolls in chrome.
// see https://github.com/almende/vis/issues/1568
var div = container.getElementsByClassName('vis-configuration-wrapper')[0];
div.style["height"] = div.getBoundingClientRect().height + "px";
});
}
</script>
<script src="../../googleAnalytics.js"></script>
@ -64,6 +73,8 @@
You can also supply a custom filter function or filter string. You can press the generate options button below to have an options object printed. You can then use
this in the network.
</p>
<p><b>Note:</b> The configurator is recreated in the dom tree on input change. This may cause undesired scrolls in your application. In order to avoid this, explicitly set the height of the configurator (see this example's source code).
</p>
<br />
<div id="mynetwork"></div>

+ 5
- 0
lib/shared/configuration.css View File

@ -10,6 +10,11 @@ div.vis-configuration-wrapper {
width:700px;
}
div.vis-configuration-wrapper::after {
clear: both;
content: "";
display: block;
}
div.vis-configuration.vis-config-option-container{
display:block;

Loading…
Cancel
Save