Browse Source

- prerelease

flowchartTest
Alex de Mulder 9 years ago
parent
commit
daba2f7c6a
8 changed files with 1291 additions and 1279 deletions
  1. +1
    -1
      HISTORY.md
  2. +1
    -1
      bower.json
  3. +1235
    -1234
      dist/vis.js
  4. +1
    -1
      dist/vis.map
  5. +10
    -10
      dist/vis.min.js
  6. +1
    -1
      lib/network/options.js
  7. +1
    -1
      package.json
  8. +41
    -30
      test/network_unittests.html

+ 1
- 1
HISTORY.md View File

@ -2,7 +2,7 @@
http://visjs.org http://visjs.org
## not yet released, version 4.5.2-SNAPSHOT
## 2015-07-22, version 4.6.0
### Timeline ### Timeline

+ 1
- 1
bower.json View File

@ -1,6 +1,6 @@
{ {
"name": "vis", "name": "vis",
"version": "4.5.2-SNAPSHOT",
"version": "4.6.0",
"main": ["dist/vis.min.js", "dist/vis.min.css"], "main": ["dist/vis.min.js", "dist/vis.min.css"],
"description": "A dynamic, browser-based visualization library.", "description": "A dynamic, browser-based visualization library.",
"homepage": "http://visjs.org/", "homepage": "http://visjs.org/",

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


+ 1
- 1
dist/vis.map
File diff suppressed because it is too large
View File


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


+ 1
- 1
lib/network/options.js View File

@ -348,7 +348,7 @@ let configureOptions = {
shape: ['ellipse', 'box', 'circle', 'database', 'diamond', 'dot', 'square', 'star', 'text', 'triangle', 'triangleDown'], shape: ['ellipse', 'box', 'circle', 'database', 'diamond', 'dot', 'square', 'star', 'text', 'triangle', 'triangleDown'],
shapeProperties: { shapeProperties: {
borderDashes: false, borderDashes: false,
borderRadius: 6,
borderRadius: [6, 0, 20, 1],
useImageSize: false useImageSize: false
}, },
size: [25, 0, 200, 1] size: [25, 0, 200, 1]

+ 1
- 1
package.json View File

@ -1,6 +1,6 @@
{ {
"name": "vis", "name": "vis",
"version": "4.5.2-SNAPSHOT",
"version": "4.6.0",
"description": "A dynamic, browser-based visualization library.", "description": "A dynamic, browser-based visualization library.",
"homepage": "http://visjs.org/", "homepage": "http://visjs.org/",
"license": "(Apache-2.0 OR MIT)", "license": "(Apache-2.0 OR MIT)",

+ 41
- 30
test/network_unittests.html View File

@ -46,7 +46,7 @@
}; };
var container = document.getElementById('mynetwork'); var container = document.getElementById('mynetwork');
function drawQuick() {
function drawQuick(testOptions) {
draw({physics:{stabilization:false}}); draw({physics:{stabilization:false}});
} }
@ -176,36 +176,46 @@
var amountOfOptionChecks = 200;
var optionCheckTime = 150;
var amountOfOptionChecks = 50;
var optionsThreshold = 0.8; var optionsThreshold = 0.8;
function checkOptions(i) {
// console.log('checking Options iteration:',i)
var allOptions = vis.network.allOptions.allOptions;
var testOptions = {};
constructOptions(allOptions, testOptions);
var failed = setTimeout(function() {console.error("FAILED",JSON.stringify(testOptions,null,4))}, 0.9*optionCheckTime);
var counter = 0;
drawQuick();
network.on("afterDrawing", function() {
counter++;
if (counter > 2) {
counter = 0;
network.off('afterDrawing');
var optionGlobalCount = 0;
function checkOptions() {
optionGlobalCount++;
if (optionGlobalCount == amountOfOptionChecks) {
checkMethods();
}
else {
var allOptions = vis.network.allOptions.allOptions;
var testOptions = {};
constructOptions(allOptions, testOptions);
var failed = setTimeout(function () {
console.error("FAILED", JSON.stringify(testOptions, null, 4))
}, 500);
var counter = 0;
drawQuick(testOptions);
network.on("afterDrawing", function () {
counter++;
if (counter > 2) {
counter = 0;
network.off('afterDrawing');
clearTimeout(failed);
network.destroy();
}
})
network.on("stabilized", function () {
clearTimeout(failed); clearTimeout(failed);
}
})
network.on("stabilized", function() {
clearTimeout(failed);
});
network.on("destroy", function() {
clearTimeout(failed);
})
network.setOptions(testOptions);
network.destroy();
});
network.on("destroy", function () {
clearTimeout(failed);
setTimeout(checkOptions, 100);
})
console.log("now testing:",testOptions)
network.setOptions(testOptions);
}
} }
function constructOptions(allOptions, testOptions) { function constructOptions(allOptions, testOptions) {
for (var option in allOptions) { for (var option in allOptions) {
if (Math.random() < optionsThreshold) { if (Math.random() < optionsThreshold) {
if (option !== "__type__" && option !== '__any__' && option !== 'locales' && option !== 'image' && option !== 'id') { if (option !== "__type__" && option !== '__any__' && option !== 'locales' && option !== 'image' && option !== 'id') {
@ -254,10 +264,11 @@
} }
for (var i = 0; i < amountOfOptionChecks; i++) {
setTimeout(checkOptions.bind(this,i), i*optionCheckTime);
}
setTimeout(checkMethods, amountOfOptionChecks*optionCheckTime);
checkOptions();
// for (var i = 0; i < amountOfOptionChecks; i++) {
// setTimeout(checkOptions.bind(this,i), i*optionCheckTime);
// }
// setTimeout(checkMethods, amountOfOptionChecks*optionCheckTime);
</script> </script>
</body> </body>
</html> </html>

Loading…
Cancel
Save