Browse Source

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

codeClimate
Alex de Mulder 8 years ago
parent
commit
0fdb5bf60f
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 configure: true
}; };
network = new vis.Network(container, data, options); 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>
<script src="../../googleAnalytics.js"></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 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. this in the network.
</p> </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 /> <br />
<div id="mynetwork"></div> <div id="mynetwork"></div>

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

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

Loading…
Cancel
Save