Browse Source

replace { bool } with { boolean: bool } to fix #2500 (#2501)

readme-improvements
David Anderson 7 years ago
committed by yotamberk
parent
commit
58924d5137
1 changed files with 78 additions and 78 deletions
  1. +78
    -78
      lib/network/options.js

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

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

Loading…
Cancel
Save