Browse Source

rebuilt

flowchartTest
Alex de Mulder 9 years ago
parent
commit
b9796e65e9
4 changed files with 5366 additions and 5348 deletions
  1. +5351
    -5342
      dist/vis.js
  2. +2
    -0
      lib/network/Network.js
  3. +3
    -2
      lib/network/modules/Validator.js
  4. +10
    -4
      lib/util.js

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


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

@ -461,6 +461,7 @@ Network.prototype.getEdgeAt = function() {this.selectionHandler.getEdg
Network.prototype.selectNodes = function() {this.selectionHandler.selectNodes.apply(this.selectionHandler,arguments);};
Network.prototype.selectEdges = function() {this.selectionHandler.selectEdges.apply(this.selectionHandler,arguments);};
Network.prototype.unselectAll = function() {this.selectionHandler.unselectAll.apply(this.selectionHandler,arguments);};
Network.prototype.redraw = function() {this.renderer.redraw.apply(this.renderer,arguments);};
Network.prototype.getScale = function() {this.view.getScale.apply(this.view,arguments);};
Network.prototype.getPosition = function() {this.view.getPosition.apply(this.view,arguments);};
Network.prototype.fit = function() {this.view.fit.apply(this.view,arguments);};
@ -468,4 +469,5 @@ Network.prototype.moveTo = function() {this.view.moveTo.apply(this.
Network.prototype.focus = function() {this.view.focus.apply(this.view,arguments);};
Network.prototype.releaseNode = function() {this.view.releaseNode.apply(this.view,arguments);};
module.exports = Network;

+ 3
- 2
lib/network/modules/Validator.js View File

@ -171,10 +171,10 @@ class Validator {
let globalSearchThreshold = 5;
if (globalSearch.distance <= globalSearchThreshold && localSearch.distance > globalSearch.distance) {
console.log('%cUnknown option detected: "' + option + '" in ' + Validator.printLocation(localSearch.path, option,'') + 'Perhaps it was misplaced? Matching option found at: ' + Validator.printLocation(globalSearch.path, option,''), printStyle);
console.log('%cUnknown option detected: "' + option + '" in ' + Validator.printLocation(localSearch.path, option,'') + 'Perhaps it was misplaced? Matching option found at: ' + Validator.printLocation(globalSearch.path, globalSearch.closestMatch,''), printStyle);
}
else if (localSearch.distance <= localSearchThreshold) {
console.log('%cUnknown option detected: "' + option + '". Did you mean "' + localSearch.closestMatch + '"?' + Validator.printLocation(localSearch.path, option), printStyle);
console.log('%cUnknown option detected: "' + option + '". Did you mean "' + localSearch.closestMatch + '"?' + Validator.printLocation(localSearch.path, localSearch.closestMatch), printStyle);
}
else {
console.log('%cUnknown option detected: "' + option + '". Did you mean one of these: ' + Validator.print(Object.keys(options)) + Validator.printLocation(path, option), printStyle);
@ -192,6 +192,7 @@ class Validator {
* @returns {{closestMatch: string, path: Array, distance: number}}
*/
static findInOptions(option, options, path, recursive = false) {
//console.log(option, options, path)
let min = 1e9;
let closestMatch = '';
let closestMatchPath = [];

+ 10
- 4
lib/util.js View File

@ -101,7 +101,8 @@ exports.assignAllKeys = function (obj, value) {
/**
* Fill an object with a possibly partially defined other object. Only copies values.
* Fill an object with a possibly partially defined other object. Only copies values if the a object has an object requiring values.
* That means an object is not created on a property if only the b object has it.
* @param obj
* @param value
*/
@ -116,6 +117,11 @@ exports.fillIfDefined = function (a, b, allowDeletion = false) {
a[prop] = b[prop];
}
}
else {
if (typeof a[prop] === 'object') {
exports.fillIfDefined(a[prop],b[prop],allowDeletion);
}
}
}
}
}
@ -927,12 +933,12 @@ exports.RGBToHex = function(red,green,blue) {
*/
exports.parseColor = function(color) {
var c;
if (exports.isString(color)) {
if (exports.isValidRGB(color)) {
if (exports.isString(color) === true) {
if (exports.isValidRGB(color) === true) {
var rgb = color.substr(4).substr(0,color.length-5).split(',');
color = exports.RGBToHex(rgb[0],rgb[1],rgb[2]);
}
if (exports.isValidHex(color)) {
if (exports.isValidHex(color) === true) {
var hsv = exports.hexToHSV(color);
var lighterColorHSV = {h:hsv.h,s:hsv.s * 0.45,v:Math.min(1,hsv.v * 1.05)};
var darkerColorHSV = {h:hsv.h,s:Math.min(1,hsv.v * 1.25),v:hsv.v*0.6};

Loading…
Cancel
Save