|
|
@ -6,7 +6,7 @@ |
|
|
|
* __type__ is a required field for all objects and contains the allowed types of all objects |
|
|
|
*/ |
|
|
|
let string = 'string'; |
|
|
|
let boolean = 'boolean'; |
|
|
|
let bool = 'boolean'; |
|
|
|
let number = 'number'; |
|
|
|
let array = 'array'; |
|
|
|
let object = 'object'; // should only be in a __type__ property
|
|
|
@ -16,29 +16,29 @@ let any = 'any'; |
|
|
|
|
|
|
|
let allOptions = { |
|
|
|
configure: { |
|
|
|
enabled: { boolean }, |
|
|
|
filter: { boolean, string, array, 'function': 'function' }, |
|
|
|
enabled: { bool }, |
|
|
|
filter: { bool, string, array, 'function': 'function' }, |
|
|
|
container: { dom }, |
|
|
|
showButton: { boolean }, |
|
|
|
__type__: { object, boolean, string, array, 'function': 'function' } |
|
|
|
showButton: { bool }, |
|
|
|
__type__: { object, bool, string, array, 'function': 'function' } |
|
|
|
}, |
|
|
|
edges: { |
|
|
|
arrows: { |
|
|
|
to: { enabled: { boolean }, scaleFactor: { number }, type: { string: ['arrow', 'circle'] }, __type__: { object, boolean } }, |
|
|
|
middle: { enabled: { boolean }, scaleFactor: { number }, type: { string: ['arrow', 'circle'] }, __type__: { object, boolean } }, |
|
|
|
from: { enabled: { boolean }, scaleFactor: { number }, type: { string: ['arrow', 'circle'] }, __type__: { object, boolean } }, |
|
|
|
to: { enabled: { bool }, scaleFactor: { number }, type: { string: ['arrow', 'circle'] }, __type__: { object, bool } }, |
|
|
|
middle: { enabled: { bool }, scaleFactor: { number }, type: { string: ['arrow', 'circle'] }, __type__: { object, bool } }, |
|
|
|
from: { enabled: { bool }, scaleFactor: { number }, type: { string: ['arrow', 'circle'] }, __type__: { object, bool } }, |
|
|
|
__type__: { string: ['from', 'to', 'middle'], object } |
|
|
|
}, |
|
|
|
arrowStrikethrough: { boolean }, |
|
|
|
arrowStrikethrough: { bool }, |
|
|
|
color: { |
|
|
|
color: { string }, |
|
|
|
highlight: { string }, |
|
|
|
hover: { string }, |
|
|
|
inherit: { string: ['from', 'to', 'both'], boolean }, |
|
|
|
inherit: { string: ['from', 'to', 'both'], bool }, |
|
|
|
opacity: { number }, |
|
|
|
__type__: { object, string } |
|
|
|
}, |
|
|
|
dashes: { boolean, array }, |
|
|
|
dashes: { bool, array }, |
|
|
|
font: { |
|
|
|
color: { string }, |
|
|
|
size: { number }, // px
|
|
|
@ -48,7 +48,7 @@ let allOptions = { |
|
|
|
strokeColor: { string }, |
|
|
|
align: { string: ['horizontal', 'top', 'middle', 'bottom'] }, |
|
|
|
vadjust: { number }, |
|
|
|
multi: { boolean, string }, |
|
|
|
multi: { bool, string }, |
|
|
|
bold: { |
|
|
|
color: { string }, |
|
|
|
size: { number }, // px
|
|
|
@ -83,22 +83,22 @@ let allOptions = { |
|
|
|
}, |
|
|
|
__type__: { object, string } |
|
|
|
}, |
|
|
|
hidden: { boolean }, |
|
|
|
hidden: { bool }, |
|
|
|
hoverWidth: { 'function': 'function', number }, |
|
|
|
label: { string, 'undefined': 'undefined' }, |
|
|
|
labelHighlightBold: { boolean }, |
|
|
|
labelHighlightBold: { bool }, |
|
|
|
length: { number, 'undefined': 'undefined' }, |
|
|
|
physics: { boolean }, |
|
|
|
physics: { bool }, |
|
|
|
scaling: { |
|
|
|
min: { number }, |
|
|
|
max: { number }, |
|
|
|
label: { |
|
|
|
enabled: { boolean }, |
|
|
|
enabled: { bool }, |
|
|
|
min: { number }, |
|
|
|
max: { number }, |
|
|
|
maxVisible: { number }, |
|
|
|
drawThreshold: { number }, |
|
|
|
__type__: { object, boolean } |
|
|
|
__type__: { object, bool } |
|
|
|
}, |
|
|
|
customScalingFunction: { 'function': 'function' }, |
|
|
|
__type__: { object } |
|
|
@ -106,86 +106,86 @@ let allOptions = { |
|
|
|
selectionWidth: { 'function': 'function', number }, |
|
|
|
selfReferenceSize: { number }, |
|
|
|
shadow: { |
|
|
|
enabled: { boolean }, |
|
|
|
enabled: { bool }, |
|
|
|
color: { string }, |
|
|
|
size: { number }, |
|
|
|
x: { number }, |
|
|
|
y: { number }, |
|
|
|
__type__: { object, boolean } |
|
|
|
__type__: { object, bool } |
|
|
|
}, |
|
|
|
smooth: { |
|
|
|
enabled: { boolean }, |
|
|
|
enabled: { bool }, |
|
|
|
type: { string: ['dynamic', 'continuous', 'discrete', 'diagonalCross', 'straightCross', 'horizontal', 'vertical', 'curvedCW', 'curvedCCW', 'cubicBezier'] }, |
|
|
|
roundness: { number }, |
|
|
|
forceDirection: { string: ['horizontal', 'vertical', 'none'], boolean }, |
|
|
|
__type__: { object, boolean } |
|
|
|
forceDirection: { string: ['horizontal', 'vertical', 'none'], bool }, |
|
|
|
__type__: { object, bool } |
|
|
|
}, |
|
|
|
title: { string, 'undefined': 'undefined' }, |
|
|
|
width: { number }, |
|
|
|
widthConstraint: { |
|
|
|
maximum: { number }, |
|
|
|
__type__: { object, boolean, number } |
|
|
|
__type__: { object, bool, number } |
|
|
|
}, |
|
|
|
value: { number, 'undefined': 'undefined' }, |
|
|
|
__type__: { object } |
|
|
|
}, |
|
|
|
groups: { |
|
|
|
useDefaultGroups: { boolean }, |
|
|
|
useDefaultGroups: { bool }, |
|
|
|
__any__: 'get from nodes, will be overwritten below', |
|
|
|
__type__: { object } |
|
|
|
}, |
|
|
|
interaction: { |
|
|
|
dragNodes: { boolean }, |
|
|
|
dragView: { boolean }, |
|
|
|
hideEdgesOnDrag: { boolean }, |
|
|
|
hideNodesOnDrag: { boolean }, |
|
|
|
hover: { boolean }, |
|
|
|
dragNodes: { bool }, |
|
|
|
dragView: { bool }, |
|
|
|
hideEdgesOnDrag: { bool }, |
|
|
|
hideNodesOnDrag: { bool }, |
|
|
|
hover: { bool }, |
|
|
|
keyboard: { |
|
|
|
enabled: { boolean }, |
|
|
|
enabled: { bool }, |
|
|
|
speed: { x: { number }, y: { number }, zoom: { number }, __type__: { object } }, |
|
|
|
bindToWindow: { boolean }, |
|
|
|
__type__: { object, boolean } |
|
|
|
}, |
|
|
|
multiselect: { boolean }, |
|
|
|
navigationButtons: { boolean }, |
|
|
|
selectable: { boolean }, |
|
|
|
selectConnectedEdges: { boolean }, |
|
|
|
hoverConnectedEdges: { boolean }, |
|
|
|
bindToWindow: { bool }, |
|
|
|
__type__: { object, bool } |
|
|
|
}, |
|
|
|
multiselect: { bool }, |
|
|
|
navigationButtons: { bool }, |
|
|
|
selectable: { bool }, |
|
|
|
selectConnectedEdges: { bool }, |
|
|
|
hoverConnectedEdges: { bool }, |
|
|
|
tooltipDelay: { number }, |
|
|
|
zoomView: { boolean }, |
|
|
|
zoomView: { bool }, |
|
|
|
__type__: { object } |
|
|
|
}, |
|
|
|
layout: { |
|
|
|
randomSeed: { 'undefined': 'undefined', number }, |
|
|
|
improvedLayout: { boolean }, |
|
|
|
improvedLayout: { bool }, |
|
|
|
hierarchical: { |
|
|
|
enabled: { boolean }, |
|
|
|
enabled: { bool }, |
|
|
|
levelSeparation: { number }, |
|
|
|
nodeSpacing: { number }, |
|
|
|
treeSpacing: { number }, |
|
|
|
blockShifting: { boolean }, |
|
|
|
edgeMinimization: { boolean }, |
|
|
|
parentCentralization: { boolean }, |
|
|
|
blockShifting: { bool }, |
|
|
|
edgeMinimization: { bool }, |
|
|
|
parentCentralization: { bool }, |
|
|
|
direction: { string: ['UD', 'DU', 'LR', 'RL'] }, // UD, DU, LR, RL
|
|
|
|
sortMethod: { string: ['hubsize', 'directed'] }, // hubsize, directed
|
|
|
|
__type__: { object, boolean } |
|
|
|
__type__: { object, bool } |
|
|
|
}, |
|
|
|
__type__: { object } |
|
|
|
}, |
|
|
|
manipulation: { |
|
|
|
enabled: { boolean }, |
|
|
|
initiallyActive: { boolean }, |
|
|
|
addNode: { boolean, 'function': 'function' }, |
|
|
|
addEdge: { boolean, 'function': 'function' }, |
|
|
|
enabled: { bool }, |
|
|
|
initiallyActive: { bool }, |
|
|
|
addNode: { bool, 'function': 'function' }, |
|
|
|
addEdge: { bool, 'function': 'function' }, |
|
|
|
editNode: { 'function': 'function' }, |
|
|
|
editEdge: { |
|
|
|
editWithoutDrag: { 'function' : 'function' }, |
|
|
|
__type__: {object, boolean, 'function': 'function' } |
|
|
|
__type__: {object, bool, 'function': 'function' } |
|
|
|
}, |
|
|
|
deleteNode: { boolean, 'function': 'function' }, |
|
|
|
deleteEdge: { boolean, 'function': 'function' }, |
|
|
|
deleteNode: { bool, 'function': 'function' }, |
|
|
|
deleteEdge: { bool, 'function': 'function' }, |
|
|
|
controlNodeStyle: 'get from nodes, will be overwritten below', |
|
|
|
__type__: { object, boolean } |
|
|
|
__type__: { object, bool } |
|
|
|
}, |
|
|
|
nodes: { |
|
|
|
borderWidth: { number }, |
|
|
@ -207,9 +207,9 @@ let allOptions = { |
|
|
|
__type__: { object, string } |
|
|
|
}, |
|
|
|
fixed: { |
|
|
|
x: { boolean }, |
|
|
|
y: { boolean }, |
|
|
|
__type__: { object, boolean } |
|
|
|
x: { bool }, |
|
|
|
y: { bool }, |
|
|
|
__type__: { object, bool } |
|
|
|
}, |
|
|
|
font: { |
|
|
|
align: { string }, |
|
|
@ -220,7 +220,7 @@ let allOptions = { |
|
|
|
strokeWidth: { number }, // px
|
|
|
|
strokeColor: { string }, |
|
|
|
vadjust: { number }, |
|
|
|
multi: { boolean, string }, |
|
|
|
multi: { bool, string }, |
|
|
|
bold: { |
|
|
|
color: { string }, |
|
|
|
size: { number }, // px
|
|
|
@ -259,9 +259,9 @@ let allOptions = { |
|
|
|
heightConstraint: { |
|
|
|
minimum: { number }, |
|
|
|
valign: { string }, |
|
|
|
__type__: { object, boolean, number } |
|
|
|
__type__: { object, bool, number } |
|
|
|
}, |
|
|
|
hidden: { boolean }, |
|
|
|
hidden: { bool }, |
|
|
|
icon: { |
|
|
|
face: { string }, |
|
|
|
code: { string }, //'\uf007',
|
|
|
@ -272,7 +272,7 @@ let allOptions = { |
|
|
|
id: { string, number }, |
|
|
|
image: { string, 'undefined': 'undefined' }, // --> URL
|
|
|
|
label: { string, 'undefined': 'undefined' }, |
|
|
|
labelHighlightBold: { boolean }, |
|
|
|
labelHighlightBold: { bool }, |
|
|
|
level: { number, 'undefined': 'undefined' }, |
|
|
|
margin: { |
|
|
|
top: { number }, |
|
|
@ -282,36 +282,36 @@ let allOptions = { |
|
|
|
__type__: { object, number } |
|
|
|
}, |
|
|
|
mass: { number }, |
|
|
|
physics: { boolean }, |
|
|
|
physics: { bool }, |
|
|
|
scaling: { |
|
|
|
min: { number }, |
|
|
|
max: { number }, |
|
|
|
label: { |
|
|
|
enabled: { boolean }, |
|
|
|
enabled: { bool }, |
|
|
|
min: { number }, |
|
|
|
max: { number }, |
|
|
|
maxVisible: { number }, |
|
|
|
drawThreshold: { number }, |
|
|
|
__type__: { object, boolean } |
|
|
|
__type__: { object, bool } |
|
|
|
}, |
|
|
|
customScalingFunction: { 'function': 'function' }, |
|
|
|
__type__: { object } |
|
|
|
}, |
|
|
|
shadow: { |
|
|
|
enabled: { boolean }, |
|
|
|
enabled: { bool }, |
|
|
|
color: { string }, |
|
|
|
size: { number }, |
|
|
|
x: { number }, |
|
|
|
y: { number }, |
|
|
|
__type__: { object, boolean } |
|
|
|
__type__: { object, bool } |
|
|
|
}, |
|
|
|
shape: { string: ['ellipse', 'circle', 'database', 'box', 'text', 'image', 'circularImage', 'diamond', 'dot', 'star', 'triangle', 'triangleDown', 'square', 'icon'] }, |
|
|
|
shapeProperties: { |
|
|
|
borderDashes: { boolean, array }, |
|
|
|
borderDashes: { bool, array }, |
|
|
|
borderRadius: { number }, |
|
|
|
interpolation: { boolean }, |
|
|
|
useImageSize: { boolean }, |
|
|
|
useBorderWithImage: { boolean }, |
|
|
|
interpolation: { bool }, |
|
|
|
useImageSize: { bool }, |
|
|
|
useBorderWithImage: { bool }, |
|
|
|
__type__: { object } |
|
|
|
}, |
|
|
|
size: { number }, |
|
|
@ -320,14 +320,14 @@ let allOptions = { |
|
|
|
widthConstraint: { |
|
|
|
minimum: { number }, |
|
|
|
maximum: { number }, |
|
|
|
__type__: { object, boolean, number } |
|
|
|
__type__: { object, bool, number } |
|
|
|
}, |
|
|
|
x: { number }, |
|
|
|
y: { number }, |
|
|
|
__type__: { object } |
|
|
|
}, |
|
|
|
physics: { |
|
|
|
enabled: { boolean }, |
|
|
|
enabled: { bool }, |
|
|
|
barnesHut: { |
|
|
|
gravitationalConstant: { number }, |
|
|
|
centralGravity: { number }, |
|
|
@ -366,21 +366,21 @@ let allOptions = { |
|
|
|
minVelocity: { number }, // px/s
|
|
|
|
solver: { string: ['barnesHut', 'repulsion', 'hierarchicalRepulsion', 'forceAtlas2Based'] }, |
|
|
|
stabilization: { |
|
|
|
enabled: { boolean }, |
|
|
|
enabled: { bool }, |
|
|
|
iterations: { number }, // maximum number of iteration to stabilize
|
|
|
|
updateInterval: { number }, |
|
|
|
onlyDynamicEdges: { boolean }, |
|
|
|
fit: { boolean }, |
|
|
|
__type__: { object, boolean } |
|
|
|
onlyDynamicEdges: { bool }, |
|
|
|
fit: { bool }, |
|
|
|
__type__: { object, bool } |
|
|
|
}, |
|
|
|
timestep: { number }, |
|
|
|
adaptiveTimestep: { boolean }, |
|
|
|
__type__: { object, boolean } |
|
|
|
adaptiveTimestep: { bool }, |
|
|
|
__type__: { object, bool } |
|
|
|
}, |
|
|
|
|
|
|
|
//globals :
|
|
|
|
autoResize: { boolean }, |
|
|
|
clickToUse: { boolean }, |
|
|
|
autoResize: { bool }, |
|
|
|
clickToUse: { bool }, |
|
|
|
locale: { string }, |
|
|
|
locales: { |
|
|
|
__any__: { any }, |
|
|
|