@wcardinal/wcardinal-ui 0.332.0 → 0.333.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/types/wcardinal/ui/d-base-padding-adjustable.d.ts +12 -34
- package/dist/types/wcardinal/ui/d-base.d.ts +2 -0
- package/dist/types/wcardinal/ui/d-table-body-cell-input-tree-input.d.ts +1 -1
- package/dist/types/wcardinal/ui/d-table-body-cell-tree.d.ts +1 -0
- package/dist/types/wcardinal/ui/d-tree-item-text.d.ts +1 -0
- package/dist/wcardinal/ui/d-base-padding-adjustable.js +27 -88
- package/dist/wcardinal/ui/d-base-padding-adjustable.js.map +1 -1
- package/dist/wcardinal/ui/d-base.js +5 -1
- package/dist/wcardinal/ui/d-base.js.map +1 -1
- package/dist/wcardinal/ui/d-table-body-cell-input-tree-input.js +5 -4
- package/dist/wcardinal/ui/d-table-body-cell-input-tree-input.js.map +1 -1
- package/dist/wcardinal/ui/d-table-body-cell-tree.js +4 -4
- package/dist/wcardinal/ui/d-table-body-cell-tree.js.map +1 -1
- package/dist/wcardinal/ui/d-tree-item-text.js +3 -1
- package/dist/wcardinal/ui/d-tree-item-text.js.map +1 -1
- package/dist/wcardinal/ui/shape/e-shape-connector-edge-impl.js +6 -2
- package/dist/wcardinal/ui/shape/e-shape-connector-edge-impl.js.map +1 -1
- package/dist/wcardinal-ui-theme-dark.js +1 -1
- package/dist/wcardinal-ui-theme-dark.min.js +1 -1
- package/dist/wcardinal-ui-theme-white.js +1 -1
- package/dist/wcardinal-ui-theme-white.min.js +1 -1
- package/dist/wcardinal-ui.cjs.js +50 -101
- package/dist/wcardinal-ui.js +50 -101
- package/dist/wcardinal-ui.min.js +2 -2
- package/dist/wcardinal-ui.min.js.map +1 -1
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"d-tree-item-text.js","sourceRoot":"","sources":["../../../src/main/typescript/wcardinal/ui/d-tree-item-text.ts"],"names":[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D,CAAC,AAvLD,CAKS,UAAU,GAkLlB","sourcesContent":["/*\n * Copyright (C) 2019 Toshiba Corporation\n * SPDX-License-Identifier: Apache-2.0\n */\n\nimport { interaction } from \"pixi.js\";\nimport { DBasePaddingAdjustable } from \"./d-base-padding-adjustable\";\nimport { DBaseState } from \"./d-base-state\";\nimport { DImageBase, DImageBaseEvents, DImageBaseOptions, DThemeImageBase } from \"./d-image-base\";\nimport { DOnOptions } from \"./d-on-options\";\nimport { DTreeData } from \"./d-tree-data\";\nimport { DTreeDataSelectionType } from \"./d-tree-data-selection\";\nimport { DTreeItem } from \"./d-tree-item\";\nimport { DTreeItemState } from \"./d-tree-item-state\";\nimport { DTreeNode } from \"./d-tree-node\";\nimport { UtilKeyboardEvent } from \"./util/util-keyboard-event\";\n\n/**\n * {@link DTreeItemText} events.\n */\nexport interface DTreeItemTextEvents<NODE, EMITTER> extends DImageBaseEvents<NODE, EMITTER> {\n\t/**\n\t * Triggered when a node is set.\n\t *\n\t * @param node a node\n\t * @param index an index number of a node\n\t * @param emitter an emitter\n\t */\n\tset(node: NODE, index: number, emitter: EMITTER): void;\n\n\t/**\n\t * Triggered when set to undefined.\n\t *\n\t * @param emitter an emitter\n\t */\n\tunset(emitter: EMITTER): void;\n}\n\n/**\n * {@link DTreeItemText} \"on\" options.\n */\nexport interface DTreeItemTextOnOptions<NODE, EMITTER>\n\textends Partial<DTreeItemTextEvents<NODE, EMITTER>>,\n\t\tDOnOptions {}\n\n/**\n * {@link DTreeItemText} options.\n */\nexport interface DTreeItemTextOptions<\n\tNODE extends DTreeNode = DTreeNode,\n\tTHEME extends DThemeTreeItemText = DThemeTreeItemText,\n\tEMITTER = any\n> extends DImageBaseOptions<string, THEME> {\n\ton?: DTreeItemTextOnOptions<NODE, EMITTER>;\n}\n\nexport interface DThemeTreeItemText extends DThemeImageBase<string> {\n\tgetLevelPadding(level: number): number;\n}\n\nexport class DTreeItemText<\n\t\tNODE extends DTreeNode = DTreeNode,\n\t\tTHEME extends DThemeTreeItemText = DThemeTreeItemText,\n\t\tOPTIONS extends DTreeItemTextOptions<NODE, THEME> = DTreeItemTextOptions<NODE, THEME>\n\t>\n\textends DImageBase<string, THEME, OPTIONS>\n\timplements DTreeItem<NODE>\n{\n\tprotected _padding!: DBasePaddingAdjustable;\n\tprotected _data: DTreeData<NODE>;\n\tprotected _node?: NODE;\n\tprotected _index?: number;\n\n\tconstructor(data: DTreeData<NODE>, options?: OPTIONS) {\n\t\tsuper(options);\n\t\tthis._padding = new DBasePaddingAdjustable(this._padding);\n\t\tthis._data = data;\n\t}\n\n\tget node(): NODE | undefined {\n\t\treturn this._node;\n\t}\n\n\tget value(): NODE | undefined {\n\t\treturn this._node;\n\t}\n\n\tget index(): number | undefined {\n\t\treturn this._index;\n\t}\n\n\tget data(): DTreeData<NODE> {\n\t\treturn this._data;\n\t}\n\n\ttoggle(): void {\n\t\tconst node = this._node;\n\t\tif (node !== undefined) {\n\t\t\tthis._data.toggle(node);\n\t\t}\n\t}\n\n\tset(node: NODE, index: number, forcibly?: boolean): void {\n\t\tconst data = this._data;\n\t\tconst isNodeChanged = forcibly || this._node !== node;\n\t\tif (isNodeChanged) {\n\t\t\tthis._node = node;\n\t\t\tthis._index = index;\n\n\t\t\tconst accessor = data.accessor;\n\t\t\tthis.text = accessor.toLabel(node);\n\t\t\tthis.title = accessor.toTitle(node) ?? \"\";\n\t\t\tthis.image = accessor.toImage(node);\n\t\t}\n\n\t\tconst level = data.mapped.levels[index];\n\t\tthis._padding.adjLeft(this.theme.getLevelPadding(level));\n\n\t\tconst children = data.accessor.toChildren(node);\n\t\tconst hasChildren = !!(children && 0 < children.length);\n\t\tconst state = this.state;\n\t\tstate.lock();\n\t\tstate.set(DBaseState.ACTIVE, data.selection.contains(node));\n\t\tstate.remove(DBaseState.DISABLED);\n\t\tstate.set(DTreeItemState.HAS_CHILDREN, hasChildren);\n\t\tstate.set(DTreeItemState.OPENED, data.isExpanded(node));\n\t\tstate.unlock();\n\n\t\tif (isNodeChanged) {\n\t\t\tthis.emit(\"set\", node, index, this);\n\t\t}\n\t}\n\n\tunset(): void {\n\t\tif (this._node !== undefined) {\n\t\t\tthis._node = undefined;\n\t\t\tthis._index = undefined;\n\n\t\t\tthis.text = undefined;\n\t\t\tthis.title = \"\";\n\t\t\tthis.image = undefined;\n\n\t\t\tconst state = this.state;\n\t\t\tstate.lock();\n\t\t\tstate.add(DBaseState.DISABLED);\n\t\t\tstate.remove(DBaseState.ACTIVE);\n\t\t\tstate.unlock();\n\n\t\t\tthis.emit(\"unset\", this);\n\t\t}\n\t}\n\n\tprotected onSelect(\n\t\te: interaction.InteractionEvent | KeyboardEvent | MouseEvent | TouchEvent | undefined,\n\t\tvalue: NODE\n\t): void {\n\t\tconst data = this._data;\n\t\tconst selection = data.selection;\n\t\tif (selection.type !== DTreeDataSelectionType.MULTIPLE) {\n\t\t\tselection.clearAndAdd(value);\n\t\t} else {\n\t\t\tconst originalEvent = e && \"data\" in e ? e.data.originalEvent : e;\n\t\t\tif (originalEvent?.ctrlKey) {\n\t\t\t\tselection.toggle(value);\n\t\t\t} else if (originalEvent?.shiftKey) {\n\t\t\t\tconst mapped = data.mapped;\n\t\t\t\tconst last = selection.last;\n\t\t\t\tif (value === last) {\n\t\t\t\t\tselection.clearAndAdd(value);\n\t\t\t\t} else {\n\t\t\t\t\tlet isFound = false;\n\t\t\t\t\tlet isReverse = false;\n\t\t\t\t\tconst newSelection: NODE[] = [];\n\t\t\t\t\tmapped.each((node): boolean | void => {\n\t\t\t\t\t\tif (isFound) {\n\t\t\t\t\t\t\tif (isReverse) {\n\t\t\t\t\t\t\t\tnewSelection.unshift(node);\n\t\t\t\t\t\t\t\tif (node === value) {\n\t\t\t\t\t\t\t\t\treturn false;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\tnewSelection.push(node);\n\t\t\t\t\t\t\t\tif (node === last) {\n\t\t\t\t\t\t\t\t\treturn false;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tif (node === value) {\n\t\t\t\t\t\t\t\tisFound = true;\n\t\t\t\t\t\t\t\tisReverse = false;\n\t\t\t\t\t\t\t\tnewSelection.push(node);\n\t\t\t\t\t\t\t} else if (node === last) {\n\t\t\t\t\t\t\t\tisFound = true;\n\t\t\t\t\t\t\t\tisReverse = true;\n\t\t\t\t\t\t\t\tnewSelection.push(node);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t});\n\t\t\t\t\tselection.clearAndAddAll(newSelection);\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tselection.clearAndAdd(value);\n\t\t\t}\n\t\t}\n\t}\n\n\tprotected onKeyDown(e: KeyboardEvent): boolean {\n\t\tif (UtilKeyboardEvent.isActivateKey(e)) {\n\t\t\tthis.onKeyDownActivate(e);\n\t\t}\n\t\tif (UtilKeyboardEvent.isArrowRightKey(e)) {\n\t\t\tconst node = this._node;\n\t\t\tif (node !== undefined) {\n\t\t\t\tif (this.state.is(DTreeItemState.HAS_CHILDREN)) {\n\t\t\t\t\tthis._data.expand(node);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tif (UtilKeyboardEvent.isArrowLeftKey(e)) {\n\t\t\tconst node = this._node;\n\t\t\tif (node !== undefined) {\n\t\t\t\tif (this.state.is(DTreeItemState.HAS_CHILDREN)) {\n\t\t\t\t\tthis._data.collapse(node);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn super.onKeyDown(e);\n\t}\n\n\tprotected onKeyDownActivate(e: KeyboardEvent): boolean {\n\t\tif (this.state.isActionable && this.state.isFocused) {\n\t\t\tconst node = this._node;\n\t\t\tif (node !== undefined) {\n\t\t\t\tthis.onSelect(e, node);\n\t\t\t}\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}\n\n\tprotected getType(): string {\n\t\treturn \"DTreeItemText\";\n\t}\n}\n"]}
|
|
1
|
+
{"version":3,"file":"d-tree-item-text.js","sourceRoot":"","sources":["../../../src/main/typescript/wcardinal/ui/d-tree-item-text.ts"],"names":[],"mappings":"AAAA;;;GAGG;;AAGH,OAAO,EAAE,sBAAsB,EAAE,MAAM,6BAA6B,CAAC;AACrE,OAAO,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC;AAC5C,OAAO,EAAE,UAAU,EAAwD,MAAM,gBAAgB,CAAC;AAGlG,OAAO,EAAE,sBAAsB,EAAE,MAAM,yBAAyB,CAAC;AAEjE,OAAO,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AAErD,OAAO,EAAE,iBAAiB,EAAE,MAAM,4BAA4B,CAAC;AA6C/D;IAKS,iCAAkC;IAQ1C,uBAAY,IAAqB,EAAE,OAAiB;QAApD,YACC,kBAAM,OAAO,CAAC,SAEd;QADA,KAAI,CAAC,KAAK,GAAG,IAAI,CAAC;;IACnB,CAAC;IAEkB,kCAAU,GAA7B,UACC,KAAY,EACZ,OAAiB,EACjB,QAAqB;QAErB,OAAO,IAAI,sBAAsB,CAAC,KAAK,EAAE,OAAO,EAAE,QAAQ,CAAC,CAAC;IAC7D,CAAC;IAED,sBAAI,+BAAI;aAAR;YACC,OAAO,IAAI,CAAC,KAAK,CAAC;QACnB,CAAC;;;OAAA;IAED,sBAAI,gCAAK;aAAT;YACC,OAAO,IAAI,CAAC,KAAK,CAAC;QACnB,CAAC;;;OAAA;IAED,sBAAI,gCAAK;aAAT;YACC,OAAO,IAAI,CAAC,MAAM,CAAC;QACpB,CAAC;;;OAAA;IAED,sBAAI,+BAAI;aAAR;YACC,OAAO,IAAI,CAAC,KAAK,CAAC;QACnB,CAAC;;;OAAA;IAED,8BAAM,GAAN;QACC,IAAM,IAAI,GAAG,IAAI,CAAC,KAAK,CAAC;QACxB,IAAI,IAAI,KAAK,SAAS,EAAE;YACvB,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC;SACxB;IACF,CAAC;IAED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AI,CAAC,CAAC;aACvB;YACD,OAAO,IAAI,CAAC;SACZ;QACD,OAAO,KAAK,CAAC;IACd,CAAC;IAES,+BAAO,GAAjB;QACC,OAAO,eAAe,CAAC;IACxB,CAAC;IACF,oBAAC;AAAD,CAAC,AA9LD,CAKS,UAAU,GAyLlB","sourcesContent":["/*\n * Copyright (C) 2019 Toshiba Corporation\n * SPDX-License-Identifier: Apache-2.0\n */\n\nimport { interaction } from \"pixi.js\";\nimport { DBasePaddingAdjustable } from \"./d-base-padding-adjustable\";\nimport { DBaseState } from \"./d-base-state\";\nimport { DImageBase, DImageBaseEvents, DImageBaseOptions, DThemeImageBase } from \"./d-image-base\";\nimport { DOnOptions } from \"./d-on-options\";\nimport { DTreeData } from \"./d-tree-data\";\nimport { DTreeDataSelectionType } from \"./d-tree-data-selection\";\nimport { DTreeItem } from \"./d-tree-item\";\nimport { DTreeItemState } from \"./d-tree-item-state\";\nimport { DTreeNode } from \"./d-tree-node\";\nimport { UtilKeyboardEvent } from \"./util/util-keyboard-event\";\n\n/**\n * {@link DTreeItemText} events.\n */\nexport interface DTreeItemTextEvents<NODE, EMITTER> extends DImageBaseEvents<NODE, EMITTER> {\n\t/**\n\t * Triggered when a node is set.\n\t *\n\t * @param node a node\n\t * @param index an index number of a node\n\t * @param emitter an emitter\n\t */\n\tset(node: NODE, index: number, emitter: EMITTER): void;\n\n\t/**\n\t * Triggered when set to undefined.\n\t *\n\t * @param emitter an emitter\n\t */\n\tunset(emitter: EMITTER): void;\n}\n\n/**\n * {@link DTreeItemText} \"on\" options.\n */\nexport interface DTreeItemTextOnOptions<NODE, EMITTER>\n\textends Partial<DTreeItemTextEvents<NODE, EMITTER>>,\n\t\tDOnOptions {}\n\n/**\n * {@link DTreeItemText} options.\n */\nexport interface DTreeItemTextOptions<\n\tNODE extends DTreeNode = DTreeNode,\n\tTHEME extends DThemeTreeItemText = DThemeTreeItemText,\n\tEMITTER = any\n> extends DImageBaseOptions<string, THEME> {\n\ton?: DTreeItemTextOnOptions<NODE, EMITTER>;\n}\n\nexport interface DThemeTreeItemText extends DThemeImageBase<string> {\n\tgetLevelPadding(level: number): number;\n}\n\nexport class DTreeItemText<\n\t\tNODE extends DTreeNode = DTreeNode,\n\t\tTHEME extends DThemeTreeItemText = DThemeTreeItemText,\n\t\tOPTIONS extends DTreeItemTextOptions<NODE, THEME> = DTreeItemTextOptions<NODE, THEME>\n\t>\n\textends DImageBase<string, THEME, OPTIONS>\n\timplements DTreeItem<NODE>\n{\n\tprotected _padding!: DBasePaddingAdjustable;\n\tprotected _data: DTreeData<NODE>;\n\tprotected _node?: NODE;\n\tprotected _index?: number;\n\n\tconstructor(data: DTreeData<NODE>, options?: OPTIONS) {\n\t\tsuper(options);\n\t\tthis._data = data;\n\t}\n\n\tprotected override newPadding(\n\t\ttheme: THEME,\n\t\toptions?: OPTIONS,\n\t\tcallback?: () => void\n\t): DBasePaddingAdjustable {\n\t\treturn new DBasePaddingAdjustable(theme, options, callback);\n\t}\n\n\tget node(): NODE | undefined {\n\t\treturn this._node;\n\t}\n\n\tget value(): NODE | undefined {\n\t\treturn this._node;\n\t}\n\n\tget index(): number | undefined {\n\t\treturn this._index;\n\t}\n\n\tget data(): DTreeData<NODE> {\n\t\treturn this._data;\n\t}\n\n\ttoggle(): void {\n\t\tconst node = this._node;\n\t\tif (node !== undefined) {\n\t\t\tthis._data.toggle(node);\n\t\t}\n\t}\n\n\tset(node: NODE, index: number, forcibly?: boolean): void {\n\t\tconst data = this._data;\n\t\tconst isNodeChanged = forcibly || this._node !== node;\n\t\tif (isNodeChanged) {\n\t\t\tthis._node = node;\n\t\t\tthis._index = index;\n\n\t\t\tconst accessor = data.accessor;\n\t\t\tthis.text = accessor.toLabel(node);\n\t\t\tthis.title = accessor.toTitle(node) ?? \"\";\n\t\t\tthis.image = accessor.toImage(node);\n\t\t}\n\n\t\tconst level = data.mapped.levels[index];\n\t\tthis._padding.adjLeft(this.theme.getLevelPadding(level));\n\n\t\tconst children = data.accessor.toChildren(node);\n\t\tconst hasChildren = !!(children && 0 < children.length);\n\t\tconst state = this.state;\n\t\tstate.lock();\n\t\tstate.set(DBaseState.ACTIVE, data.selection.contains(node));\n\t\tstate.remove(DBaseState.DISABLED);\n\t\tstate.set(DTreeItemState.HAS_CHILDREN, hasChildren);\n\t\tstate.set(DTreeItemState.OPENED, data.isExpanded(node));\n\t\tstate.unlock();\n\n\t\tif (isNodeChanged) {\n\t\t\tthis.emit(\"set\", node, index, this);\n\t\t}\n\t}\n\n\tunset(): void {\n\t\tif (this._node !== undefined) {\n\t\t\tthis._node = undefined;\n\t\t\tthis._index = undefined;\n\n\t\t\tthis.text = undefined;\n\t\t\tthis.title = \"\";\n\t\t\tthis.image = undefined;\n\n\t\t\tconst state = this.state;\n\t\t\tstate.lock();\n\t\t\tstate.add(DBaseState.DISABLED);\n\t\t\tstate.remove(DBaseState.ACTIVE);\n\t\t\tstate.unlock();\n\n\t\t\tthis.emit(\"unset\", this);\n\t\t}\n\t}\n\n\tprotected onSelect(\n\t\te: interaction.InteractionEvent | KeyboardEvent | MouseEvent | TouchEvent | undefined,\n\t\tvalue: NODE\n\t): void {\n\t\tconst data = this._data;\n\t\tconst selection = data.selection;\n\t\tif (selection.type !== DTreeDataSelectionType.MULTIPLE) {\n\t\t\tselection.clearAndAdd(value);\n\t\t} else {\n\t\t\tconst originalEvent = e && \"data\" in e ? e.data.originalEvent : e;\n\t\t\tif (originalEvent?.ctrlKey) {\n\t\t\t\tselection.toggle(value);\n\t\t\t} else if (originalEvent?.shiftKey) {\n\t\t\t\tconst mapped = data.mapped;\n\t\t\t\tconst last = selection.last;\n\t\t\t\tif (value === last) {\n\t\t\t\t\tselection.clearAndAdd(value);\n\t\t\t\t} else {\n\t\t\t\t\tlet isFound = false;\n\t\t\t\t\tlet isReverse = false;\n\t\t\t\t\tconst newSelection: NODE[] = [];\n\t\t\t\t\tmapped.each((node): boolean | void => {\n\t\t\t\t\t\tif (isFound) {\n\t\t\t\t\t\t\tif (isReverse) {\n\t\t\t\t\t\t\t\tnewSelection.unshift(node);\n\t\t\t\t\t\t\t\tif (node === value) {\n\t\t\t\t\t\t\t\t\treturn false;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\tnewSelection.push(node);\n\t\t\t\t\t\t\t\tif (node === last) {\n\t\t\t\t\t\t\t\t\treturn false;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tif (node === value) {\n\t\t\t\t\t\t\t\tisFound = true;\n\t\t\t\t\t\t\t\tisReverse = false;\n\t\t\t\t\t\t\t\tnewSelection.push(node);\n\t\t\t\t\t\t\t} else if (node === last) {\n\t\t\t\t\t\t\t\tisFound = true;\n\t\t\t\t\t\t\t\tisReverse = true;\n\t\t\t\t\t\t\t\tnewSelection.push(node);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t});\n\t\t\t\t\tselection.clearAndAddAll(newSelection);\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tselection.clearAndAdd(value);\n\t\t\t}\n\t\t}\n\t}\n\n\tprotected onKeyDown(e: KeyboardEvent): boolean {\n\t\tif (UtilKeyboardEvent.isActivateKey(e)) {\n\t\t\tthis.onKeyDownActivate(e);\n\t\t}\n\t\tif (UtilKeyboardEvent.isArrowRightKey(e)) {\n\t\t\tconst node = this._node;\n\t\t\tif (node !== undefined) {\n\t\t\t\tif (this.state.is(DTreeItemState.HAS_CHILDREN)) {\n\t\t\t\t\tthis._data.expand(node);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tif (UtilKeyboardEvent.isArrowLeftKey(e)) {\n\t\t\tconst node = this._node;\n\t\t\tif (node !== undefined) {\n\t\t\t\tif (this.state.is(DTreeItemState.HAS_CHILDREN)) {\n\t\t\t\t\tthis._data.collapse(node);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn super.onKeyDown(e);\n\t}\n\n\tprotected onKeyDownActivate(e: KeyboardEvent): boolean {\n\t\tif (this.state.isActionable && this.state.isFocused) {\n\t\t\tconst node = this._node;\n\t\t\tif (node !== undefined) {\n\t\t\t\tthis.onSelect(e, node);\n\t\t\t}\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}\n\n\tprotected getType(): string {\n\t\treturn \"DTreeItemText\";\n\t}\n}\n"]}
|
|
@@ -409,14 +409,18 @@ var EShapeConnectorEdgeImpl = /** @class */ (function () {
|
|
|
409
409
|
EShapeConnectorEdgeImpl.prototype.attach = function () {
|
|
410
410
|
var shape = this._acceptor.shape;
|
|
411
411
|
if (shape) {
|
|
412
|
-
shape.connector.add(this)
|
|
412
|
+
if (shape.connector.add(this)) {
|
|
413
|
+
this.onAcceptorChange();
|
|
414
|
+
}
|
|
413
415
|
}
|
|
414
416
|
return this;
|
|
415
417
|
};
|
|
416
418
|
EShapeConnectorEdgeImpl.prototype.detach = function () {
|
|
417
419
|
var shape = this._acceptor.shape;
|
|
418
420
|
if (shape) {
|
|
419
|
-
shape.connector.remove(this)
|
|
421
|
+
if (shape.connector.remove(this)) {
|
|
422
|
+
this.onAcceptorChange();
|
|
423
|
+
}
|
|
420
424
|
}
|
|
421
425
|
return this;
|
|
422
426
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"e-shape-connector-edge-impl.js","sourceRoot":"","sources":["../../../../src/main/typescript/wcardinal/ui/shape/e-shape-connector-edge-impl.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAU,MAAM,EAAE,eAAe,EAAE,MAAM,SAAS,CAAC;AAE1D,OAAO,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;AAItD,OAAO,EAAE,+BAA+B,EAAE,MAAM,wCAAwC,CAAC;AAIzF,OAAO,EAAE,sBAAsB,EAAE,MAAM,8BAA8B,CAAC;AAEtE;IAwBC,iCAAY,MAAuB,EAAE,QAAoB;QAAzD,iBA+BC;QA9BA,IAAI,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CAAC,UAAU,EAAE;YACxB,IAAI,CAAC,eAAe,GAAG,IAAI,CAAC;YAC5B,OAAO;SACP;QACD,IAAI,CAAC,SAAS,EAAE,CAAC;IAClB,CAAC;IAED,wCAAM,GAAN;QACC,IAAM,KAAK,GAAG,IAAI,CAAC,SAAS,CAAC,KAAK,CAAC;QACnC,IAAI,KAAK,EAAE;YACV,KAAK,CAAC,SAAS,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC;SAC1B;QACD,OAAO,IAAI,CAAC;IACb,CAAC;IAED,wCAAM,GAAN;QACC,IAAM,KAAK,GAAG,IAAI,CAAC,SAAS,CAAC,KAAK,CAAC;QACnC,IAAI,KAAK,EAAE;YACV,KAAK,CAAC,SAAS,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC;SAC7B;QACD,OAAO,IAAI,CAAC;IACb,CAAC;IACF,8BAAC;AAAD,CAAC,AA1cD,IA0cC","sourcesContent":["/*\n * Copyright (C) 2019 Toshiba Corporation\n * SPDX-License-Identifier: Apache-2.0\n */\n\nimport { IPoint, Matrix, ObservablePoint } from \"pixi.js\";\nimport { EShape } from \"./e-shape\";\nimport { EShapeAcceptors } from \"./e-shape-acceptors\";\nimport { EShapeConnector } from \"./e-shape-connector\";\nimport { EShapeConnectorEdge, EShapeConnectorEdgeSerialized } from \"./e-shape-connector-edge\";\nimport { EShapeConnectorEdgeAcceptor } from \"./e-shape-connector-edge-acceptor\";\nimport { EShapeConnectorEdgeAcceptorImpl } from \"./e-shape-connector-edge-acceptor-impl\";\nimport { EShapeResourceManagerDeserialization } from \"./e-shape-resource-manager-deserialization\";\nimport { EShapeResourceManagerSerialization } from \"./e-shape-resource-manager-serialization\";\nimport { EShapeUuidMapping } from \"./e-shape-uuid-mapping\";\nimport { EShapeAcceptorEdgeSide } from \"./e-shape-acceptor-edge-side\";\n\nexport class EShapeConnectorEdgeImpl implements EShapeConnectorEdge {\n\tprotected static WORK_MATRIX?: Matrix;\n\n\tprotected _parent: EShapeConnector;\n\tprotected _onChange: () => void;\n\tprotected _acceptor: EShapeConnectorEdgeAcceptor;\n\tprotected _acceptorTransformNew: Matrix;\n\tprotected _acceptorTransformOld: Matrix;\n\tprotected _hasAcceptorTransformOld: boolean;\n\tprotected _localIdRequired: number;\n\tprotected _localId: number;\n\tprotected _local: IPoint;\n\tprotected _normalIdRequired: number;\n\tprotected _normalId: number;\n\tprotected _normal: IPoint;\n\tprotected _side: EShapeAcceptorEdgeSide;\n\tprotected _margin: number;\n\tprotected _other: EShapeConnectorEdge | null;\n\tprotected _lockCount: number;\n\tprotected _isAcceptorChanged: boolean;\n\tprotected _isLocalChanged: boolean;\n\tprotected _isNormalChanged: boolean;\n\tprotected _isOtherChanged: boolean;\n\n\tconstructor(parent: EShapeConnector, onChange: () => void) {\n\t\tthis._parent = parent;\n\t\tthis._onChange = onChange;\n\t\tthis._acceptor = new EShapeConnectorEdgeAcceptorImpl(this);\n\t\tthis._acceptorTransformNew = new Matrix();\n\t\tthis._acceptorTransformOld = new Matrix();\n\t\tthis._hasAcceptorTransformOld = false;\n\n\t\tthis._local = new ObservablePoint((): void => {\n\t\t\tthis.onLocalChange();\n\t\t}, undefined);\n\t\tthis._localIdRequired = 0;\n\t\tthis._localId = 0;\n\n\t\tthis._normal = new ObservablePoint((): void => {\n\t\t\tthis.onNormalChange();\n\t\t}, undefined);\n\t\tthis._normalIdRequired = 0;\n\t\tthis._normalId = 0;\n\n\t\tthis._side = EShapeAcceptorEdgeSide.TOP;\n\n\t\tthis._margin = 0;\n\n\t\tthis._other = null;\n\n\t\tthis._lockCount = 0;\n\t\tthis._isAcceptorChanged = false;\n\t\tthis._isLocalChanged = false;\n\t\tthis._isNormalChanged = false;\n\t\tthis._isOtherChanged = false;\n\t}\n\n\tlock(): void {\n\t\tthis._lockCount += 1;\n\t\tif (this._lockCount === 1) {\n\t\t\tthis._isAcceptorChanged = false;\n\t\t\tthis._isLocalChanged = false;\n\t\t\tthis._isNormalChanged = false;\n\t\t\tthis._isOtherChanged = false;\n\t\t}\n\t}\n\n\tunlock(): void {\n\t\tthis._lockCount -= 1;\n\t\tif (this._lockCount === 0) {\n\t\t\tlet isChanged = false;\n\n\t\t\tif (this._isLocalChanged) {\n\t\t\t\tthis._localIdRequired += 1;\n\t\t\t\tthis._localId = this._localIdRequired;\n\t\t\t\tisChanged = true;\n\t\t\t}\n\n\t\t\tif (this._isNormalChanged) {\n\t\t\t\tthis._normalIdRequired += 1;\n\t\t\t\tthis._normalId = this._normalIdRequired;\n\t\t\t\tisChanged = true;\n\t\t\t}\n\n\t\t\tif (this._isOtherChanged) {\n\t\t\t\tisChanged = true;\n\t\t\t}\n\n\t\t\tif (this._isAcceptorChanged) {\n\t\t\t\tthis._hasAcceptorTransformOld = false;\n\t\t\t\tif (!this._isLocalChanged) {\n\t\t\t\t\tthis._localIdRequired += 1;\n\t\t\t\t}\n\t\t\t\tif (!this._isNormalChanged) {\n\t\t\t\t\tthis._normalIdRequired += 1;\n\t\t\t\t}\n\t\t\t\tif (this.doFit()) {\n\t\t\t\t\tisChanged = false;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif (isChanged) {\n\t\t\t\tthis._onChange();\n\t\t\t}\n\t\t}\n\t}\n\n\tget parent(): EShapeConnector {\n\t\treturn this._parent;\n\t}\n\n\tget acceptor(): EShapeConnectorEdgeAcceptor {\n\t\treturn this._acceptor;\n\t}\n\n\tget local(): IPoint {\n\t\treturn this._local;\n\t}\n\n\tget localId(): number {\n\t\treturn this._localId;\n\t}\n\n\tget normal(): IPoint {\n\t\treturn this._normal;\n\t}\n\n\tget normalId(): number {\n\t\treturn this._normalId;\n\t}\n\n\tget side(): EShapeAcceptorEdgeSide {\n\t\treturn this._side;\n\t}\n\n\tset side(side: EShapeAcceptorEdgeSide) {\n\t\tif (this._side !== side) {\n\t\t\tthis._side = side;\n\t\t\tthis.onOtherChange();\n\t\t}\n\t}\n\n\tget margin(): number {\n\t\treturn this._margin;\n\t}\n\n\tset margin(margin: number) {\n\t\tif (this._margin !== margin) {\n\t\t\tthis._margin = margin;\n\t\t\tthis.onOtherChange();\n\t\t}\n\t}\n\n\tget other(): EShapeConnectorEdge | null {\n\t\treturn this._other;\n\t}\n\n\tset other(other: EShapeConnectorEdge | null) {\n\t\tthis._other = other;\n\t}\n\n\tset(\n\t\tacceptorShape?: EShape | null,\n\t\tacceptorEdge?: string | null,\n\t\tacceptorX?: number | null,\n\t\tacceptorY?: number | null,\n\t\tmargin?: number,\n\t\tx?: number,\n\t\ty?: number,\n\t\tnx?: number,\n\t\tny?: number,\n\t\tside?: EShapeAcceptorEdgeSide\n\t): this {\n\t\tthis.lock();\n\t\tthis._acceptor.set(acceptorShape, acceptorEdge, acceptorX, acceptorY);\n\n\t\tconst local = this._local;\n\t\tif (x != null && y != null) {\n\t\t\tlocal.set(x, y);\n\t\t} else if (x != null) {\n\t\t\tlocal.x = x;\n\t\t} else if (y != null) {\n\t\t\tlocal.y = y;\n\t\t}\n\n\t\tconst normal = this._normal;\n\t\tif (nx != null && ny != null) {\n\t\t\tnormal.set(nx, ny);\n\t\t} else if (nx != null) {\n\t\t\tnormal.x = nx;\n\t\t} else if (ny != null) {\n\t\t\tnormal.y = ny;\n\t\t}\n\n\t\tif (side != null) {\n\t\t\tthis.side = side;\n\t\t}\n\n\t\tif (margin != null) {\n\t\t\tthis.margin = margin;\n\t\t}\n\n\t\tthis.unlock();\n\t\treturn this;\n\t}\n\n\tcopy(source: EShapeConnectorEdge): this {\n\t\tthis.lock();\n\t\tthis._acceptor.copy(source.acceptor);\n\t\tthis._local.copyFrom(source.local);\n\t\tthis._normal.copyFrom(source.normal);\n\t\tthis.side = source.side;\n\t\tthis.margin = source.margin;\n\t\tthis.unlock();\n\t\treturn this;\n\t}\n\n\tserialize(manager: EShapeResourceManagerSerialization): number {\n\t\tconst acceptor = this._acceptor;\n\t\tconst shape = acceptor.shape;\n\t\tconst shapeUuid = shape ? shape.uuid : null;\n\t\tconst edge = acceptor.edge;\n\t\tconst edgeId = edge != null ? manager.addResource(edge) : -1;\n\t\tconst local = this._local;\n\t\tconst normal = this._normal;\n\t\tconst side = this._side;\n\t\treturn manager.addResource(\n\t\t\t`[${shapeUuid},${edgeId},${local.x},${local.y},${this._margin},${normal.x},${normal.y},${acceptor.x},${acceptor.y},${side}]`\n\t\t);\n\t}\n\n\tdeserialize(\n\t\tresourceId: number,\n\t\tmapping: EShapeUuidMapping,\n\t\tmanager: EShapeResourceManagerDeserialization\n\t): void {\n\t\tconst resources = manager.resources;\n\t\tif (0 <= resourceId && resourceId < resources.length) {\n\t\t\tlet parsed = manager.getExtension<EShapeConnectorEdgeSerialized>(resourceId);\n\t\t\tif (parsed == null) {\n\t\t\t\tparsed = JSON.parse(resources[resourceId]) as EShapeConnectorEdgeSerialized;\n\t\t\t\tmanager.setExtension(resourceId, parsed);\n\t\t\t}\n\t\t\tlet shape: EShape | null = null;\n\t\t\tconst shapeUuid = parsed[0];\n\t\t\tif (shapeUuid != null) {\n\t\t\t\tshape = mapping.find(shapeUuid) || null;\n\t\t\t}\n\t\t\tthis.lock();\n\t\t\tconst acceptor = this._acceptor;\n\t\t\tacceptor.shape = shape;\n\t\t\tconst edgeId = parsed[1];\n\t\t\tacceptor.edge = 0 <= edgeId && edgeId < resources.length ? resources[edgeId] : null;\n\t\t\tacceptor.x = parsed[7] ?? null;\n\t\t\tacceptor.y = parsed[8] ?? null;\n\t\t\tthis._local.set(parsed[2], parsed[3]);\n\t\t\tconst normalX = parsed[5];\n\t\t\tconst normalY = parsed[6];\n\t\t\tconst normal = this._normal;\n\t\t\tif (normalX != null && normalY != null) {\n\t\t\t\tnormal.set(normalX, normalY);\n\t\t\t} else {\n\t\t\t\tnormal.set(1, 0);\n\t\t\t}\n\t\t\tthis.side = parsed[9] ?? EShapeAcceptorEdgeSide.TOP;\n\t\t\tthis.margin = parsed[4] || 0;\n\t\t\tthis.unlock();\n\t\t\tif (shape) {\n\t\t\t\tshape.connector.add(this);\n\t\t\t}\n\t\t}\n\t}\n\n\tfit(forcibly?: boolean): this {\n\t\tif (forcibly) {\n\t\t\tthis._localIdRequired += 1;\n\t\t\tthis._normalIdRequired += 1;\n\t\t}\n\t\tthis.doFit();\n\t\treturn this;\n\t}\n\n\tprotected doFit(): boolean {\n\t\tconst localIdRequired = this._localIdRequired;\n\t\tconst isLocalDirty = this._localId !== localIdRequired;\n\t\tconst normalIdRequired = this._normalIdRequired;\n\t\tconst isNormalDirty = this._normalId !== normalIdRequired;\n\t\tif (isLocalDirty || isNormalDirty) {\n\t\t\tthis._localId = localIdRequired;\n\t\t\tthis._normalId = normalIdRequired;\n\n\t\t\tconst acceptor = this._acceptor;\n\t\t\tconst acceptorShape = acceptor.shape;\n\t\t\tconst acceptorEdge = acceptor.edge;\n\t\t\tif (acceptorShape != null && acceptorEdge != null) {\n\t\t\t\tconst edge = EShapeAcceptors.get(acceptorShape.type).get(\n\t\t\t\t\tacceptorShape,\n\t\t\t\t\tacceptorEdge\n\t\t\t\t);\n\t\t\t\tif (edge) {\n\t\t\t\t\tconst oat = this._acceptorTransformOld;\n\t\t\t\t\tconst nat = this._acceptorTransformNew;\n\t\t\t\t\tthis.toAcceptorTransform(acceptorShape, nat);\n\n\t\t\t\t\tconst other = this._other;\n\t\t\t\t\tconst isOtherDangling =\n\t\t\t\t\t\tthis._hasAcceptorTransformOld &&\n\t\t\t\t\t\tother != null &&\n\t\t\t\t\t\tother.acceptor.shape == null;\n\t\t\t\t\tconst work = (EShapeConnectorEdgeImpl.WORK_MATRIX ??= new Matrix());\n\t\t\t\t\tif (isOtherDangling) {\n\t\t\t\t\t\toat.copyTo(work).invert().prepend(nat);\n\t\t\t\t\t}\n\t\t\t\t\tthis._acceptorTransformNew = oat;\n\t\t\t\t\tthis._acceptorTransformOld = nat;\n\t\t\t\t\tthis._hasAcceptorTransformOld = true;\n\n\t\t\t\t\tthis.lock();\n\t\t\t\t\tif (isLocalDirty) {\n\t\t\t\t\t\tconst l = this._local;\n\t\t\t\t\t\tconst olx = l.x;\n\t\t\t\t\t\tconst oly = l.y;\n\t\t\t\t\t\tconst size = acceptorShape.size;\n\t\t\t\t\t\tconst pivot = acceptorShape.transform.pivot;\n\t\t\t\t\t\tconst x = pivot.x + size.x * (acceptor.x ?? edge.x);\n\t\t\t\t\t\tconst y = pivot.y + size.y * (acceptor.y ?? edge.y);\n\t\t\t\t\t\tconst nlx = nat.a * x + nat.c * y + nat.tx;\n\t\t\t\t\t\tconst nly = nat.b * x + nat.d * y + nat.ty;\n\t\t\t\t\t\tl.set(nlx, nly);\n\n\t\t\t\t\t\tif (isOtherDangling) {\n\t\t\t\t\t\t\tconst ol = other.local;\n\t\t\t\t\t\t\tconst oolx = ol.x;\n\t\t\t\t\t\t\tconst ooly = ol.y;\n\t\t\t\t\t\t\tconst nolx = work.a * oolx + work.c * ooly + work.tx;\n\t\t\t\t\t\t\tconst noly = work.b * oolx + work.d * ooly + work.ty;\n\t\t\t\t\t\t\tconst odx = oolx - olx;\n\t\t\t\t\t\t\tconst ody = ooly - oly;\n\t\t\t\t\t\t\tconst ndx = nolx - nlx;\n\t\t\t\t\t\t\tconst ndy = noly - nly;\n\t\t\t\t\t\t\tconst od = odx * odx + ody * ody;\n\t\t\t\t\t\t\tconst nd = ndx * ndx + ndy * ndy;\n\t\t\t\t\t\t\tif (0.000001 < nd) {\n\t\t\t\t\t\t\t\tconst f = Math.sqrt(od / nd);\n\t\t\t\t\t\t\t\tol.set(nlx + ndx * f, nly + ndy * f);\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\tol.set(nolx, noly);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tif (isNormalDirty) {\n\t\t\t\t\t\tconst en = edge.normal;\n\t\t\t\t\t\tconst enx = en.x;\n\t\t\t\t\t\tconst eny = en.y;\n\t\t\t\t\t\tconst nx = nat.a * enx + nat.c * eny;\n\t\t\t\t\t\tconst ny = nat.b * enx + nat.d * eny;\n\t\t\t\t\t\tconst sd = nx * nx + ny * ny;\n\t\t\t\t\t\tconst n = this._normal;\n\t\t\t\t\t\tif (0.000001 < sd) {\n\t\t\t\t\t\t\tconst f = 1 / Math.sqrt(sd);\n\t\t\t\t\t\t\tn.set(nx * f, ny * f);\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tn.set(enx, eny);\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tif (isOtherDangling) {\n\t\t\t\t\t\t\tconst on = other.normal;\n\t\t\t\t\t\t\tconst oonx = on.x;\n\t\t\t\t\t\t\tconst oony = on.y;\n\t\t\t\t\t\t\tconst nonx = work.a * oonx + work.c * oony;\n\t\t\t\t\t\t\tconst nony = work.b * oonx + work.d * oony;\n\t\t\t\t\t\t\tconst osd = nonx * nonx + nony * nony;\n\t\t\t\t\t\t\tif (0.000001 < osd) {\n\t\t\t\t\t\t\t\tconst f = 1 / Math.sqrt(osd);\n\t\t\t\t\t\t\t\ton.set(nonx * f, nony * f);\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\ton.set(oonx, oony);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tconst result = this._isLocalChanged || this._isNormalChanged;\n\t\t\t\t\tthis.unlock();\n\t\t\t\t\treturn result;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn false;\n\t}\n\n\tprotected toAcceptorTransform(shape: EShape, result: Matrix): Matrix {\n\t\tshape.updateTransform();\n\t\tconst parent = this._parent;\n\t\tconst parentParent = parent.parent;\n\t\tif (parentParent) {\n\t\t\tparent.updateTransform();\n\t\t\treturn result\n\t\t\t\t.copyFrom(parentParent.transform.worldTransform)\n\t\t\t\t.invert()\n\t\t\t\t.append(shape.transform.worldTransform);\n\t\t} else {\n\t\t\treturn result.copyFrom(shape.transform.worldTransform);\n\t\t}\n\t}\n\n\tonAcceptorChange(): void {\n\t\tif (0 < this._lockCount) {\n\t\t\tthis._isLocalChanged = false;\n\t\t\tthis._isNormalChanged = false;\n\t\t\tthis._isAcceptorChanged = true;\n\t\t\treturn;\n\t\t}\n\t\tthis._hasAcceptorTransformOld = false;\n\t\tthis.fit(true);\n\t}\n\n\tprotected onLocalChange(): void {\n\t\tif (0 < this._lockCount) {\n\t\t\tthis._isLocalChanged = true;\n\t\t\treturn;\n\t\t}\n\t\tthis._localIdRequired += 1;\n\t\tthis._localId = this._localIdRequired;\n\t\tthis._onChange();\n\t}\n\n\tprotected onNormalChange(): void {\n\t\tif (0 < this._lockCount) {\n\t\t\tthis._isNormalChanged = true;\n\t\t\treturn;\n\t\t}\n\t\tthis._normalIdRequired += 1;\n\t\tthis._normalId = this._normalIdRequired;\n\t\tthis._onChange();\n\t}\n\n\tprotected onOtherChange(): void {\n\t\tif (0 < this._lockCount) {\n\t\t\tthis._isOtherChanged = true;\n\t\t\treturn;\n\t\t}\n\t\tthis._onChange();\n\t}\n\n\tattach(): this {\n\t\tconst shape = this._acceptor.shape;\n\t\tif (shape) {\n\t\t\tshape.connector.add(this);\n\t\t}\n\t\treturn this;\n\t}\n\n\tdetach(): this {\n\t\tconst shape = this._acceptor.shape;\n\t\tif (shape) {\n\t\t\tshape.connector.remove(this);\n\t\t}\n\t\treturn this;\n\t}\n}\n"]}
|
|
1
|
+
{"version":3,"file":"e-shape-connector-edge-impl.js","sourceRoot":"","sources":["../../../../src/main/typescript/wcardinal/ui/shape/e-shape-connector-edge-impl.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAU,MAAM,EAAE,eAAe,EAAE,MAAM,SAAS,CAAC;AAE1D,OAAO,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;AAItD,OAAO,EAAE,+BAA+B,EAAE,MAAM,wCAAwC,CAAC;AAIzF,OAAO,EAAE,sBAAsB,EAAE,MAAM,8BAA8B,CAAC;AAEtE;IAwBC,iCAAY,MAAuB,EAAE,QAAoB;QAAzD,iBA+BC;QA9BA,IAAI,CAAC,OAAO,GAAG,MAAM,CAAC;QACtB,IAAI,CA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AG,IAAI,CAAC;YAC5B,OAAO;SACP;QACD,IAAI,CAAC,SAAS,EAAE,CAAC;IAClB,CAAC;IAED,wCAAM,GAAN;QACC,IAAM,KAAK,GAAG,IAAI,CAAC,SAAS,CAAC,KAAK,CAAC;QACnC,IAAI,KAAK,EAAE;YACV,IAAI,KAAK,CAAC,SAAS,CAAC,GAAG,CAAC,IAAI,CAAC,EAAE;gBAC9B,IAAI,CAAC,gBAAgB,EAAE,CAAC;aACxB;SACD;QACD,OAAO,IAAI,CAAC;IACb,CAAC;IAED,wCAAM,GAAN;QACC,IAAM,KAAK,GAAG,IAAI,CAAC,SAAS,CAAC,KAAK,CAAC;QACnC,IAAI,KAAK,EAAE;YACV,IAAI,KAAK,CAAC,SAAS,CAAC,MAAM,CAAC,IAAI,CAAC,EAAE;gBACjC,IAAI,CAAC,gBAAgB,EAAE,CAAC;aACxB;SACD;QACD,OAAO,IAAI,CAAC;IACb,CAAC;IACF,8BAAC;AAAD,CAAC,AA9cD,IA8cC","sourcesContent":["/*\n * Copyright (C) 2019 Toshiba Corporation\n * SPDX-License-Identifier: Apache-2.0\n */\n\nimport { IPoint, Matrix, ObservablePoint } from \"pixi.js\";\nimport { EShape } from \"./e-shape\";\nimport { EShapeAcceptors } from \"./e-shape-acceptors\";\nimport { EShapeConnector } from \"./e-shape-connector\";\nimport { EShapeConnectorEdge, EShapeConnectorEdgeSerialized } from \"./e-shape-connector-edge\";\nimport { EShapeConnectorEdgeAcceptor } from \"./e-shape-connector-edge-acceptor\";\nimport { EShapeConnectorEdgeAcceptorImpl } from \"./e-shape-connector-edge-acceptor-impl\";\nimport { EShapeResourceManagerDeserialization } from \"./e-shape-resource-manager-deserialization\";\nimport { EShapeResourceManagerSerialization } from \"./e-shape-resource-manager-serialization\";\nimport { EShapeUuidMapping } from \"./e-shape-uuid-mapping\";\nimport { EShapeAcceptorEdgeSide } from \"./e-shape-acceptor-edge-side\";\n\nexport class EShapeConnectorEdgeImpl implements EShapeConnectorEdge {\n\tprotected static WORK_MATRIX?: Matrix;\n\n\tprotected _parent: EShapeConnector;\n\tprotected _onChange: () => void;\n\tprotected _acceptor: EShapeConnectorEdgeAcceptor;\n\tprotected _acceptorTransformNew: Matrix;\n\tprotected _acceptorTransformOld: Matrix;\n\tprotected _hasAcceptorTransformOld: boolean;\n\tprotected _localIdRequired: number;\n\tprotected _localId: number;\n\tprotected _local: IPoint;\n\tprotected _normalIdRequired: number;\n\tprotected _normalId: number;\n\tprotected _normal: IPoint;\n\tprotected _side: EShapeAcceptorEdgeSide;\n\tprotected _margin: number;\n\tprotected _other: EShapeConnectorEdge | null;\n\tprotected _lockCount: number;\n\tprotected _isAcceptorChanged: boolean;\n\tprotected _isLocalChanged: boolean;\n\tprotected _isNormalChanged: boolean;\n\tprotected _isOtherChanged: boolean;\n\n\tconstructor(parent: EShapeConnector, onChange: () => void) {\n\t\tthis._parent = parent;\n\t\tthis._onChange = onChange;\n\t\tthis._acceptor = new EShapeConnectorEdgeAcceptorImpl(this);\n\t\tthis._acceptorTransformNew = new Matrix();\n\t\tthis._acceptorTransformOld = new Matrix();\n\t\tthis._hasAcceptorTransformOld = false;\n\n\t\tthis._local = new ObservablePoint((): void => {\n\t\t\tthis.onLocalChange();\n\t\t}, undefined);\n\t\tthis._localIdRequired = 0;\n\t\tthis._localId = 0;\n\n\t\tthis._normal = new ObservablePoint((): void => {\n\t\t\tthis.onNormalChange();\n\t\t}, undefined);\n\t\tthis._normalIdRequired = 0;\n\t\tthis._normalId = 0;\n\n\t\tthis._side = EShapeAcceptorEdgeSide.TOP;\n\n\t\tthis._margin = 0;\n\n\t\tthis._other = null;\n\n\t\tthis._lockCount = 0;\n\t\tthis._isAcceptorChanged = false;\n\t\tthis._isLocalChanged = false;\n\t\tthis._isNormalChanged = false;\n\t\tthis._isOtherChanged = false;\n\t}\n\n\tlock(): void {\n\t\tthis._lockCount += 1;\n\t\tif (this._lockCount === 1) {\n\t\t\tthis._isAcceptorChanged = false;\n\t\t\tthis._isLocalChanged = false;\n\t\t\tthis._isNormalChanged = false;\n\t\t\tthis._isOtherChanged = false;\n\t\t}\n\t}\n\n\tunlock(): void {\n\t\tthis._lockCount -= 1;\n\t\tif (this._lockCount === 0) {\n\t\t\tlet isChanged = false;\n\n\t\t\tif (this._isLocalChanged) {\n\t\t\t\tthis._localIdRequired += 1;\n\t\t\t\tthis._localId = this._localIdRequired;\n\t\t\t\tisChanged = true;\n\t\t\t}\n\n\t\t\tif (this._isNormalChanged) {\n\t\t\t\tthis._normalIdRequired += 1;\n\t\t\t\tthis._normalId = this._normalIdRequired;\n\t\t\t\tisChanged = true;\n\t\t\t}\n\n\t\t\tif (this._isOtherChanged) {\n\t\t\t\tisChanged = true;\n\t\t\t}\n\n\t\t\tif (this._isAcceptorChanged) {\n\t\t\t\tthis._hasAcceptorTransformOld = false;\n\t\t\t\tif (!this._isLocalChanged) {\n\t\t\t\t\tthis._localIdRequired += 1;\n\t\t\t\t}\n\t\t\t\tif (!this._isNormalChanged) {\n\t\t\t\t\tthis._normalIdRequired += 1;\n\t\t\t\t}\n\t\t\t\tif (this.doFit()) {\n\t\t\t\t\tisChanged = false;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif (isChanged) {\n\t\t\t\tthis._onChange();\n\t\t\t}\n\t\t}\n\t}\n\n\tget parent(): EShapeConnector {\n\t\treturn this._parent;\n\t}\n\n\tget acceptor(): EShapeConnectorEdgeAcceptor {\n\t\treturn this._acceptor;\n\t}\n\n\tget local(): IPoint {\n\t\treturn this._local;\n\t}\n\n\tget localId(): number {\n\t\treturn this._localId;\n\t}\n\n\tget normal(): IPoint {\n\t\treturn this._normal;\n\t}\n\n\tget normalId(): number {\n\t\treturn this._normalId;\n\t}\n\n\tget side(): EShapeAcceptorEdgeSide {\n\t\treturn this._side;\n\t}\n\n\tset side(side: EShapeAcceptorEdgeSide) {\n\t\tif (this._side !== side) {\n\t\t\tthis._side = side;\n\t\t\tthis.onOtherChange();\n\t\t}\n\t}\n\n\tget margin(): number {\n\t\treturn this._margin;\n\t}\n\n\tset margin(margin: number) {\n\t\tif (this._margin !== margin) {\n\t\t\tthis._margin = margin;\n\t\t\tthis.onOtherChange();\n\t\t}\n\t}\n\n\tget other(): EShapeConnectorEdge | null {\n\t\treturn this._other;\n\t}\n\n\tset other(other: EShapeConnectorEdge | null) {\n\t\tthis._other = other;\n\t}\n\n\tset(\n\t\tacceptorShape?: EShape | null,\n\t\tacceptorEdge?: string | null,\n\t\tacceptorX?: number | null,\n\t\tacceptorY?: number | null,\n\t\tmargin?: number,\n\t\tx?: number,\n\t\ty?: number,\n\t\tnx?: number,\n\t\tny?: number,\n\t\tside?: EShapeAcceptorEdgeSide\n\t): this {\n\t\tthis.lock();\n\t\tthis._acceptor.set(acceptorShape, acceptorEdge, acceptorX, acceptorY);\n\n\t\tconst local = this._local;\n\t\tif (x != null && y != null) {\n\t\t\tlocal.set(x, y);\n\t\t} else if (x != null) {\n\t\t\tlocal.x = x;\n\t\t} else if (y != null) {\n\t\t\tlocal.y = y;\n\t\t}\n\n\t\tconst normal = this._normal;\n\t\tif (nx != null && ny != null) {\n\t\t\tnormal.set(nx, ny);\n\t\t} else if (nx != null) {\n\t\t\tnormal.x = nx;\n\t\t} else if (ny != null) {\n\t\t\tnormal.y = ny;\n\t\t}\n\n\t\tif (side != null) {\n\t\t\tthis.side = side;\n\t\t}\n\n\t\tif (margin != null) {\n\t\t\tthis.margin = margin;\n\t\t}\n\n\t\tthis.unlock();\n\t\treturn this;\n\t}\n\n\tcopy(source: EShapeConnectorEdge): this {\n\t\tthis.lock();\n\t\tthis._acceptor.copy(source.acceptor);\n\t\tthis._local.copyFrom(source.local);\n\t\tthis._normal.copyFrom(source.normal);\n\t\tthis.side = source.side;\n\t\tthis.margin = source.margin;\n\t\tthis.unlock();\n\t\treturn this;\n\t}\n\n\tserialize(manager: EShapeResourceManagerSerialization): number {\n\t\tconst acceptor = this._acceptor;\n\t\tconst shape = acceptor.shape;\n\t\tconst shapeUuid = shape ? shape.uuid : null;\n\t\tconst edge = acceptor.edge;\n\t\tconst edgeId = edge != null ? manager.addResource(edge) : -1;\n\t\tconst local = this._local;\n\t\tconst normal = this._normal;\n\t\tconst side = this._side;\n\t\treturn manager.addResource(\n\t\t\t`[${shapeUuid},${edgeId},${local.x},${local.y},${this._margin},${normal.x},${normal.y},${acceptor.x},${acceptor.y},${side}]`\n\t\t);\n\t}\n\n\tdeserialize(\n\t\tresourceId: number,\n\t\tmapping: EShapeUuidMapping,\n\t\tmanager: EShapeResourceManagerDeserialization\n\t): void {\n\t\tconst resources = manager.resources;\n\t\tif (0 <= resourceId && resourceId < resources.length) {\n\t\t\tlet parsed = manager.getExtension<EShapeConnectorEdgeSerialized>(resourceId);\n\t\t\tif (parsed == null) {\n\t\t\t\tparsed = JSON.parse(resources[resourceId]) as EShapeConnectorEdgeSerialized;\n\t\t\t\tmanager.setExtension(resourceId, parsed);\n\t\t\t}\n\t\t\tlet shape: EShape | null = null;\n\t\t\tconst shapeUuid = parsed[0];\n\t\t\tif (shapeUuid != null) {\n\t\t\t\tshape = mapping.find(shapeUuid) || null;\n\t\t\t}\n\t\t\tthis.lock();\n\t\t\tconst acceptor = this._acceptor;\n\t\t\tacceptor.shape = shape;\n\t\t\tconst edgeId = parsed[1];\n\t\t\tacceptor.edge = 0 <= edgeId && edgeId < resources.length ? resources[edgeId] : null;\n\t\t\tacceptor.x = parsed[7] ?? null;\n\t\t\tacceptor.y = parsed[8] ?? null;\n\t\t\tthis._local.set(parsed[2], parsed[3]);\n\t\t\tconst normalX = parsed[5];\n\t\t\tconst normalY = parsed[6];\n\t\t\tconst normal = this._normal;\n\t\t\tif (normalX != null && normalY != null) {\n\t\t\t\tnormal.set(normalX, normalY);\n\t\t\t} else {\n\t\t\t\tnormal.set(1, 0);\n\t\t\t}\n\t\t\tthis.side = parsed[9] ?? EShapeAcceptorEdgeSide.TOP;\n\t\t\tthis.margin = parsed[4] || 0;\n\t\t\tthis.unlock();\n\t\t\tif (shape) {\n\t\t\t\tshape.connector.add(this);\n\t\t\t}\n\t\t}\n\t}\n\n\tfit(forcibly?: boolean): this {\n\t\tif (forcibly) {\n\t\t\tthis._localIdRequired += 1;\n\t\t\tthis._normalIdRequired += 1;\n\t\t}\n\t\tthis.doFit();\n\t\treturn this;\n\t}\n\n\tprotected doFit(): boolean {\n\t\tconst localIdRequired = this._localIdRequired;\n\t\tconst isLocalDirty = this._localId !== localIdRequired;\n\t\tconst normalIdRequired = this._normalIdRequired;\n\t\tconst isNormalDirty = this._normalId !== normalIdRequired;\n\t\tif (isLocalDirty || isNormalDirty) {\n\t\t\tthis._localId = localIdRequired;\n\t\t\tthis._normalId = normalIdRequired;\n\n\t\t\tconst acceptor = this._acceptor;\n\t\t\tconst acceptorShape = acceptor.shape;\n\t\t\tconst acceptorEdge = acceptor.edge;\n\t\t\tif (acceptorShape != null && acceptorEdge != null) {\n\t\t\t\tconst edge = EShapeAcceptors.get(acceptorShape.type).get(\n\t\t\t\t\tacceptorShape,\n\t\t\t\t\tacceptorEdge\n\t\t\t\t);\n\t\t\t\tif (edge) {\n\t\t\t\t\tconst oat = this._acceptorTransformOld;\n\t\t\t\t\tconst nat = this._acceptorTransformNew;\n\t\t\t\t\tthis.toAcceptorTransform(acceptorShape, nat);\n\n\t\t\t\t\tconst other = this._other;\n\t\t\t\t\tconst isOtherDangling =\n\t\t\t\t\t\tthis._hasAcceptorTransformOld &&\n\t\t\t\t\t\tother != null &&\n\t\t\t\t\t\tother.acceptor.shape == null;\n\t\t\t\t\tconst work = (EShapeConnectorEdgeImpl.WORK_MATRIX ??= new Matrix());\n\t\t\t\t\tif (isOtherDangling) {\n\t\t\t\t\t\toat.copyTo(work).invert().prepend(nat);\n\t\t\t\t\t}\n\t\t\t\t\tthis._acceptorTransformNew = oat;\n\t\t\t\t\tthis._acceptorTransformOld = nat;\n\t\t\t\t\tthis._hasAcceptorTransformOld = true;\n\n\t\t\t\t\tthis.lock();\n\t\t\t\t\tif (isLocalDirty) {\n\t\t\t\t\t\tconst l = this._local;\n\t\t\t\t\t\tconst olx = l.x;\n\t\t\t\t\t\tconst oly = l.y;\n\t\t\t\t\t\tconst size = acceptorShape.size;\n\t\t\t\t\t\tconst pivot = acceptorShape.transform.pivot;\n\t\t\t\t\t\tconst x = pivot.x + size.x * (acceptor.x ?? edge.x);\n\t\t\t\t\t\tconst y = pivot.y + size.y * (acceptor.y ?? edge.y);\n\t\t\t\t\t\tconst nlx = nat.a * x + nat.c * y + nat.tx;\n\t\t\t\t\t\tconst nly = nat.b * x + nat.d * y + nat.ty;\n\t\t\t\t\t\tl.set(nlx, nly);\n\n\t\t\t\t\t\tif (isOtherDangling) {\n\t\t\t\t\t\t\tconst ol = other.local;\n\t\t\t\t\t\t\tconst oolx = ol.x;\n\t\t\t\t\t\t\tconst ooly = ol.y;\n\t\t\t\t\t\t\tconst nolx = work.a * oolx + work.c * ooly + work.tx;\n\t\t\t\t\t\t\tconst noly = work.b * oolx + work.d * ooly + work.ty;\n\t\t\t\t\t\t\tconst odx = oolx - olx;\n\t\t\t\t\t\t\tconst ody = ooly - oly;\n\t\t\t\t\t\t\tconst ndx = nolx - nlx;\n\t\t\t\t\t\t\tconst ndy = noly - nly;\n\t\t\t\t\t\t\tconst od = odx * odx + ody * ody;\n\t\t\t\t\t\t\tconst nd = ndx * ndx + ndy * ndy;\n\t\t\t\t\t\t\tif (0.000001 < nd) {\n\t\t\t\t\t\t\t\tconst f = Math.sqrt(od / nd);\n\t\t\t\t\t\t\t\tol.set(nlx + ndx * f, nly + ndy * f);\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\tol.set(nolx, noly);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tif (isNormalDirty) {\n\t\t\t\t\t\tconst en = edge.normal;\n\t\t\t\t\t\tconst enx = en.x;\n\t\t\t\t\t\tconst eny = en.y;\n\t\t\t\t\t\tconst nx = nat.a * enx + nat.c * eny;\n\t\t\t\t\t\tconst ny = nat.b * enx + nat.d * eny;\n\t\t\t\t\t\tconst sd = nx * nx + ny * ny;\n\t\t\t\t\t\tconst n = this._normal;\n\t\t\t\t\t\tif (0.000001 < sd) {\n\t\t\t\t\t\t\tconst f = 1 / Math.sqrt(sd);\n\t\t\t\t\t\t\tn.set(nx * f, ny * f);\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tn.set(enx, eny);\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tif (isOtherDangling) {\n\t\t\t\t\t\t\tconst on = other.normal;\n\t\t\t\t\t\t\tconst oonx = on.x;\n\t\t\t\t\t\t\tconst oony = on.y;\n\t\t\t\t\t\t\tconst nonx = work.a * oonx + work.c * oony;\n\t\t\t\t\t\t\tconst nony = work.b * oonx + work.d * oony;\n\t\t\t\t\t\t\tconst osd = nonx * nonx + nony * nony;\n\t\t\t\t\t\t\tif (0.000001 < osd) {\n\t\t\t\t\t\t\t\tconst f = 1 / Math.sqrt(osd);\n\t\t\t\t\t\t\t\ton.set(nonx * f, nony * f);\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\ton.set(oonx, oony);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tconst result = this._isLocalChanged || this._isNormalChanged;\n\t\t\t\t\tthis.unlock();\n\t\t\t\t\treturn result;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn false;\n\t}\n\n\tprotected toAcceptorTransform(shape: EShape, result: Matrix): Matrix {\n\t\tshape.updateTransform();\n\t\tconst parent = this._parent;\n\t\tconst parentParent = parent.parent;\n\t\tif (parentParent) {\n\t\t\tparent.updateTransform();\n\t\t\treturn result\n\t\t\t\t.copyFrom(parentParent.transform.worldTransform)\n\t\t\t\t.invert()\n\t\t\t\t.append(shape.transform.worldTransform);\n\t\t} else {\n\t\t\treturn result.copyFrom(shape.transform.worldTransform);\n\t\t}\n\t}\n\n\tonAcceptorChange(): void {\n\t\tif (0 < this._lockCount) {\n\t\t\tthis._isLocalChanged = false;\n\t\t\tthis._isNormalChanged = false;\n\t\t\tthis._isAcceptorChanged = true;\n\t\t\treturn;\n\t\t}\n\t\tthis._hasAcceptorTransformOld = false;\n\t\tthis.fit(true);\n\t}\n\n\tprotected onLocalChange(): void {\n\t\tif (0 < this._lockCount) {\n\t\t\tthis._isLocalChanged = true;\n\t\t\treturn;\n\t\t}\n\t\tthis._localIdRequired += 1;\n\t\tthis._localId = this._localIdRequired;\n\t\tthis._onChange();\n\t}\n\n\tprotected onNormalChange(): void {\n\t\tif (0 < this._lockCount) {\n\t\t\tthis._isNormalChanged = true;\n\t\t\treturn;\n\t\t}\n\t\tthis._normalIdRequired += 1;\n\t\tthis._normalId = this._normalIdRequired;\n\t\tthis._onChange();\n\t}\n\n\tprotected onOtherChange(): void {\n\t\tif (0 < this._lockCount) {\n\t\t\tthis._isOtherChanged = true;\n\t\t\treturn;\n\t\t}\n\t\tthis._onChange();\n\t}\n\n\tattach(): this {\n\t\tconst shape = this._acceptor.shape;\n\t\tif (shape) {\n\t\t\tif (shape.connector.add(this)) {\n\t\t\t\tthis.onAcceptorChange();\n\t\t\t}\n\t\t}\n\t\treturn this;\n\t}\n\n\tdetach(): this {\n\t\tconst shape = this._acceptor.shape;\n\t\tif (shape) {\n\t\t\tif (shape.connector.remove(this)) {\n\t\t\t\tthis.onAcceptorChange();\n\t\t\t}\n\t\t}\n\t\treturn this;\n\t}\n}\n"]}
|
package/dist/wcardinal-ui.cjs.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*
|
|
2
|
-
Winter Cardinal UI v0.
|
|
2
|
+
Winter Cardinal UI v0.333.0
|
|
3
3
|
Copyright (C) 2019 Toshiba Corporation
|
|
4
4
|
SPDX-License-Identifier: Apache-2.0
|
|
5
5
|
|
|
@@ -13780,7 +13780,8 @@ var DBase = /** @class */ (function (_super) {
|
|
|
13780
13780
|
_this._snippet = new DBaseSnippetContainer(_this);
|
|
13781
13781
|
_this._reflowable = new DBaseReflowableContainer();
|
|
13782
13782
|
_this._clearType = toEnum((_b = options === null || options === void 0 ? void 0 : options.clear) !== null && _b !== void 0 ? _b : theme.getClearType(), DLayoutClearType);
|
|
13783
|
-
_this._padding =
|
|
13783
|
+
_this._padding = _this.newPadding(theme, options, function () {
|
|
13784
|
+
_this.toDirty();
|
|
13784
13785
|
_this.toParentResized();
|
|
13785
13786
|
_this.toHierarchyDirty();
|
|
13786
13787
|
DApplications.update(_this);
|
|
@@ -14026,6 +14027,9 @@ var DBase = /** @class */ (function (_super) {
|
|
|
14026
14027
|
_this.emit("init", _this);
|
|
14027
14028
|
return _this;
|
|
14028
14029
|
}
|
|
14030
|
+
DBase.prototype.newPadding = function (theme, options, callback) {
|
|
14031
|
+
return new DBasePadding(theme, options, callback);
|
|
14032
|
+
};
|
|
14029
14033
|
DBase.prototype.toCursor = function (cursor, state) {
|
|
14030
14034
|
if (cursor) {
|
|
14031
14035
|
if (isFunction(cursor)) {
|
|
@@ -18360,14 +18364,18 @@ var EShapeConnectorEdgeImpl = /** @class */ (function () {
|
|
|
18360
18364
|
EShapeConnectorEdgeImpl.prototype.attach = function () {
|
|
18361
18365
|
var shape = this._acceptor.shape;
|
|
18362
18366
|
if (shape) {
|
|
18363
|
-
shape.connector.add(this)
|
|
18367
|
+
if (shape.connector.add(this)) {
|
|
18368
|
+
this.onAcceptorChange();
|
|
18369
|
+
}
|
|
18364
18370
|
}
|
|
18365
18371
|
return this;
|
|
18366
18372
|
};
|
|
18367
18373
|
EShapeConnectorEdgeImpl.prototype.detach = function () {
|
|
18368
18374
|
var shape = this._acceptor.shape;
|
|
18369
18375
|
if (shape) {
|
|
18370
|
-
shape.connector.remove(this)
|
|
18376
|
+
if (shape.connector.remove(this)) {
|
|
18377
|
+
this.onAcceptorChange();
|
|
18378
|
+
}
|
|
18371
18379
|
}
|
|
18372
18380
|
return this;
|
|
18373
18381
|
};
|
|
@@ -68360,128 +68368,66 @@ var DApplication = /** @class */ (function () {
|
|
|
68360
68368
|
* Copyright (C) 2019 Toshiba Corporation
|
|
68361
68369
|
* SPDX-License-Identifier: Apache-2.0
|
|
68362
68370
|
*/
|
|
68363
|
-
var DBasePaddingAdjustable = /** @class */ (function () {
|
|
68364
|
-
|
|
68365
|
-
|
|
68366
|
-
|
|
68367
|
-
|
|
68368
|
-
|
|
68369
|
-
|
|
68370
|
-
|
|
68371
|
-
|
|
68372
|
-
}
|
|
68371
|
+
var DBasePaddingAdjustable = /** @class */ (function (_super) {
|
|
68372
|
+
__extends(DBasePaddingAdjustable, _super);
|
|
68373
|
+
function DBasePaddingAdjustable(theme, options, callback) {
|
|
68374
|
+
var _this = _super.call(this, theme, options, callback) || this;
|
|
68375
|
+
_this._atop = 0;
|
|
68376
|
+
_this._aright = 0;
|
|
68377
|
+
_this._abottom = 0;
|
|
68378
|
+
_this._aleft = 0;
|
|
68379
|
+
return _this;
|
|
68373
68380
|
}
|
|
68374
|
-
DBasePaddingAdjustable.prototype.getTheme = function () {
|
|
68375
|
-
return this._target.getTheme();
|
|
68376
|
-
};
|
|
68377
|
-
DBasePaddingAdjustable.prototype.setTheme = function (theme) {
|
|
68378
|
-
this._target.setTheme(theme);
|
|
68379
|
-
};
|
|
68380
68381
|
DBasePaddingAdjustable.prototype.getLeft = function () {
|
|
68381
|
-
return
|
|
68382
|
+
return _super.prototype.getLeft.call(this) + this._aleft;
|
|
68382
68383
|
};
|
|
68383
|
-
DBasePaddingAdjustable.prototype.adjLeft = function (
|
|
68384
|
-
if (this.
|
|
68385
|
-
this.
|
|
68384
|
+
DBasePaddingAdjustable.prototype.adjLeft = function (aleft) {
|
|
68385
|
+
if (this._aleft !== aleft) {
|
|
68386
|
+
this._aleft = aleft;
|
|
68386
68387
|
var callback = this._callback;
|
|
68387
68388
|
if (callback) {
|
|
68388
68389
|
callback();
|
|
68389
68390
|
}
|
|
68390
68391
|
}
|
|
68391
68392
|
};
|
|
68392
|
-
Object.defineProperty(DBasePaddingAdjustable.prototype, "left", {
|
|
68393
|
-
get: function () {
|
|
68394
|
-
return this._target.left;
|
|
68395
|
-
},
|
|
68396
|
-
set: function (left) {
|
|
68397
|
-
this._target.left = left;
|
|
68398
|
-
},
|
|
68399
|
-
enumerable: false,
|
|
68400
|
-
configurable: true
|
|
68401
|
-
});
|
|
68402
68393
|
DBasePaddingAdjustable.prototype.getTop = function () {
|
|
68403
|
-
return
|
|
68394
|
+
return _super.prototype.getTop.call(this) + this._atop;
|
|
68404
68395
|
};
|
|
68405
|
-
DBasePaddingAdjustable.prototype.adjTop = function (
|
|
68406
|
-
if (this.
|
|
68407
|
-
this.
|
|
68396
|
+
DBasePaddingAdjustable.prototype.adjTop = function (atop) {
|
|
68397
|
+
if (this._atop !== atop) {
|
|
68398
|
+
this._atop = atop;
|
|
68408
68399
|
var callback = this._callback;
|
|
68409
68400
|
if (callback) {
|
|
68410
68401
|
callback();
|
|
68411
68402
|
}
|
|
68412
68403
|
}
|
|
68413
68404
|
};
|
|
68414
|
-
Object.defineProperty(DBasePaddingAdjustable.prototype, "top", {
|
|
68415
|
-
get: function () {
|
|
68416
|
-
return this._target.top;
|
|
68417
|
-
},
|
|
68418
|
-
set: function (top) {
|
|
68419
|
-
this._target.top = top;
|
|
68420
|
-
},
|
|
68421
|
-
enumerable: false,
|
|
68422
|
-
configurable: true
|
|
68423
|
-
});
|
|
68424
68405
|
DBasePaddingAdjustable.prototype.getRight = function () {
|
|
68425
|
-
return
|
|
68406
|
+
return _super.prototype.getRight.call(this) + this._aright;
|
|
68426
68407
|
};
|
|
68427
|
-
DBasePaddingAdjustable.prototype.adjRight = function (
|
|
68428
|
-
if (this.
|
|
68429
|
-
this.
|
|
68408
|
+
DBasePaddingAdjustable.prototype.adjRight = function (aright) {
|
|
68409
|
+
if (this._aright !== aright) {
|
|
68410
|
+
this._aright = aright;
|
|
68430
68411
|
var callback = this._callback;
|
|
68431
68412
|
if (callback) {
|
|
68432
68413
|
callback();
|
|
68433
68414
|
}
|
|
68434
68415
|
}
|
|
68435
68416
|
};
|
|
68436
|
-
Object.defineProperty(DBasePaddingAdjustable.prototype, "right", {
|
|
68437
|
-
get: function () {
|
|
68438
|
-
return this._target.right;
|
|
68439
|
-
},
|
|
68440
|
-
set: function (right) {
|
|
68441
|
-
this._target.right = right;
|
|
68442
|
-
},
|
|
68443
|
-
enumerable: false,
|
|
68444
|
-
configurable: true
|
|
68445
|
-
});
|
|
68446
68417
|
DBasePaddingAdjustable.prototype.getBottom = function () {
|
|
68447
|
-
return
|
|
68418
|
+
return _super.prototype.getBottom.call(this) + this._abottom;
|
|
68448
68419
|
};
|
|
68449
|
-
DBasePaddingAdjustable.prototype.adjBottom = function (
|
|
68450
|
-
if (this.
|
|
68451
|
-
this.
|
|
68420
|
+
DBasePaddingAdjustable.prototype.adjBottom = function (abottom) {
|
|
68421
|
+
if (this._abottom !== abottom) {
|
|
68422
|
+
this._abottom = abottom;
|
|
68452
68423
|
var callback = this._callback;
|
|
68453
68424
|
if (callback) {
|
|
68454
68425
|
callback();
|
|
68455
68426
|
}
|
|
68456
68427
|
}
|
|
68457
68428
|
};
|
|
68458
|
-
Object.defineProperty(DBasePaddingAdjustable.prototype, "bottom", {
|
|
68459
|
-
get: function () {
|
|
68460
|
-
return this._target.bottom;
|
|
68461
|
-
},
|
|
68462
|
-
set: function (bottom) {
|
|
68463
|
-
this._target.bottom = bottom;
|
|
68464
|
-
},
|
|
68465
|
-
enumerable: false,
|
|
68466
|
-
configurable: true
|
|
68467
|
-
});
|
|
68468
|
-
DBasePaddingAdjustable.prototype.set = function (top, right, bottom, left) {
|
|
68469
|
-
var target = this._target;
|
|
68470
|
-
if (right == null) {
|
|
68471
|
-
target.set(top);
|
|
68472
|
-
}
|
|
68473
|
-
else if (bottom == null) {
|
|
68474
|
-
target.set(top, right);
|
|
68475
|
-
}
|
|
68476
|
-
else if (left == null) {
|
|
68477
|
-
target.set(top, right, bottom);
|
|
68478
|
-
}
|
|
68479
|
-
else {
|
|
68480
|
-
target.set(top, right, bottom, left);
|
|
68481
|
-
}
|
|
68482
|
-
};
|
|
68483
68429
|
return DBasePaddingAdjustable;
|
|
68484
|
-
}());
|
|
68430
|
+
}(DBasePadding));
|
|
68485
68431
|
|
|
68486
68432
|
/*
|
|
68487
68433
|
* Copyright (C) 2019 Toshiba Corporation
|
|
@@ -87474,11 +87420,12 @@ var DTableBodyCellInputText = /** @class */ (function (_super) {
|
|
|
87474
87420
|
*/
|
|
87475
87421
|
var DTableBodyCellInputTreeInput = /** @class */ (function (_super) {
|
|
87476
87422
|
__extends(DTableBodyCellInputTreeInput, _super);
|
|
87477
|
-
function DTableBodyCellInputTreeInput(
|
|
87478
|
-
|
|
87479
|
-
_this._padding = new DBasePaddingAdjustable(_this._padding);
|
|
87480
|
-
return _this;
|
|
87423
|
+
function DTableBodyCellInputTreeInput() {
|
|
87424
|
+
return _super !== null && _super.apply(this, arguments) || this;
|
|
87481
87425
|
}
|
|
87426
|
+
DTableBodyCellInputTreeInput.prototype.newPadding = function (theme, options, callback) {
|
|
87427
|
+
return new DBasePaddingAdjustable(theme, options, callback);
|
|
87428
|
+
};
|
|
87482
87429
|
Object.defineProperty(DTableBodyCellInputTreeInput.prototype, "padding", {
|
|
87483
87430
|
get: function () {
|
|
87484
87431
|
return this._padding;
|
|
@@ -88010,12 +87957,12 @@ var DTableBodyCellTime = /** @class */ (function (_super) {
|
|
|
88010
87957
|
var DTableBodyCellTree = /** @class */ (function (_super) {
|
|
88011
87958
|
__extends(DTableBodyCellTree, _super);
|
|
88012
87959
|
function DTableBodyCellTree(columnIndex, column, onChange, options) {
|
|
88013
|
-
var _this = this;
|
|
88014
87960
|
var _a;
|
|
88015
|
-
|
|
88016
|
-
_this._padding = new DBasePaddingAdjustable(_this._padding);
|
|
88017
|
-
return _this;
|
|
87961
|
+
return _super.call(this, columnIndex, column, onChange, DLinks.toStateOptions((_a = options === null || options === void 0 ? void 0 : options.link) === null || _a === void 0 ? void 0 : _a.target, options)) || this;
|
|
88018
87962
|
}
|
|
87963
|
+
DTableBodyCellTree.prototype.newPadding = function (theme, options, callback) {
|
|
87964
|
+
return new DBasePaddingAdjustable(theme, options, callback);
|
|
87965
|
+
};
|
|
88019
87966
|
DTableBodyCellTree.prototype.onClick = function (e) {
|
|
88020
87967
|
var _a;
|
|
88021
87968
|
if (((_a = this.link) === null || _a === void 0 ? void 0 : _a.onClick(this, e)) !== true) {
|
|
@@ -93086,10 +93033,12 @@ var DTreeItemText = /** @class */ (function (_super) {
|
|
|
93086
93033
|
__extends(DTreeItemText, _super);
|
|
93087
93034
|
function DTreeItemText(data, options) {
|
|
93088
93035
|
var _this = _super.call(this, options) || this;
|
|
93089
|
-
_this._padding = new DBasePaddingAdjustable(_this._padding);
|
|
93090
93036
|
_this._data = data;
|
|
93091
93037
|
return _this;
|
|
93092
93038
|
}
|
|
93039
|
+
DTreeItemText.prototype.newPadding = function (theme, options, callback) {
|
|
93040
|
+
return new DBasePaddingAdjustable(theme, options, callback);
|
|
93041
|
+
};
|
|
93093
93042
|
Object.defineProperty(DTreeItemText.prototype, "node", {
|
|
93094
93043
|
get: function () {
|
|
93095
93044
|
return this._node;
|