diff --git a/lib/network/options.ts b/lib/network/options.ts index 6c85e3e338..05457a4ff9 100644 --- a/lib/network/options.ts +++ b/lib/network/options.ts @@ -71,7 +71,7 @@ const nodeOptions: OptionsConfig = { color: { string }, size: { number }, // px face: { string }, - background: { string }, + background: { string, undefined: "undefined" }, strokeWidth: { number }, // px strokeColor: { string }, vadjust: { number }, @@ -112,14 +112,14 @@ const nodeOptions: OptionsConfig = { }, group: { string, number, undefined: "undefined" }, heightConstraint: { - minimum: { number }, + minimum: { number, undefined: "undefined" }, valign: { string }, __type__: { object, boolean: bool, number }, }, hidden: { boolean: bool }, icon: { face: { string }, - code: { string }, //'\uf007', + code: { string, undefined: "undefined" }, //'\uf007', size: { number }, //50, color: { string }, weight: { string, number }, @@ -192,7 +192,7 @@ const nodeOptions: OptionsConfig = { "hexagon", ], }, - ctxRenderer: { function: "function" }, + ctxRenderer: { function: "function", undefined: "undefined" }, shapeProperties: { borderDashes: { boolean: bool, array }, borderRadius: { number }, @@ -206,19 +206,19 @@ const nodeOptions: OptionsConfig = { title: { string, dom, undefined: "undefined" }, value: { number, undefined: "undefined" }, widthConstraint: { - minimum: { number }, - maximum: { number }, + minimum: { number, undefined: "undefined" }, + maximum: { number, undefined: "undefined" }, __type__: { object, boolean: bool, number }, }, - x: { number }, - y: { number }, + x: { number, undefined: "undefined" }, + y: { number, undefined: "undefined" }, __type__: { object }, }; const allOptions: OptionsConfig = { configure: { enabled: { boolean: bool }, filter: { boolean: bool, string, array, function: "function" }, - container: { dom }, + container: { dom, undefined: "undefined" }, showButton: { boolean: bool }, __type__: { object, boolean: bool, string, array, function: "function" }, }, @@ -228,27 +228,27 @@ const allOptions: OptionsConfig = { enabled: { boolean: bool }, scaleFactor: { number }, type: { string: endPoints }, - imageHeight: { number }, - imageWidth: { number }, - src: { string }, + imageHeight: { number, undefined: "undefined" }, + imageWidth: { number, undefined: "undefined" }, + src: { string, undefined: "undefined" }, __type__: { object, boolean: bool }, }, middle: { enabled: { boolean: bool }, scaleFactor: { number }, type: { string: endPoints }, - imageWidth: { number }, - imageHeight: { number }, - src: { string }, + imageWidth: { number, undefined: "undefined" }, + imageHeight: { number, undefined: "undefined" }, + src: { string, undefined: "undefined" }, __type__: { object, boolean: bool }, }, from: { enabled: { boolean: bool }, scaleFactor: { number }, type: { string: endPoints }, - imageWidth: { number }, - imageHeight: { number }, - src: { string }, + imageWidth: { number, undefined: "undefined" }, + imageHeight: { number, undefined: "undefined" }, + src: { string, undefined: "undefined" }, __type__: { object, boolean: bool }, }, __type__: { string: ["from", "to", "middle"], object }, @@ -291,7 +291,7 @@ const allOptions: OptionsConfig = { color: { string }, size: { number }, // px face: { string }, - background: { string }, + background: { string, undefined: "undefined" }, strokeWidth: { number }, // px strokeColor: { string }, align: { string: ["horizontal", "top", "middle", "bottom"] }, @@ -352,7 +352,7 @@ const allOptions: OptionsConfig = { __type__: { object }, }, selectionWidth: { function: "function", number }, - selfReferenceSize: { number }, + selfReferenceSize: { number, boolean: bool }, selfReference: { size: { number }, angle: { number }, @@ -393,7 +393,7 @@ const allOptions: OptionsConfig = { title: { string, undefined: "undefined" }, width: { number }, widthConstraint: { - maximum: { number }, + maximum: { number, undefined: "undefined" }, __type__: { object, boolean: bool, number }, }, value: { number, undefined: "undefined" }, @@ -457,7 +457,7 @@ const allOptions: OptionsConfig = { initiallyActive: { boolean: bool }, addNode: { boolean: bool, function: "function" }, addEdge: { boolean: bool, function: "function" }, - editNode: { function: "function" }, + editNode: { function: "function", undefined: "undefined" }, editEdge: { editWithoutDrag: { function: "function" }, __type__: { object, boolean: bool, function: "function" },