@wcardinal/wcardinal-ui 0.372.0 → 0.373.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.
Files changed (82) hide show
  1. package/dist/types/wcardinal/ui/shape/e-shape-connector-container-impl.d.ts +1 -1
  2. package/dist/types/wcardinal/ui/shape/e-shape-connector-container.d.ts +2 -1
  3. package/dist/types/wcardinal/ui/shape/e-shape-connector-edge-container-impl.d.ts +2 -1
  4. package/dist/types/wcardinal/ui/shape/e-shape-connector-edge-container.d.ts +2 -1
  5. package/dist/types/wcardinal/ui/shape/e-shape-connector-edge-impl.d.ts +1 -1
  6. package/dist/types/wcardinal/ui/shape/e-shape-connector-edge.d.ts +1 -1
  7. package/dist/types/wcardinal/ui/shape/e-shape-deleter.d.ts +2 -0
  8. package/dist/types/wcardinal/ui/shape/e-shape.d.ts +6 -8
  9. package/dist/types/wcardinal/ui/shape/variant/e-shape-base.d.ts +10 -13
  10. package/dist/types/wcardinal/ui/shape/variant/e-shape-connector-line.d.ts +6 -5
  11. package/dist/types/wcardinal/ui/shape/variant/e-shape-group-size-parent.d.ts +4 -3
  12. package/dist/types/wcardinal/ui/shape/variant/e-shape-lock-part.d.ts +8 -0
  13. package/dist/types/wcardinal/ui/shape/variant/e-shape-lock.d.ts +9 -0
  14. package/dist/types/wcardinal/ui/shape/variant/index.d.ts +2 -0
  15. package/dist/wcardinal/ui/d-chart-axis-base-bar.js +3 -2
  16. package/dist/wcardinal/ui/d-chart-axis-base-bar.js.map +1 -1
  17. package/dist/wcardinal/ui/d-chart-axis-base-tick-container.js +7 -6
  18. package/dist/wcardinal/ui/d-chart-axis-base-tick-container.js.map +1 -1
  19. package/dist/wcardinal/ui/d-chart-axis-guide-simple-shape-impl.js +7 -6
  20. package/dist/wcardinal/ui/d-chart-axis-guide-simple-shape-impl.js.map +1 -1
  21. package/dist/wcardinal/ui/d-chart-series-line-of-any.js +3 -2
  22. package/dist/wcardinal/ui/d-chart-series-line-of-any.js.map +1 -1
  23. package/dist/wcardinal/ui/d-chart-series-line.js +3 -2
  24. package/dist/wcardinal/ui/d-chart-series-line.js.map +1 -1
  25. package/dist/wcardinal/ui/d-chart-series-linear.js +3 -2
  26. package/dist/wcardinal/ui/d-chart-series-linear.js.map +1 -1
  27. package/dist/wcardinal/ui/d-diagram-canvas-editor-snap.js +5 -4
  28. package/dist/wcardinal/ui/d-diagram-canvas-editor-snap.js.map +1 -1
  29. package/dist/wcardinal/ui/shape/e-shape-capability.js +1 -1
  30. package/dist/wcardinal/ui/shape/e-shape-capability.js.map +1 -1
  31. package/dist/wcardinal/ui/shape/e-shape-connector-container-impl.js +4 -2
  32. package/dist/wcardinal/ui/shape/e-shape-connector-container-impl.js.map +1 -1
  33. package/dist/wcardinal/ui/shape/e-shape-connector-container.js.map +1 -1
  34. package/dist/wcardinal/ui/shape/e-shape-connector-edge-container-impl.js +3 -3
  35. package/dist/wcardinal/ui/shape/e-shape-connector-edge-container-impl.js.map +1 -1
  36. package/dist/wcardinal/ui/shape/e-shape-connector-edge-container.js.map +1 -1
  37. package/dist/wcardinal/ui/shape/e-shape-connector-edge-impl.js +2 -2
  38. package/dist/wcardinal/ui/shape/e-shape-connector-edge-impl.js.map +1 -1
  39. package/dist/wcardinal/ui/shape/e-shape-connector-edge.js.map +1 -1
  40. package/dist/wcardinal/ui/shape/e-shape-deleter.js +18 -2
  41. package/dist/wcardinal/ui/shape/e-shape-deleter.js.map +1 -1
  42. package/dist/wcardinal/ui/shape/e-shape-runtime-impl.js +5 -4
  43. package/dist/wcardinal/ui/shape/e-shape-runtime-impl.js.map +1 -1
  44. package/dist/wcardinal/ui/shape/e-shape-transforms.js +5 -4
  45. package/dist/wcardinal/ui/shape/e-shape-transforms.js.map +1 -1
  46. package/dist/wcardinal/ui/shape/e-shape.js.map +1 -1
  47. package/dist/wcardinal/ui/shape/variant/deserialize-connector-line.js +3 -2
  48. package/dist/wcardinal/ui/shape/variant/deserialize-connector-line.js.map +1 -1
  49. package/dist/wcardinal/ui/shape/variant/e-shape-base.js +59 -73
  50. package/dist/wcardinal/ui/shape/variant/e-shape-base.js.map +1 -1
  51. package/dist/wcardinal/ui/shape/variant/e-shape-connector-line.js +18 -18
  52. package/dist/wcardinal/ui/shape/variant/e-shape-connector-line.js.map +1 -1
  53. package/dist/wcardinal/ui/shape/variant/e-shape-group-size-editor.js +33 -26
  54. package/dist/wcardinal/ui/shape/variant/e-shape-group-size-editor.js.map +1 -1
  55. package/dist/wcardinal/ui/shape/variant/e-shape-group-size-layout.js +3 -2
  56. package/dist/wcardinal/ui/shape/variant/e-shape-group-size-layout.js.map +1 -1
  57. package/dist/wcardinal/ui/shape/variant/e-shape-group-size-parent.js.map +1 -1
  58. package/dist/wcardinal/ui/shape/variant/e-shape-group.js +2 -0
  59. package/dist/wcardinal/ui/shape/variant/e-shape-group.js.map +1 -1
  60. package/dist/wcardinal/ui/shape/variant/e-shape-lock-part.js +8 -0
  61. package/dist/wcardinal/ui/shape/variant/e-shape-lock-part.js.map +1 -0
  62. package/dist/wcardinal/ui/shape/variant/e-shape-lock.js +31 -0
  63. package/dist/wcardinal/ui/shape/variant/e-shape-lock.js.map +1 -0
  64. package/dist/wcardinal/ui/shape/variant/index.js +2 -0
  65. package/dist/wcardinal/ui/shape/variant/index.js.map +1 -1
  66. package/dist/wcardinal/ui/shape/variant/to-resized.js +3 -2
  67. package/dist/wcardinal/ui/shape/variant/to-resized.js.map +1 -1
  68. package/dist/wcardinal/ui/theme/dark/d-theme-dark-atlas.js +1 -1
  69. package/dist/wcardinal/ui/theme/dark/d-theme-dark-atlas.js.map +1 -1
  70. package/dist/wcardinal/ui/theme/white/d-theme-white-atlas.js +1 -1
  71. package/dist/wcardinal/ui/theme/white/d-theme-white-atlas.js.map +1 -1
  72. package/dist/wcardinal-ui-theme-dark.js +2 -2
  73. package/dist/wcardinal-ui-theme-dark.min.js +2 -2
  74. package/dist/wcardinal-ui-theme-dark.min.js.map +1 -1
  75. package/dist/wcardinal-ui-theme-white.js +2 -2
  76. package/dist/wcardinal-ui-theme-white.min.js +2 -2
  77. package/dist/wcardinal-ui-theme-white.min.js.map +1 -1
  78. package/dist/wcardinal-ui.cjs.js +215 -168
  79. package/dist/wcardinal-ui.js +213 -166
  80. package/dist/wcardinal-ui.min.js +2 -2
  81. package/dist/wcardinal-ui.min.js.map +1 -1
  82. package/package.json +1 -1
@@ -1 +1 @@
1
- {"version":3,"file":"e-shape-runtime-impl.js","sourceRoot":"","sources":["../../../../src/main/typescript/wcardinal/ui/shape/e-shape-runtime-impl.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAKH,OAAO,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAC;AAClD,OAAO,EAAE,iBAAiB,EAAE,MAAM,6BAA6B,CAAC;AAIhE,OAAO,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AAG9C,OAAO,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAG7C,OAAO,EAAE,kBAAkB,EAAE,MAAM,yBAAyB,CAAC;AAE7D;IAkCC,2BAAY,KAAa;QACxB,IAAM,SAAS,GAAG,KAAK,CAAC,SAAS,CAAC;QAClC,IAAM,QAAQ,GAAG,SAAS,CAAC,QAAQ,CAAC;QACpC,IAAI,CAAC,CAAC,GAAG,QAAQ,CAAC,CAAC,CAAC;QACpB,IAAI,CAAC,CAAC,GAAG,QAAQ,CAAC,CAAC,CAAC;QACpB,IAAM,IAAI,GAAG,KAAK,CAAC,IAAI,CAAC;QACxB,IAAI,CAAC,KAAK,GAAG,IAAI,CAAC,CAAC,CAAC;QACpB,IAAI,CAAC,KAAK,GAAG,IAAI,CAAC,CAAC,CAAC;QACpB,IAAI,CAAC,QAAQ,GAAG,SAAS,CAAC,QAAQ,CAAC;QACnC,IAAI,CAAC,OAAO,GAAG,EAAE,CAAC;QAClB,IAAI,CAAC,IAAI,GAAG,KAAK,CAAC,IAAI,CAAC,QAAQ,EAAE,CAAC;QAClC,IAAI,CAAC,MAAM,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AAC,IAAI,CAAC,KAAK,GAAG,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC;aACnC;YACD,IAAI,MAAM,GAAG,kBAAkB,CAAC,MAAM,EAAE;gBACvC,KAAK,CAAC,MAAM,GAAG,IAAI,CAAC,MAAM,CAAC;aAC3B;SACD;IACF,CAAC;IAzfe,kCAAgB,GAAG;QAClC,WAAW,CAAC,OAAO;QACnB,WAAW,CAAC,WAAW;QACvB,WAAW,CAAC,IAAI;QAChB,WAAW,CAAC,EAAE;QACd,WAAW,CAAC,UAAU;QAEtB,WAAW,CAAC,aAAa;QACzB,WAAW,CAAC,UAAU;QACtB,WAAW,CAAC,QAAQ;QACpB,WAAW,CAAC,gBAAgB;QAE5B,WAAW,CAAC,SAAS;QACrB,WAAW,CAAC,WAAW;KACvB,CAAC;IA4eH,wBAAC;CAAA,AA3fD,IA2fC;SA3fY,iBAAiB","sourcesContent":["/*\n * Copyright (C) 2019 Toshiba Corporation\n * SPDX-License-Identifier: Apache-2.0\n */\n\nimport { interaction, Renderer } from \"pixi.js\";\nimport InteractionEvent = interaction.InteractionEvent;\nimport InteractionManager = interaction.InteractionManager;\nimport { DApplications } from \"../d-applications\";\nimport { UtilKeyboardEvent } from \"../util/util-keyboard-event\";\nimport { EShapeActionRuntime } from \"./action/e-shape-action-runtime\";\nimport { EShape } from \"./e-shape\";\nimport { EShapeFillLike } from \"./e-shape-fill\";\nimport { EShapeState } from \"./e-shape-state\";\nimport { EShapeStrokeLike } from \"./e-shape-stroke\";\nimport { EShapeTextLike } from \"./e-shape-text\";\nimport { DBaseState } from \"../d-base-state\";\nimport { DBaseStateSet } from \"../d-base-state-set\";\nimport { EShapeRuntime } from \"./e-shape-runtime\";\nimport { EShapeRuntimeReset } from \"./e-shape-runtime-reset\";\n\nexport class EShapeRuntimeImpl implements EShapeRuntime {\n\tstatic readonly TRANSIENT_STATES = [\n\t\tEShapeState.CLICKED,\n\t\tEShapeState.DBL_CLICKED,\n\t\tEShapeState.DOWN,\n\t\tEShapeState.UP,\n\t\tEShapeState.UP_OUTSIDE,\n\n\t\tEShapeState.RIGHT_CLICKED,\n\t\tEShapeState.RIGHT_DOWN,\n\t\tEShapeState.RIGHT_UP,\n\t\tEShapeState.RIGHT_UP_OUTSIDE,\n\n\t\tEShapeState.ACTIVATED,\n\t\tEShapeState.DEACTIVATED\n\t];\n\n\treadonly x: number;\n\treadonly y: number;\n\treadonly sizeX: number;\n\treadonly sizeY: number;\n\treadonly rotation: number;\n\treadonly actions: EShapeActionRuntime[];\n\treadonly fill: EShapeFillLike;\n\treadonly stroke: EShapeStrokeLike;\n\treadonly text: EShapeTextLike;\n\treadonly cursor?: string;\n\treadonly interactive: boolean;\n\n\treset: EShapeRuntimeReset;\n\twritten: EShapeRuntimeReset;\n\teffect: number;\n\tisStateChanged: boolean;\n\n\tconstructor(shape: EShape) {\n\t\tconst transform = shape.transform;\n\t\tconst position = transform.position;\n\t\tthis.x = position.x;\n\t\tthis.y = position.y;\n\t\tconst size = shape.size;\n\t\tthis.sizeX = size.x;\n\t\tthis.sizeY = size.y;\n\t\tthis.rotation = transform.rotation;\n\t\tthis.actions = [];\n\t\tthis.fill = shape.fill.toObject();\n\t\tthis.stroke = shape.stroke.toObject();\n\t\tthis.text = shape.text.toObject();\n\t\tthis.cursor = shape.cursor;\n\t\tthis.reset = EShapeRuntimeReset.NONE;\n\t\tthis.written = EShapeRuntimeReset.NONE;\n\t\tthis.effect = NaN;\n\t\tthis.isStateChanged = false;\n\t\tthis.interactive = false;\n\t}\n\n\tinitialize(shape: EShape): void {\n\t\tshape.disallowUploadedUpdate();\n\t\tconst actions = this.actions;\n\t\tfor (let i = 0, imax = actions.length; i < imax; ++i) {\n\t\t\tactions[i].initialize(shape, this);\n\t\t}\n\t\tshape.allowUploadedUpdate();\n\t}\n\n\tisActionable(): boolean {\n\t\treturn 0 < this.actions.length;\n\t}\n\n\tonResize(shape: EShape): void {\n\t\t// Actions\n\t\tconst actions = this.actions;\n\t\tfor (let i = 0, imax = actions.length; i < imax; ++i) {\n\t\t\tactions[i].onResize(shape, this);\n\t\t}\n\t}\n\n\tonClick(shape: EShape, e: InteractionEvent | KeyboardEvent): void {\n\t\t// State\n\t\tconst state = shape.state;\n\t\tif (state.isActionable) {\n\t\t\tstate.isClicked = true;\n\t\t}\n\n\t\t// Actions\n\t\tconst actions = this.actions;\n\t\tfor (let i = 0, imax = actions.length; i < imax; ++i) {\n\t\t\tactions[i].onClick(shape, this, e);\n\t\t}\n\t}\n\n\tonDblClick(\n\t\tshape: EShape,\n\t\te: MouseEvent | TouchEvent,\n\t\tinteractionManager: InteractionManager\n\t): boolean {\n\t\t// State\n\t\tconst state = shape.state;\n\t\tif (state.isActionable) {\n\t\t\tstate.isDblClicked = true;\n\t\t}\n\n\t\t// Actions\n\t\tconst actions = this.actions;\n\t\tfor (let i = 0, imax = actions.length; i < imax; ++i) {\n\t\t\tactions[i].onDblClick(shape, this, e, interactionManager);\n\t\t}\n\n\t\t// Done\n\t\treturn false;\n\t}\n\n\tonOver(shape: EShape, e: InteractionEvent): void {\n\t\tconst state = shape.state;\n\t\tif (!state.isHovered) {\n\t\t\t// State\n\t\t\tstate.isHovered = true;\n\n\t\t\t// Actions\n\t\t\tconst actions = this.actions;\n\t\t\tfor (let i = 0, imax = actions.length; i < imax; ++i) {\n\t\t\t\tactions[i].onOver(shape, this, e);\n\t\t\t}\n\t\t}\n\t}\n\n\tonOut(shape: EShape, e: InteractionEvent): void {\n\t\tconst state = shape.state;\n\t\tif (state.isHovered) {\n\t\t\t// State\n\t\t\tshape.state.isHovered = false;\n\n\t\t\t// Actions\n\t\t\tconst actions = this.actions;\n\t\t\tfor (let i = 0, imax = actions.length; i < imax; ++i) {\n\t\t\t\tactions[i].onOut(shape, this, e);\n\t\t\t}\n\t\t}\n\t}\n\n\tonDown(shape: EShape, e: InteractionEvent | KeyboardEvent): void {\n\t\t// Actions\n\t\tconst actions = this.actions;\n\t\tfor (let i = 0, imax = actions.length; i < imax; ++i) {\n\t\t\tactions[i].onDowning(shape, this, e);\n\t\t}\n\n\t\tconst state = shape.state;\n\t\tif (!state.isDown) {\n\t\t\tif (!state.isPressed) {\n\t\t\t\t// State\n\t\t\t\tstate.addAll(EShapeState.DOWN, DBaseState.PRESSED);\n\n\t\t\t\t// Focus\n\t\t\t\tconst layer = DApplications.getLayer(shape);\n\t\t\t\tif (layer) {\n\t\t\t\t\t// Focus\n\t\t\t\t\tconst focusController = layer.getFocusController();\n\t\t\t\t\tfocusController.focus(focusController.findParent(shape));\n\t\t\t\t}\n\n\t\t\t\t// Actions\n\t\t\t\tfor (let i = 0, imax = actions.length; i < imax; ++i) {\n\t\t\t\t\tconst action = actions[i];\n\t\t\t\t\taction.onDown(shape, this, e);\n\t\t\t\t\taction.onPressed(shape, this, e);\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t// State\n\t\t\t\tstate.isDown = true;\n\n\t\t\t\t// Focus\n\t\t\t\tconst layer = DApplications.getLayer(shape);\n\t\t\t\tif (layer) {\n\t\t\t\t\tconst focusController = layer.getFocusController();\n\t\t\t\t\tfocusController.focus(focusController.findParent(shape));\n\t\t\t\t}\n\n\t\t\t\t// Actions\n\t\t\t\tfor (let i = 0, imax = actions.length; i < imax; ++i) {\n\t\t\t\t\tactions[i].onDown(shape, this, e);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\tonUp(shape: EShape, e: InteractionEvent | KeyboardEvent): void {\n\t\tconst state = shape.state;\n\t\tif (!state.isUp) {\n\t\t\tif (state.isPressed) {\n\t\t\t\t// State\n\t\t\t\tstate.set(EShapeState.UP, DBaseState.PRESSED);\n\n\t\t\t\t// Actions\n\t\t\t\tconst actions = this.actions;\n\t\t\t\tfor (let i = 0, imax = actions.length; i < imax; ++i) {\n\t\t\t\t\tconst action = actions[i];\n\t\t\t\t\taction.onUp(shape, this, e);\n\t\t\t\t\taction.onUnpressed(shape, this, e);\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t// State\n\t\t\t\tstate.isUp = true;\n\n\t\t\t\t// Actions\n\t\t\t\tconst actions = this.actions;\n\t\t\t\tfor (let i = 0, imax = actions.length; i < imax; ++i) {\n\t\t\t\t\tactions[i].onUp(shape, this, e);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\tonUpOutside(shape: EShape, e: InteractionEvent): void {\n\t\tconst state = shape.state;\n\t\tif (state.isPressed) {\n\t\t\t// State\n\t\t\tstate.set(EShapeState.UP_OUTSIDE, DBaseState.PRESSED);\n\n\t\t\t// Actions\n\t\t\tconst actions = this.actions;\n\t\t\tfor (let i = 0, imax = actions.length; i < imax; ++i) {\n\t\t\t\tconst action = actions[i];\n\t\t\t\taction.onUpOutside(shape, this, e);\n\t\t\t\taction.onUnpressed(shape, this, e);\n\t\t\t}\n\t\t} else {\n\t\t\t// State\n\t\t\tstate.isUpOutside = true;\n\n\t\t\t// Actions\n\t\t\tconst actions = this.actions;\n\t\t\tfor (let i = 0, imax = actions.length; i < imax; ++i) {\n\t\t\t\tactions[i].onUpOutside(shape, this, e);\n\t\t\t}\n\t\t}\n\t}\n\n\tonMove(shape: EShape, e: InteractionEvent): void {\n\t\t// Actions\n\t\tconst actions = this.actions;\n\t\tfor (let i = 0, imax = actions.length; i < imax; ++i) {\n\t\t\tactions[i].onMove(shape, this, e);\n\t\t}\n\t}\n\n\tonKeyDown(shape: EShape, e: KeyboardEvent): boolean {\n\t\t// State\n\t\tif (UtilKeyboardEvent.isActivateKey(e)) {\n\t\t\tthis.onDown(shape, e);\n\t\t}\n\n\t\t// Actions\n\t\tconst actions = this.actions;\n\t\tfor (let i = 0, imax = actions.length; i < imax; ++i) {\n\t\t\tactions[i].onKeyDown(shape, this, e);\n\t\t}\n\n\t\t// Done\n\t\treturn false;\n\t}\n\n\tonKeyUp(shape: EShape, e: KeyboardEvent): boolean {\n\t\t// State\n\t\tif (UtilKeyboardEvent.isActivateKey(e)) {\n\t\t\tconst state = shape.state;\n\t\t\tif (state.isPressed) {\n\t\t\t\tconst wasUp = state.isUp;\n\t\t\t\tthis.onUp(shape, e);\n\t\t\t\tif (!wasUp && state.isUp) {\n\t\t\t\t\tthis.onClick(shape, e);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// Actions\n\t\tconst actions = this.actions;\n\t\tfor (let i = 0, imax = actions.length; i < imax; ++i) {\n\t\t\tactions[i].onKeyUp(shape, this, e);\n\t\t}\n\n\t\t// Done\n\t\treturn false;\n\t}\n\n\tonStateChange(shape: EShape, newState: DBaseStateSet, oldState: DBaseStateSet): void {\n\t\tthis.isStateChanged = true;\n\t\tDApplications.update(shape);\n\n\t\tif (newState.isFocused) {\n\t\t\tif (!oldState.isFocused) {\n\t\t\t\tthis.onFocus(shape);\n\t\t\t}\n\t\t} else if (oldState.isFocused) {\n\t\t\tthis.onBlur(shape);\n\t\t}\n\t}\n\n\tonFocus(shape: EShape): void {\n\t\t// Actions\n\t\tconst actions = this.actions;\n\t\tfor (let i = 0, imax = actions.length; i < imax; ++i) {\n\t\t\tactions[i].onFocus(shape, this);\n\t\t}\n\t}\n\n\tonBlur(shape: EShape): void {\n\t\t// Actions\n\t\tconst actions = this.actions;\n\t\tfor (let i = 0, imax = actions.length; i < imax; ++i) {\n\t\t\tactions[i].onBlur(shape, this);\n\t\t}\n\t}\n\n\tonRightClick(shape: EShape, e: InteractionEvent): void {\n\t\t// State\n\t\tconst state = shape.state;\n\t\tif (state.isActionable) {\n\t\t\tstate.isRightClicked = true;\n\t\t}\n\n\t\t// Actions\n\t\tconst actions = this.actions;\n\t\tfor (let i = 0, imax = actions.length; i < imax; ++i) {\n\t\t\tactions[i].onRightClick(shape, this, e);\n\t\t}\n\t}\n\n\tonRightDown(shape: EShape, e: InteractionEvent): void {\n\t\t// Actions\n\t\tconst actions = this.actions;\n\t\tfor (let i = 0, imax = actions.length; i < imax; ++i) {\n\t\t\tactions[i].onRightDowning(shape, this, e);\n\t\t}\n\n\t\tconst state = shape.state;\n\t\tif (!state.isRightDown) {\n\t\t\tif (state.isRightPressed) {\n\t\t\t\t// State\n\t\t\t\tstate.addAll(EShapeState.RIGHT_DOWN, EShapeState.RIGHT_PRESSED);\n\n\t\t\t\t// Focus\n\t\t\t\tconst layer = DApplications.getLayer(shape);\n\t\t\t\tif (layer) {\n\t\t\t\t\t// Focus\n\t\t\t\t\tconst focusController = layer.getFocusController();\n\t\t\t\t\tfocusController.focus(focusController.findParent(shape));\n\t\t\t\t}\n\n\t\t\t\t// Actions\n\t\t\t\tfor (let i = 0, imax = actions.length; i < imax; ++i) {\n\t\t\t\t\tconst action = actions[i];\n\t\t\t\t\taction.onRightDown(shape, this, e);\n\t\t\t\t\taction.onRightPressed(shape, this, e);\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t// State\n\t\t\t\tstate.isRightDown = false;\n\n\t\t\t\t// Focus\n\t\t\t\tconst layer = DApplications.getLayer(shape);\n\t\t\t\tif (layer) {\n\t\t\t\t\tconst focusController = layer.getFocusController();\n\t\t\t\t\tfocusController.focus(focusController.findParent(shape));\n\t\t\t\t}\n\n\t\t\t\t// Actions\n\t\t\t\tfor (let i = 0, imax = actions.length; i < imax; ++i) {\n\t\t\t\t\tactions[i].onRightDown(shape, this, e);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\tonRightUp(shape: EShape, e: InteractionEvent): void {\n\t\tconst state = shape.state;\n\t\tif (!state.isRightUp) {\n\t\t\tif (state.isRightPressed) {\n\t\t\t\t// State\n\t\t\t\tstate.set(EShapeState.RIGHT_UP, EShapeState.RIGHT_PRESSED);\n\n\t\t\t\t// Actions\n\t\t\t\tconst actions = this.actions;\n\t\t\t\tfor (let i = 0, imax = actions.length; i < imax; ++i) {\n\t\t\t\t\tconst action = actions[i];\n\t\t\t\t\taction.onRightUp(shape, this, e);\n\t\t\t\t\taction.onRightUnpressed(shape, this, e);\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t// State\n\t\t\t\tstate.isRightUp = true;\n\n\t\t\t\t// Actions\n\t\t\t\tconst actions = this.actions;\n\t\t\t\tfor (let i = 0, imax = actions.length; i < imax; ++i) {\n\t\t\t\t\tactions[i].onRightUp(shape, this, e);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\tonRightUpOutside(shape: EShape, e: InteractionEvent): void {\n\t\tconst state = shape.state;\n\t\tif (state.isRightPressed) {\n\t\t\t// State\n\t\t\tstate.set(EShapeState.RIGHT_UP_OUTSIDE, EShapeState.RIGHT_PRESSED);\n\n\t\t\t// Actions\n\t\t\tconst actions = this.actions;\n\t\t\tfor (let i = 0, imax = actions.length; i < imax; ++i) {\n\t\t\t\tconst action = actions[i];\n\t\t\t\taction.onRightUpOutside(shape, this, e);\n\t\t\t\taction.onRightUnpressed(shape, this, e);\n\t\t\t}\n\t\t} else {\n\t\t\t// State\n\t\t\tstate.isRightUpOutside = true;\n\n\t\t\t// Actions\n\t\t\tconst actions = this.actions;\n\t\t\tfor (let i = 0, imax = actions.length; i < imax; ++i) {\n\t\t\t\tactions[i].onRightUpOutside(shape, this, e);\n\t\t\t}\n\t\t}\n\t}\n\n\tupdate(shape: EShape, time: number): void {\n\t\tconst data = shape.data;\n\t\tconst isEffectTimeUp = this.effect <= time;\n\t\tif (data.isChanged || this.isStateChanged || isEffectTimeUp) {\n\t\t\tthis.isStateChanged = false;\n\t\t\tdata.isChanged = false;\n\t\t\tif (isEffectTimeUp) {\n\t\t\t\tthis.effect = NaN;\n\t\t\t}\n\t\t\tshape.disallowUploadedUpdate();\n\t\t\tthis.onUpdate(shape, time);\n\t\t\tshape.allowUploadedUpdate();\n\t\t\tconst wasStateChanged = this.isStateChanged;\n\t\t\tshape.state.removeAll(EShapeRuntimeImpl.TRANSIENT_STATES);\n\t\t\tthis.isStateChanged = wasStateChanged;\n\t\t}\n\t}\n\n\tonRender(shape: EShape, time: number, renderer: Renderer): void {\n\t\tconst actions = this.actions;\n\t\tfor (let i = 0, imax = actions.length; i < imax; ++i) {\n\t\t\tactions[i].onRender(shape, this, time, renderer);\n\t\t}\n\t\tthis.update(shape, time);\n\t}\n\n\tprotected onUpdate(shape: EShape, time: number): void {\n\t\tconst actions = this.actions;\n\t\tif (0 < actions.length) {\n\t\t\tthis.written = EShapeRuntimeReset.NONE;\n\t\t\tfor (let i = 0, imax = actions.length; i < imax; ++i) {\n\t\t\t\tactions[i].execute(shape, this, time);\n\t\t\t}\n\t\t\tthis.doReset(shape);\n\t\t}\n\t}\n\n\tprotected doReset(shape: EShape): void {\n\t\tconst target = ~this.written & this.reset;\n\t\tif (target !== EShapeRuntimeReset.NONE) {\n\t\t\tif (target & EShapeRuntimeReset.POSITION_X) {\n\t\t\t\tshape.transform.position.x = this.x;\n\t\t\t}\n\t\t\tif (target & EShapeRuntimeReset.POSITION_Y) {\n\t\t\t\tshape.transform.position.y = this.y;\n\t\t\t}\n\t\t\tif (target & EShapeRuntimeReset.VISIBILITY) {\n\t\t\t\tshape.visible = true;\n\t\t\t}\n\t\t\tif (target & EShapeRuntimeReset.COLOR_FILL) {\n\t\t\t\tconst fill = this.fill;\n\t\t\t\tshape.fill.set(undefined, fill.color, fill.alpha);\n\t\t\t}\n\t\t\tif (target & EShapeRuntimeReset.COLOR_STROKE) {\n\t\t\t\tconst stroke = this.stroke;\n\t\t\t\tshape.stroke.set(undefined, stroke.color, stroke.alpha);\n\t\t\t}\n\t\t\tif (target & EShapeRuntimeReset.COLOR_TEXT) {\n\t\t\t\tconst text = this.text;\n\t\t\t\tshape.text.set(undefined, text.color, text.alpha);\n\t\t\t}\n\t\t\tif (target & EShapeRuntimeReset.COLOR_TEXT_OUTLINE) {\n\t\t\t\tconst outline = this.text.outline;\n\t\t\t\tshape.text.outline.set(undefined, outline.color, outline.alpha);\n\t\t\t}\n\t\t\tif (target & EShapeRuntimeReset.HEIGHT) {\n\t\t\t\tshape.size.y = this.sizeY;\n\t\t\t}\n\t\t\tif (target & EShapeRuntimeReset.WIDTH) {\n\t\t\t\tshape.size.x = this.sizeX;\n\t\t\t}\n\t\t\tif (target & EShapeRuntimeReset.ROTATION) {\n\t\t\t\tshape.transform.rotation = this.rotation;\n\t\t\t}\n\t\t\tif (target & EShapeRuntimeReset.TEXT) {\n\t\t\t\tshape.text.value = this.text.value;\n\t\t\t}\n\t\t\tif (target & EShapeRuntimeReset.CURSOR) {\n\t\t\t\tshape.cursor = this.cursor;\n\t\t\t}\n\t\t}\n\t}\n}\n"]}
1
+ {"version":3,"file":"e-shape-runtime-impl.js","sourceRoot":"","sources":["../../../../src/main/typescript/wcardinal/ui/shape/e-shape-runtime-impl.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAKH,OAAO,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAC;AAClD,OAAO,EAAE,iBAAiB,EAAE,MAAM,6BAA6B,CAAC;AAIhE,OAAO,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AAG9C,OAAO,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAG7C,OAAO,EAAE,kBAAkB,EAAE,MAAM,yBAAyB,CAAC;AAC7D,OAAO,EAAE,cAAc,EAAE,MAAM,6BAA6B,CAAC;AAE7D;IAkCC,2BAAY,KAAa;QACxB,IAAM,SAAS,GAAG,KAAK,CAAC,SAAS,CAAC;QAClC,IAAM,QAAQ,GAAG,SAAS,CAAC,QAAQ,CAAC;QACpC,IAAI,CAAC,CAAC,GAAG,QAAQ,CAAC,CAAC,CAAC;QACpB,IAAI,CAAC,CAAC,GAAG,QAAQ,CAAC,CAAC,CAAC;QACpB,IAAM,IAAI,GAAG,KAAK,CAAC,IAAI,CAAC;QACxB,IAAI,CAAC,KAAK,GAAG,IAAI,CAAC,CAAC,CAAC;QACpB,IAAI,CAAC,KAAK,GAAG,IAAI,CAAC,CAAC,CAAC;QACpB,IAAI,CAAC,QAAQ,GAAG,SAAS,CAAC,QAAQ,CAAC;QACnC,IAAI,CAAC,OAAO,GAAG,EAAE,CAAC;QAClB,IAAI,CAAC,IAAI,GAAG,KAAK,CAAC,IAAI,CAAC,QAAQ,E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,EAAE;gBACzC,KAAK,CAAC,SAAS,CAAC,QAAQ,GAAG,IAAI,CAAC,QAAQ,CAAC;aACzC;YACD,IAAI,MAAM,GAAG,kBAAkB,CAAC,IAAI,EAAE;gBACrC,KAAK,CAAC,IAAI,CAAC,KAAK,GAAG,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC;aACnC;YACD,IAAI,MAAM,GAAG,kBAAkB,CAAC,MAAM,EAAE;gBACvC,KAAK,CAAC,MAAM,GAAG,IAAI,CAAC,MAAM,CAAC;aAC3B;SACD;IACF,CAAC;IAzfe,kCAAgB,GAAG;QAClC,WAAW,CAAC,OAAO;QACnB,WAAW,CAAC,WAAW;QACvB,WAAW,CAAC,IAAI;QAChB,WAAW,CAAC,EAAE;QACd,WAAW,CAAC,UAAU;QAEtB,WAAW,CAAC,aAAa;QACzB,WAAW,CAAC,UAAU;QACtB,WAAW,CAAC,QAAQ;QACpB,WAAW,CAAC,gBAAgB;QAE5B,WAAW,CAAC,SAAS;QACrB,WAAW,CAAC,WAAW;KACvB,CAAC;IA4eH,wBAAC;CAAA,AA3fD,IA2fC;SA3fY,iBAAiB","sourcesContent":["/*\n * Copyright (C) 2019 Toshiba Corporation\n * SPDX-License-Identifier: Apache-2.0\n */\n\nimport { interaction, Renderer } from \"pixi.js\";\nimport InteractionEvent = interaction.InteractionEvent;\nimport InteractionManager = interaction.InteractionManager;\nimport { DApplications } from \"../d-applications\";\nimport { UtilKeyboardEvent } from \"../util/util-keyboard-event\";\nimport { EShapeActionRuntime } from \"./action/e-shape-action-runtime\";\nimport { EShape } from \"./e-shape\";\nimport { EShapeFillLike } from \"./e-shape-fill\";\nimport { EShapeState } from \"./e-shape-state\";\nimport { EShapeStrokeLike } from \"./e-shape-stroke\";\nimport { EShapeTextLike } from \"./e-shape-text\";\nimport { DBaseState } from \"../d-base-state\";\nimport { DBaseStateSet } from \"../d-base-state-set\";\nimport { EShapeRuntime } from \"./e-shape-runtime\";\nimport { EShapeRuntimeReset } from \"./e-shape-runtime-reset\";\nimport { EShapeLockPart } from \"./variant/e-shape-lock-part\";\n\nexport class EShapeRuntimeImpl implements EShapeRuntime {\n\tstatic readonly TRANSIENT_STATES = [\n\t\tEShapeState.CLICKED,\n\t\tEShapeState.DBL_CLICKED,\n\t\tEShapeState.DOWN,\n\t\tEShapeState.UP,\n\t\tEShapeState.UP_OUTSIDE,\n\n\t\tEShapeState.RIGHT_CLICKED,\n\t\tEShapeState.RIGHT_DOWN,\n\t\tEShapeState.RIGHT_UP,\n\t\tEShapeState.RIGHT_UP_OUTSIDE,\n\n\t\tEShapeState.ACTIVATED,\n\t\tEShapeState.DEACTIVATED\n\t];\n\n\treadonly x: number;\n\treadonly y: number;\n\treadonly sizeX: number;\n\treadonly sizeY: number;\n\treadonly rotation: number;\n\treadonly actions: EShapeActionRuntime[];\n\treadonly fill: EShapeFillLike;\n\treadonly stroke: EShapeStrokeLike;\n\treadonly text: EShapeTextLike;\n\treadonly cursor?: string;\n\treadonly interactive: boolean;\n\n\treset: EShapeRuntimeReset;\n\twritten: EShapeRuntimeReset;\n\teffect: number;\n\tisStateChanged: boolean;\n\n\tconstructor(shape: EShape) {\n\t\tconst transform = shape.transform;\n\t\tconst position = transform.position;\n\t\tthis.x = position.x;\n\t\tthis.y = position.y;\n\t\tconst size = shape.size;\n\t\tthis.sizeX = size.x;\n\t\tthis.sizeY = size.y;\n\t\tthis.rotation = transform.rotation;\n\t\tthis.actions = [];\n\t\tthis.fill = shape.fill.toObject();\n\t\tthis.stroke = shape.stroke.toObject();\n\t\tthis.text = shape.text.toObject();\n\t\tthis.cursor = shape.cursor;\n\t\tthis.reset = EShapeRuntimeReset.NONE;\n\t\tthis.written = EShapeRuntimeReset.NONE;\n\t\tthis.effect = NaN;\n\t\tthis.isStateChanged = false;\n\t\tthis.interactive = false;\n\t}\n\n\tinitialize(shape: EShape): void {\n\t\tshape.lock(EShapeLockPart.UPLOADED);\n\t\tconst actions = this.actions;\n\t\tfor (let i = 0, imax = actions.length; i < imax; ++i) {\n\t\t\tactions[i].initialize(shape, this);\n\t\t}\n\t\tshape.unlock(EShapeLockPart.UPLOADED, true);\n\t}\n\n\tisActionable(): boolean {\n\t\treturn 0 < this.actions.length;\n\t}\n\n\tonResize(shape: EShape): void {\n\t\t// Actions\n\t\tconst actions = this.actions;\n\t\tfor (let i = 0, imax = actions.length; i < imax; ++i) {\n\t\t\tactions[i].onResize(shape, this);\n\t\t}\n\t}\n\n\tonClick(shape: EShape, e: InteractionEvent | KeyboardEvent): void {\n\t\t// State\n\t\tconst state = shape.state;\n\t\tif (state.isActionable) {\n\t\t\tstate.isClicked = true;\n\t\t}\n\n\t\t// Actions\n\t\tconst actions = this.actions;\n\t\tfor (let i = 0, imax = actions.length; i < imax; ++i) {\n\t\t\tactions[i].onClick(shape, this, e);\n\t\t}\n\t}\n\n\tonDblClick(\n\t\tshape: EShape,\n\t\te: MouseEvent | TouchEvent,\n\t\tinteractionManager: InteractionManager\n\t): boolean {\n\t\t// State\n\t\tconst state = shape.state;\n\t\tif (state.isActionable) {\n\t\t\tstate.isDblClicked = true;\n\t\t}\n\n\t\t// Actions\n\t\tconst actions = this.actions;\n\t\tfor (let i = 0, imax = actions.length; i < imax; ++i) {\n\t\t\tactions[i].onDblClick(shape, this, e, interactionManager);\n\t\t}\n\n\t\t// Done\n\t\treturn false;\n\t}\n\n\tonOver(shape: EShape, e: InteractionEvent): void {\n\t\tconst state = shape.state;\n\t\tif (!state.isHovered) {\n\t\t\t// State\n\t\t\tstate.isHovered = true;\n\n\t\t\t// Actions\n\t\t\tconst actions = this.actions;\n\t\t\tfor (let i = 0, imax = actions.length; i < imax; ++i) {\n\t\t\t\tactions[i].onOver(shape, this, e);\n\t\t\t}\n\t\t}\n\t}\n\n\tonOut(shape: EShape, e: InteractionEvent): void {\n\t\tconst state = shape.state;\n\t\tif (state.isHovered) {\n\t\t\t// State\n\t\t\tshape.state.isHovered = false;\n\n\t\t\t// Actions\n\t\t\tconst actions = this.actions;\n\t\t\tfor (let i = 0, imax = actions.length; i < imax; ++i) {\n\t\t\t\tactions[i].onOut(shape, this, e);\n\t\t\t}\n\t\t}\n\t}\n\n\tonDown(shape: EShape, e: InteractionEvent | KeyboardEvent): void {\n\t\t// Actions\n\t\tconst actions = this.actions;\n\t\tfor (let i = 0, imax = actions.length; i < imax; ++i) {\n\t\t\tactions[i].onDowning(shape, this, e);\n\t\t}\n\n\t\tconst state = shape.state;\n\t\tif (!state.isDown) {\n\t\t\tif (!state.isPressed) {\n\t\t\t\t// State\n\t\t\t\tstate.addAll(EShapeState.DOWN, DBaseState.PRESSED);\n\n\t\t\t\t// Focus\n\t\t\t\tconst layer = DApplications.getLayer(shape);\n\t\t\t\tif (layer) {\n\t\t\t\t\t// Focus\n\t\t\t\t\tconst focusController = layer.getFocusController();\n\t\t\t\t\tfocusController.focus(focusController.findParent(shape));\n\t\t\t\t}\n\n\t\t\t\t// Actions\n\t\t\t\tfor (let i = 0, imax = actions.length; i < imax; ++i) {\n\t\t\t\t\tconst action = actions[i];\n\t\t\t\t\taction.onDown(shape, this, e);\n\t\t\t\t\taction.onPressed(shape, this, e);\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t// State\n\t\t\t\tstate.isDown = true;\n\n\t\t\t\t// Focus\n\t\t\t\tconst layer = DApplications.getLayer(shape);\n\t\t\t\tif (layer) {\n\t\t\t\t\tconst focusController = layer.getFocusController();\n\t\t\t\t\tfocusController.focus(focusController.findParent(shape));\n\t\t\t\t}\n\n\t\t\t\t// Actions\n\t\t\t\tfor (let i = 0, imax = actions.length; i < imax; ++i) {\n\t\t\t\t\tactions[i].onDown(shape, this, e);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\tonUp(shape: EShape, e: InteractionEvent | KeyboardEvent): void {\n\t\tconst state = shape.state;\n\t\tif (!state.isUp) {\n\t\t\tif (state.isPressed) {\n\t\t\t\t// State\n\t\t\t\tstate.set(EShapeState.UP, DBaseState.PRESSED);\n\n\t\t\t\t// Actions\n\t\t\t\tconst actions = this.actions;\n\t\t\t\tfor (let i = 0, imax = actions.length; i < imax; ++i) {\n\t\t\t\t\tconst action = actions[i];\n\t\t\t\t\taction.onUp(shape, this, e);\n\t\t\t\t\taction.onUnpressed(shape, this, e);\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t// State\n\t\t\t\tstate.isUp = true;\n\n\t\t\t\t// Actions\n\t\t\t\tconst actions = this.actions;\n\t\t\t\tfor (let i = 0, imax = actions.length; i < imax; ++i) {\n\t\t\t\t\tactions[i].onUp(shape, this, e);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\tonUpOutside(shape: EShape, e: InteractionEvent): void {\n\t\tconst state = shape.state;\n\t\tif (state.isPressed) {\n\t\t\t// State\n\t\t\tstate.set(EShapeState.UP_OUTSIDE, DBaseState.PRESSED);\n\n\t\t\t// Actions\n\t\t\tconst actions = this.actions;\n\t\t\tfor (let i = 0, imax = actions.length; i < imax; ++i) {\n\t\t\t\tconst action = actions[i];\n\t\t\t\taction.onUpOutside(shape, this, e);\n\t\t\t\taction.onUnpressed(shape, this, e);\n\t\t\t}\n\t\t} else {\n\t\t\t// State\n\t\t\tstate.isUpOutside = true;\n\n\t\t\t// Actions\n\t\t\tconst actions = this.actions;\n\t\t\tfor (let i = 0, imax = actions.length; i < imax; ++i) {\n\t\t\t\tactions[i].onUpOutside(shape, this, e);\n\t\t\t}\n\t\t}\n\t}\n\n\tonMove(shape: EShape, e: InteractionEvent): void {\n\t\t// Actions\n\t\tconst actions = this.actions;\n\t\tfor (let i = 0, imax = actions.length; i < imax; ++i) {\n\t\t\tactions[i].onMove(shape, this, e);\n\t\t}\n\t}\n\n\tonKeyDown(shape: EShape, e: KeyboardEvent): boolean {\n\t\t// State\n\t\tif (UtilKeyboardEvent.isActivateKey(e)) {\n\t\t\tthis.onDown(shape, e);\n\t\t}\n\n\t\t// Actions\n\t\tconst actions = this.actions;\n\t\tfor (let i = 0, imax = actions.length; i < imax; ++i) {\n\t\t\tactions[i].onKeyDown(shape, this, e);\n\t\t}\n\n\t\t// Done\n\t\treturn false;\n\t}\n\n\tonKeyUp(shape: EShape, e: KeyboardEvent): boolean {\n\t\t// State\n\t\tif (UtilKeyboardEvent.isActivateKey(e)) {\n\t\t\tconst state = shape.state;\n\t\t\tif (state.isPressed) {\n\t\t\t\tconst wasUp = state.isUp;\n\t\t\t\tthis.onUp(shape, e);\n\t\t\t\tif (!wasUp && state.isUp) {\n\t\t\t\t\tthis.onClick(shape, e);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// Actions\n\t\tconst actions = this.actions;\n\t\tfor (let i = 0, imax = actions.length; i < imax; ++i) {\n\t\t\tactions[i].onKeyUp(shape, this, e);\n\t\t}\n\n\t\t// Done\n\t\treturn false;\n\t}\n\n\tonStateChange(shape: EShape, newState: DBaseStateSet, oldState: DBaseStateSet): void {\n\t\tthis.isStateChanged = true;\n\t\tDApplications.update(shape);\n\n\t\tif (newState.isFocused) {\n\t\t\tif (!oldState.isFocused) {\n\t\t\t\tthis.onFocus(shape);\n\t\t\t}\n\t\t} else if (oldState.isFocused) {\n\t\t\tthis.onBlur(shape);\n\t\t}\n\t}\n\n\tonFocus(shape: EShape): void {\n\t\t// Actions\n\t\tconst actions = this.actions;\n\t\tfor (let i = 0, imax = actions.length; i < imax; ++i) {\n\t\t\tactions[i].onFocus(shape, this);\n\t\t}\n\t}\n\n\tonBlur(shape: EShape): void {\n\t\t// Actions\n\t\tconst actions = this.actions;\n\t\tfor (let i = 0, imax = actions.length; i < imax; ++i) {\n\t\t\tactions[i].onBlur(shape, this);\n\t\t}\n\t}\n\n\tonRightClick(shape: EShape, e: InteractionEvent): void {\n\t\t// State\n\t\tconst state = shape.state;\n\t\tif (state.isActionable) {\n\t\t\tstate.isRightClicked = true;\n\t\t}\n\n\t\t// Actions\n\t\tconst actions = this.actions;\n\t\tfor (let i = 0, imax = actions.length; i < imax; ++i) {\n\t\t\tactions[i].onRightClick(shape, this, e);\n\t\t}\n\t}\n\n\tonRightDown(shape: EShape, e: InteractionEvent): void {\n\t\t// Actions\n\t\tconst actions = this.actions;\n\t\tfor (let i = 0, imax = actions.length; i < imax; ++i) {\n\t\t\tactions[i].onRightDowning(shape, this, e);\n\t\t}\n\n\t\tconst state = shape.state;\n\t\tif (!state.isRightDown) {\n\t\t\tif (state.isRightPressed) {\n\t\t\t\t// State\n\t\t\t\tstate.addAll(EShapeState.RIGHT_DOWN, EShapeState.RIGHT_PRESSED);\n\n\t\t\t\t// Focus\n\t\t\t\tconst layer = DApplications.getLayer(shape);\n\t\t\t\tif (layer) {\n\t\t\t\t\t// Focus\n\t\t\t\t\tconst focusController = layer.getFocusController();\n\t\t\t\t\tfocusController.focus(focusController.findParent(shape));\n\t\t\t\t}\n\n\t\t\t\t// Actions\n\t\t\t\tfor (let i = 0, imax = actions.length; i < imax; ++i) {\n\t\t\t\t\tconst action = actions[i];\n\t\t\t\t\taction.onRightDown(shape, this, e);\n\t\t\t\t\taction.onRightPressed(shape, this, e);\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t// State\n\t\t\t\tstate.isRightDown = false;\n\n\t\t\t\t// Focus\n\t\t\t\tconst layer = DApplications.getLayer(shape);\n\t\t\t\tif (layer) {\n\t\t\t\t\tconst focusController = layer.getFocusController();\n\t\t\t\t\tfocusController.focus(focusController.findParent(shape));\n\t\t\t\t}\n\n\t\t\t\t// Actions\n\t\t\t\tfor (let i = 0, imax = actions.length; i < imax; ++i) {\n\t\t\t\t\tactions[i].onRightDown(shape, this, e);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\tonRightUp(shape: EShape, e: InteractionEvent): void {\n\t\tconst state = shape.state;\n\t\tif (!state.isRightUp) {\n\t\t\tif (state.isRightPressed) {\n\t\t\t\t// State\n\t\t\t\tstate.set(EShapeState.RIGHT_UP, EShapeState.RIGHT_PRESSED);\n\n\t\t\t\t// Actions\n\t\t\t\tconst actions = this.actions;\n\t\t\t\tfor (let i = 0, imax = actions.length; i < imax; ++i) {\n\t\t\t\t\tconst action = actions[i];\n\t\t\t\t\taction.onRightUp(shape, this, e);\n\t\t\t\t\taction.onRightUnpressed(shape, this, e);\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t// State\n\t\t\t\tstate.isRightUp = true;\n\n\t\t\t\t// Actions\n\t\t\t\tconst actions = this.actions;\n\t\t\t\tfor (let i = 0, imax = actions.length; i < imax; ++i) {\n\t\t\t\t\tactions[i].onRightUp(shape, this, e);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\tonRightUpOutside(shape: EShape, e: InteractionEvent): void {\n\t\tconst state = shape.state;\n\t\tif (state.isRightPressed) {\n\t\t\t// State\n\t\t\tstate.set(EShapeState.RIGHT_UP_OUTSIDE, EShapeState.RIGHT_PRESSED);\n\n\t\t\t// Actions\n\t\t\tconst actions = this.actions;\n\t\t\tfor (let i = 0, imax = actions.length; i < imax; ++i) {\n\t\t\t\tconst action = actions[i];\n\t\t\t\taction.onRightUpOutside(shape, this, e);\n\t\t\t\taction.onRightUnpressed(shape, this, e);\n\t\t\t}\n\t\t} else {\n\t\t\t// State\n\t\t\tstate.isRightUpOutside = true;\n\n\t\t\t// Actions\n\t\t\tconst actions = this.actions;\n\t\t\tfor (let i = 0, imax = actions.length; i < imax; ++i) {\n\t\t\t\tactions[i].onRightUpOutside(shape, this, e);\n\t\t\t}\n\t\t}\n\t}\n\n\tupdate(shape: EShape, time: number): void {\n\t\tconst data = shape.data;\n\t\tconst isEffectTimeUp = this.effect <= time;\n\t\tif (data.isChanged || this.isStateChanged || isEffectTimeUp) {\n\t\t\tthis.isStateChanged = false;\n\t\t\tdata.isChanged = false;\n\t\t\tif (isEffectTimeUp) {\n\t\t\t\tthis.effect = NaN;\n\t\t\t}\n\t\t\tshape.lock(EShapeLockPart.UPLOADED);\n\t\t\tthis.onUpdate(shape, time);\n\t\t\tshape.unlock(EShapeLockPart.UPLOADED, true);\n\t\t\tconst wasStateChanged = this.isStateChanged;\n\t\t\tshape.state.removeAll(EShapeRuntimeImpl.TRANSIENT_STATES);\n\t\t\tthis.isStateChanged = wasStateChanged;\n\t\t}\n\t}\n\n\tonRender(shape: EShape, time: number, renderer: Renderer): void {\n\t\tconst actions = this.actions;\n\t\tfor (let i = 0, imax = actions.length; i < imax; ++i) {\n\t\t\tactions[i].onRender(shape, this, time, renderer);\n\t\t}\n\t\tthis.update(shape, time);\n\t}\n\n\tprotected onUpdate(shape: EShape, time: number): void {\n\t\tconst actions = this.actions;\n\t\tif (0 < actions.length) {\n\t\t\tthis.written = EShapeRuntimeReset.NONE;\n\t\t\tfor (let i = 0, imax = actions.length; i < imax; ++i) {\n\t\t\t\tactions[i].execute(shape, this, time);\n\t\t\t}\n\t\t\tthis.doReset(shape);\n\t\t}\n\t}\n\n\tprotected doReset(shape: EShape): void {\n\t\tconst target = ~this.written & this.reset;\n\t\tif (target !== EShapeRuntimeReset.NONE) {\n\t\t\tif (target & EShapeRuntimeReset.POSITION_X) {\n\t\t\t\tshape.transform.position.x = this.x;\n\t\t\t}\n\t\t\tif (target & EShapeRuntimeReset.POSITION_Y) {\n\t\t\t\tshape.transform.position.y = this.y;\n\t\t\t}\n\t\t\tif (target & EShapeRuntimeReset.VISIBILITY) {\n\t\t\t\tshape.visible = true;\n\t\t\t}\n\t\t\tif (target & EShapeRuntimeReset.COLOR_FILL) {\n\t\t\t\tconst fill = this.fill;\n\t\t\t\tshape.fill.set(undefined, fill.color, fill.alpha);\n\t\t\t}\n\t\t\tif (target & EShapeRuntimeReset.COLOR_STROKE) {\n\t\t\t\tconst stroke = this.stroke;\n\t\t\t\tshape.stroke.set(undefined, stroke.color, stroke.alpha);\n\t\t\t}\n\t\t\tif (target & EShapeRuntimeReset.COLOR_TEXT) {\n\t\t\t\tconst text = this.text;\n\t\t\t\tshape.text.set(undefined, text.color, text.alpha);\n\t\t\t}\n\t\t\tif (target & EShapeRuntimeReset.COLOR_TEXT_OUTLINE) {\n\t\t\t\tconst outline = this.text.outline;\n\t\t\t\tshape.text.outline.set(undefined, outline.color, outline.alpha);\n\t\t\t}\n\t\t\tif (target & EShapeRuntimeReset.HEIGHT) {\n\t\t\t\tshape.size.y = this.sizeY;\n\t\t\t}\n\t\t\tif (target & EShapeRuntimeReset.WIDTH) {\n\t\t\t\tshape.size.x = this.sizeX;\n\t\t\t}\n\t\t\tif (target & EShapeRuntimeReset.ROTATION) {\n\t\t\t\tshape.transform.rotation = this.rotation;\n\t\t\t}\n\t\t\tif (target & EShapeRuntimeReset.TEXT) {\n\t\t\t\tshape.text.value = this.text.value;\n\t\t\t}\n\t\t\tif (target & EShapeRuntimeReset.CURSOR) {\n\t\t\t\tshape.cursor = this.cursor;\n\t\t\t}\n\t\t}\n\t}\n}\n"]}
@@ -6,6 +6,7 @@ import { EShapeEditor } from "./e-shape-editor";
6
6
  import { EShapeBase } from "./variant/e-shape-base";
7
7
  import { toSizeNormalized } from "./variant/to-size-normalized";
8
8
  import { EShapeCapability } from "./e-shape-capability";
9
+ import { EShapeLockPart } from "./variant/e-shape-lock-part";
9
10
  var EShapeTransforms = /** @class */ (function () {
10
11
  function EShapeTransforms() {
11
12
  }
@@ -29,10 +30,10 @@ var EShapeTransforms = /** @class */ (function () {
29
30
  // Size
30
31
  editor.size.copyFrom(shape.size);
31
32
  //
32
- shape.disallowOnTransformChange();
33
+ shape.lock(EShapeLockPart.TRANSFORM);
33
34
  };
34
35
  EShapeTransforms.finalize = function (shape) {
35
- shape.allowOnTransformChange(true);
36
+ shape.unlock(EShapeLockPart.TRANSFORM, true);
36
37
  };
37
38
  EShapeTransforms.apply = function (shape, transform, capability) {
38
39
  var editor = shape.editor;
@@ -46,7 +47,7 @@ var EShapeTransforms = /** @class */ (function () {
46
47
  }
47
48
  };
48
49
  EShapeTransforms.applyLocal = function (shape, localTransform, capability, size) {
49
- shape.disallowUploadedUpdate();
50
+ shape.lock(EShapeLockPart.UPLOADED);
50
51
  // Reconstruct the position, the rotation and the size
51
52
  var a = localTransform.a;
52
53
  var b = localTransform.b;
@@ -106,7 +107,7 @@ var EShapeTransforms = /** @class */ (function () {
106
107
  }
107
108
  }
108
109
  //
109
- shape.allowUploadedUpdate();
110
+ shape.unlock(EShapeLockPart.UPLOADED, true);
110
111
  };
111
112
  return EShapeTransforms;
112
113
  }());
@@ -1 +1 @@
1
- {"version":3,"file":"e-shape-transforms.js","sourceRoot":"","sources":["../../../../src/main/typescript/wcardinal/ui/shape/e-shape-transforms.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAIH,OAAO,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAC;AAChD,OAAO,EAAE,UAAU,EAAE,MAAM,wBAAwB,CAAC;AACpD,OAAO,EAAE,gBAAgB,EAAE,MAAM,8BAA8B,CAAC;AAChE,OAAO,EAAE,gBAAgB,EAAE,MAAM,sBAAsB,CAAC;AAExD;IAAA;IAqHA,CAAC;IApHO,wBAAO,GAAd,UAAe,KAAa;QAC3B,IAAM,MAAM,GAAG,KAAK,CAAC,MAAM,IAAI,IAAI,YAAY,EAAE,CAAC;QAClD,KAAK,CAAC,MAAM,GAAG,MAAM,CAAC;QAEtB,YAAY;QACZ,KAAK,CAAC,eAAe,EAAE,CAAC;QACxB,IAAM,MAAM,GAAG,KAAK,CAAC,MAAM,CAAC;QAC5B,IAAI,MAAM,YAAY,UAAU,EAAE;YACjC,MAAM,CAAC,SAAS,CAAC,iBAAiB;iBAChC,MAAM,CAAC,MAAM,CAAC,8BAA8B,CAAC;iBAC7C,MAAM,EAAE,CAAC;SACX;aAAM;YACN,MAAM,CAAC,8BAA8B,CAAC,QAAQ,EAAE,CAAC;SACjD;QACD,KAAK,CAAC,SAAS,CAAC,iBAAiB,CAAC,MAAM,CAAC,MAAM,CAAC,iBAAiB,CAAC,CAAC;QAEnE,WAAW;QACX,MAAM,CAAC,QAAQ,GAAG,KAAK,CAAC,SAAS,CAAC,QAAQ,CAAC;QAE3C,OAAO;QACP,MAAM,CAAC,IAAI,CAAC,QAAQ,CAAC,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AC,EAAE,GAAG,CAAC,CAAC,GAAG,EAAE,GAAG,CAAC,GAAG,EAAE,CAAC,EAAE,EAAE,GAAG,CAAC,CAAC,GAAG,EAAE,GAAG,CAAC,GAAG,EAAE,CAAC,CAAC,CAAC;SACvE;QAED,QAAQ;QACR,IAAI,IAAI,IAAI,IAAI,IAAI,CAAC,MAAM,IAAI,OAAO,CAAC,EAAE;YACxC,IAAM,CAAC,GAAG,gBAAgB,CAAC,IAAI,CAAC,CAAC,GAAG,IAAI,CAAC,IAAI,CAAC,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;YAC9D,IAAM,CAAC,GAAG,gBAAgB,CAAC,IAAI,CAAC,CAAC,GAAG,IAAI,CAAC,IAAI,CAAC,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;YAC9D,IAAM,CAAC,GAAG,KAAK,CAAC,IAAI,CAAC;YACrB,IAAI,MAAM,IAAI,OAAO,EAAE;gBACtB,CAAC,CAAC,GAAG,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;aACZ;iBAAM,IAAI,MAAM,EAAE;gBAClB,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC;aACR;iBAAM;gBACN,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC;aACR;SACD;QAED,EAAE;QACF,KAAK,CAAC,mBAAmB,EAAE,CAAC;IAC7B,CAAC;IACF,uBAAC;AAAD,CAAC,AArHD,IAqHC","sourcesContent":["/*\n * Copyright (C) 2019 Toshiba Corporation\n * SPDX-License-Identifier: Apache-2.0\n */\n\nimport { IPoint, Matrix } from \"pixi.js\";\nimport { EShape } from \"./e-shape\";\nimport { EShapeEditor } from \"./e-shape-editor\";\nimport { EShapeBase } from \"./variant/e-shape-base\";\nimport { toSizeNormalized } from \"./variant/to-size-normalized\";\nimport { EShapeCapability } from \"./e-shape-capability\";\n\nexport class EShapeTransforms {\n\tstatic prepare(shape: EShape): void {\n\t\tconst editor = shape.editor || new EShapeEditor();\n\t\tshape.editor = editor;\n\n\t\t// Transform\n\t\tshape.updateTransform();\n\t\tconst parent = shape.parent;\n\t\tif (parent instanceof EShapeBase) {\n\t\t\tparent.transform.internalTransform\n\t\t\t\t.copyTo(editor.internalTransformParentInverse)\n\t\t\t\t.invert();\n\t\t} else {\n\t\t\teditor.internalTransformParentInverse.identity();\n\t\t}\n\t\tshape.transform.internalTransform.copyTo(editor.internalTransform);\n\n\t\t// Rotation\n\t\teditor.rotation = shape.transform.rotation;\n\n\t\t// Size\n\t\teditor.size.copyFrom(shape.size);\n\n\t\t//\n\t\tshape.disallowOnTransformChange();\n\t}\n\n\tstatic finalize(shape: EShape): void {\n\t\tshape.allowOnTransformChange(true);\n\t}\n\n\tstatic apply(shape: EShape, transform: Matrix, capability: EShapeCapability): void {\n\t\tconst editor = shape.editor;\n\t\tif (editor != null) {\n\t\t\tconst newLocalTransform = editor.localTransform;\n\t\t\teditor.internalTransformParentInverse\n\t\t\t\t.copyTo(newLocalTransform)\n\t\t\t\t.append(transform)\n\t\t\t\t.append(editor.internalTransform);\n\t\t\tthis.applyLocal(shape, newLocalTransform, capability, editor.size);\n\t\t}\n\t}\n\n\tstatic applyLocal(\n\t\tshape: EShape,\n\t\tlocalTransform: Matrix,\n\t\tcapability: EShapeCapability,\n\t\tsize?: IPoint\n\t): void {\n\t\tshape.disallowUploadedUpdate();\n\n\t\t// Reconstruct the position, the rotation and the size\n\t\tconst a = localTransform.a;\n\t\tconst b = localTransform.b;\n\t\tconst c = localTransform.c;\n\t\tconst d = localTransform.d;\n\t\tconst tx = localTransform.tx;\n\t\tconst ty = localTransform.ty;\n\n\t\t// Transform\n\t\tconst transform = shape.transform;\n\n\t\t// Capability\n\t\tconst cposition = !!(capability & EShapeCapability.POSITION);\n\t\tconst crotation = !!(capability & EShapeCapability.ROTATION);\n\t\tconst cskew = !!(capability & EShapeCapability.SKEW);\n\t\tconst cwidth = !!(capability & EShapeCapability.WIDTH);\n\t\tconst cheight = !!(capability & EShapeCapability.HEIGHT);\n\n\t\t// Rotation and skew\n\t\tif (crotation || cskew) {\n\t\t\t// Rotation\n\t\t\tconst rx = Math.atan2(-c, d); // rotation - skewX\n\t\t\tconst ry = Math.atan2(+b, a); // rotation + skewY\n\t\t\tif (crotation) {\n\t\t\t\ttransform.rotation = (rx + ry) * 0.5; // Here, assumes `skewX` === `skewY`\n\t\t\t}\n\n\t\t\t// Skew\n\t\t\tif (cskew) {\n\t\t\t\tconst skew = (ry - rx) * 0.5;\n\t\t\t\ttransform.skew.set(skew, skew);\n\t\t\t}\n\t\t}\n\n\t\t// Position\n\t\tif (cposition) {\n\t\t\t// Assumes the pivot is invariant.\n\t\t\t// tx = position.x - (a * px + c * py)\n\t\t\t// ty = position.y - (b * px + d * py)\n\t\t\t//\n\t\t\t// Thus,\n\t\t\t// position.x = tx + (a * px + c * py)\n\t\t\t// position.y = ty + (b * px + d * py)\n\t\t\tconst pivot = transform.pivot;\n\t\t\tconst px = pivot.x;\n\t\t\tconst py = pivot.y;\n\t\t\ttransform.position.set(tx + (a * px + c * py), ty + (b * px + d * py));\n\t\t}\n\n\t\t// Scale\n\t\tif (size != null && (cwidth || cheight)) {\n\t\t\tconst w = toSizeNormalized(size.x * Math.sqrt(a * a + b * b));\n\t\t\tconst h = toSizeNormalized(size.y * Math.sqrt(c * c + d * d));\n\t\t\tconst s = shape.size;\n\t\t\tif (cwidth && cheight) {\n\t\t\t\ts.set(w, h);\n\t\t\t} else if (cwidth) {\n\t\t\t\ts.x = w;\n\t\t\t} else {\n\t\t\t\ts.y = h;\n\t\t\t}\n\t\t}\n\n\t\t//\n\t\tshape.allowUploadedUpdate();\n\t}\n}\n"]}
1
+ {"version":3,"file":"e-shape-transforms.js","sourceRoot":"","sources":["../../../../src/main/typescript/wcardinal/ui/shape/e-shape-transforms.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAIH,OAAO,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAC;AAChD,OAAO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C,GAAG,gBAAgB,CAAC,IAAI,CAAC,CAAC,GAAG,IAAI,CAAC,IAAI,CAAC,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;YAC9D,IAAM,CAAC,GAAG,gBAAgB,CAAC,IAAI,CAAC,CAAC,GAAG,IAAI,CAAC,IAAI,CAAC,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;YAC9D,IAAM,CAAC,GAAG,KAAK,CAAC,IAAI,CAAC;YACrB,IAAI,MAAM,IAAI,OAAO,EAAE;gBACtB,CAAC,CAAC,GAAG,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;aACZ;iBAAM,IAAI,MAAM,EAAE;gBAClB,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC;aACR;iBAAM;gBACN,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC;aACR;SACD;QAED,EAAE;QACF,KAAK,CAAC,MAAM,CAAC,cAAc,CAAC,QAAQ,EAAE,IAAI,CAAC,CAAC;IAC7C,CAAC;IACF,uBAAC;AAAD,CAAC,AArHD,IAqHC","sourcesContent":["/*\n * Copyright (C) 2019 Toshiba Corporation\n * SPDX-License-Identifier: Apache-2.0\n */\n\nimport { IPoint, Matrix } from \"pixi.js\";\nimport { EShape } from \"./e-shape\";\nimport { EShapeEditor } from \"./e-shape-editor\";\nimport { EShapeBase } from \"./variant/e-shape-base\";\nimport { toSizeNormalized } from \"./variant/to-size-normalized\";\nimport { EShapeCapability } from \"./e-shape-capability\";\nimport { EShapeLockPart } from \"./variant/e-shape-lock-part\";\n\nexport class EShapeTransforms {\n\tstatic prepare(shape: EShape): void {\n\t\tconst editor = shape.editor || new EShapeEditor();\n\t\tshape.editor = editor;\n\n\t\t// Transform\n\t\tshape.updateTransform();\n\t\tconst parent = shape.parent;\n\t\tif (parent instanceof EShapeBase) {\n\t\t\tparent.transform.internalTransform\n\t\t\t\t.copyTo(editor.internalTransformParentInverse)\n\t\t\t\t.invert();\n\t\t} else {\n\t\t\teditor.internalTransformParentInverse.identity();\n\t\t}\n\t\tshape.transform.internalTransform.copyTo(editor.internalTransform);\n\n\t\t// Rotation\n\t\teditor.rotation = shape.transform.rotation;\n\n\t\t// Size\n\t\teditor.size.copyFrom(shape.size);\n\n\t\t//\n\t\tshape.lock(EShapeLockPart.TRANSFORM);\n\t}\n\n\tstatic finalize(shape: EShape): void {\n\t\tshape.unlock(EShapeLockPart.TRANSFORM, true);\n\t}\n\n\tstatic apply(shape: EShape, transform: Matrix, capability: EShapeCapability): void {\n\t\tconst editor = shape.editor;\n\t\tif (editor != null) {\n\t\t\tconst newLocalTransform = editor.localTransform;\n\t\t\teditor.internalTransformParentInverse\n\t\t\t\t.copyTo(newLocalTransform)\n\t\t\t\t.append(transform)\n\t\t\t\t.append(editor.internalTransform);\n\t\t\tthis.applyLocal(shape, newLocalTransform, capability, editor.size);\n\t\t}\n\t}\n\n\tstatic applyLocal(\n\t\tshape: EShape,\n\t\tlocalTransform: Matrix,\n\t\tcapability: EShapeCapability,\n\t\tsize?: IPoint\n\t): void {\n\t\tshape.lock(EShapeLockPart.UPLOADED);\n\n\t\t// Reconstruct the position, the rotation and the size\n\t\tconst a = localTransform.a;\n\t\tconst b = localTransform.b;\n\t\tconst c = localTransform.c;\n\t\tconst d = localTransform.d;\n\t\tconst tx = localTransform.tx;\n\t\tconst ty = localTransform.ty;\n\n\t\t// Transform\n\t\tconst transform = shape.transform;\n\n\t\t// Capability\n\t\tconst cposition = !!(capability & EShapeCapability.POSITION);\n\t\tconst crotation = !!(capability & EShapeCapability.ROTATION);\n\t\tconst cskew = !!(capability & EShapeCapability.SKEW);\n\t\tconst cwidth = !!(capability & EShapeCapability.WIDTH);\n\t\tconst cheight = !!(capability & EShapeCapability.HEIGHT);\n\n\t\t// Rotation and skew\n\t\tif (crotation || cskew) {\n\t\t\t// Rotation\n\t\t\tconst rx = Math.atan2(-c, d); // rotation - skewX\n\t\t\tconst ry = Math.atan2(+b, a); // rotation + skewY\n\t\t\tif (crotation) {\n\t\t\t\ttransform.rotation = (rx + ry) * 0.5; // Here, assumes `skewX` === `skewY`\n\t\t\t}\n\n\t\t\t// Skew\n\t\t\tif (cskew) {\n\t\t\t\tconst skew = (ry - rx) * 0.5;\n\t\t\t\ttransform.skew.set(skew, skew);\n\t\t\t}\n\t\t}\n\n\t\t// Position\n\t\tif (cposition) {\n\t\t\t// Assumes the pivot is invariant.\n\t\t\t// tx = position.x - (a * px + c * py)\n\t\t\t// ty = position.y - (b * px + d * py)\n\t\t\t//\n\t\t\t// Thus,\n\t\t\t// position.x = tx + (a * px + c * py)\n\t\t\t// position.y = ty + (b * px + d * py)\n\t\t\tconst pivot = transform.pivot;\n\t\t\tconst px = pivot.x;\n\t\t\tconst py = pivot.y;\n\t\t\ttransform.position.set(tx + (a * px + c * py), ty + (b * px + d * py));\n\t\t}\n\n\t\t// Scale\n\t\tif (size != null && (cwidth || cheight)) {\n\t\t\tconst w = toSizeNormalized(size.x * Math.sqrt(a * a + b * b));\n\t\t\tconst h = toSizeNormalized(size.y * Math.sqrt(c * c + d * d));\n\t\t\tconst s = shape.size;\n\t\t\tif (cwidth && cheight) {\n\t\t\t\ts.set(w, h);\n\t\t\t} else if (cwidth) {\n\t\t\t\ts.x = w;\n\t\t\t} else {\n\t\t\t\ts.y = h;\n\t\t\t}\n\t\t}\n\n\t\t//\n\t\tshape.unlock(EShapeLockPart.UPLOADED, true);\n\t}\n}\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"e-shape.js","sourceRoot":"","sources":["../../../../src/main/typescript/wcardinal/ui/shape/e-shape.ts"],"names":[],"mappings":"AAAA;;;GAGG","sourcesContent":["/*\n * Copyright (C) 2019 Toshiba Corporation\n * SPDX-License-Identifier: Apache-2.0\n */\n\nimport { DisplayObject, IPoint, Point, Rectangle, Renderer, Texture, utils } from \"pixi.js\";\nimport { DDiagramSerializedItem } from \"../d-diagram-serialized\";\nimport { EShapeAction } from \"./action/e-shape-action\";\nimport { EShapeContainer } from \"./e-shape-container\";\nimport { EShapeCopyPart } from \"./e-shape-copy-part\";\nimport { EShapeCorner } from \"./e-shape-corner\";\nimport { EShapeEditor } from \"./e-shape-editor\";\nimport { EShapeFill } from \"./e-shape-fill\";\nimport { EShapeGradientLike } from \"./e-shape-gradient\";\nimport { EShapeLayout } from \"./e-shape-layout\";\nimport { EShapePoints } from \"./e-shape-points\";\nimport { EShapeResourceManagerSerialization } from \"./e-shape-resource-manager-serialization\";\nimport { EShapeRuntime } from \"./e-shape-runtime\";\nimport { EShapeStateSet } from \"./e-shape-state-set\";\nimport { EShapeStroke } from \"./e-shape-stroke\";\nimport { EShapeData } from \"./e-shape-data\";\nimport { EShapeText } from \"./e-shape-text\";\nimport { EShapeTransform } from \"./e-shape-transform\";\nimport { EShapeType } from \"./e-shape-type\";\nimport { EShapeUploaded } from \"./e-shape-uploaded\";\nimport { EShapeConnectorContainer } from \"./e-shape-connector-container\";\nimport { EShapeCapabilityContainer } from \"./e-shape-capability-container\";\n\nexport interface EShape extends utils.EventEmitter {\n\tid: string; // Used to identity a shape by users\n\tuuid: number; // Used to identify a shape uniquely\n\treadonly type: EShapeType;\n\treadonly size: IPoint;\n\treadonly fill: EShapeFill;\n\treadonly stroke: EShapeStroke;\n\treadonly transform: EShapeTransform;\n\tradius: number;\n\tcorner: EShapeCorner;\n\treadonly points?: EShapePoints;\n\timage?: HTMLImageElement;\n\timageSrc?: string;\n\ttexture?: Texture;\n\tgradient?: EShapeGradientLike;\n\treadonly text: EShapeText;\n\t/** @deprecated in favor of {@link data}. */\n\treadonly tag: EShapeData;\n\treadonly data: EShapeData;\n\treadonly action: EShapeAction;\n\tcursor?: string;\n\tvisible: boolean;\n\treadonly worldVisible: boolean;\n\tinteractive: boolean;\n\tshortcut?: string;\n\ttitle?: string;\n\tconnector: EShapeConnectorContainer;\n\n\t// Hierarchy\n\tparent: EShapeContainer | EShape | null;\n\troot: EShape;\n\tchildren: EShape[];\n\tlayout?: EShapeLayout;\n\n\t// Working space\n\tindex: number; // A work space for sorting.\n\tselected: boolean;\n\treference: number; // Count of references from commands\n\n\t// Working space for the viewer\n\truntime?: EShapeRuntime;\n\n\t// Working space for the editor\n\teditor?: EShapeEditor;\n\n\t// Working space for the renderer\n\tuploaded?: EShapeUploaded;\n\n\t// State\n\treadonly state: EShapeStateSet;\n\n\t// Capability\n\treadonly capability: EShapeCapabilityContainer;\n\tgetCapability(): EShapeCapabilityContainer | undefined;\n\n\t//\n\ttoDirty(): void;\n\tattach(parent: EShapeContainer | EShape, at?: number): this;\n\tonAttach(): void;\n\tdetach(): this;\n\tonDetach(): void;\n\tcopy(source: EShape): this;\n\tcopy(source: EShape, part: EShapeCopyPart): this;\n\tclone(): EShape;\n\tdestroy(): void;\n\n\t//\n\tfocus(): this;\n\tblur(): this;\n\n\t//\n\tonSizeChange(): void;\n\n\t// Action\n\tupdate(time: number): void;\n\tonRender(time: number, renderer: Renderer): void;\n\n\t// Transform\n\tupdateTransform(): void;\n\tdisallowOnTransformChange(): void;\n\tallowOnTransformChange(invokeOnTransformChange: boolean): void;\n\tonTransformChange(): void;\n\tonParentTransformChange(): void;\n\tonChildTransformChange(): void;\n\n\t// Uploaded\n\tdisallowUploadedUpdate(): void;\n\tallowUploadedUpdate(): void;\n\tupdateUploaded(): void;\n\tupdateUploadedRecursively(): void;\n\n\t// Serialization\n\tserialize(manager: EShapeResourceManagerSerialization): DDiagramSerializedItem;\n\taddUuid(manager: EShapeResourceManagerSerialization): void;\n\tupdateUuid(manager: EShapeResourceManagerSerialization): void;\n\n\t// Hit test\n\tcontains(x: number, y: number): EShape | null;\n\tcontainsBBox(x: number, y: number): boolean;\n\tcontainsAbs(\n\t\tx: number,\n\t\ty: number,\n\t\tax: number,\n\t\tay: number,\n\t\tsw: number,\n\t\tss: number,\n\t\tsa: number\n\t): boolean;\n\tcontainsAbsBBox(x: number, y: number, ax: number, ay: number): boolean;\n\n\t// Coordinate\n\ttoGlobal(position: IPoint, result: Point, skipUpdate?: boolean): Point;\n\ttoLocal(position: IPoint, from?: DisplayObject, result?: Point, skipUpdate?: boolean): Point;\n\tgetBounds(skipUpdate?: boolean, result?: Rectangle): Rectangle;\n\tgetBoundsInternal(skipUpdate?: boolean, result?: Rectangle): Rectangle;\n\tgetBoundsLocal(skipUpdate?: boolean, result?: Rectangle): Rectangle;\n}\n"]}
1
+ {"version":3,"file":"e-shape.js","sourceRoot":"","sources":["../../../../src/main/typescript/wcardinal/ui/shape/e-shape.ts"],"names":[],"mappings":"AAAA;;;GAGG","sourcesContent":["/*\n * Copyright (C) 2019 Toshiba Corporation\n * SPDX-License-Identifier: Apache-2.0\n */\n\nimport { DisplayObject, IPoint, Point, Rectangle, Renderer, Texture, utils } from \"pixi.js\";\nimport { DDiagramSerializedItem } from \"../d-diagram-serialized\";\nimport { EShapeAction } from \"./action/e-shape-action\";\nimport { EShapeContainer } from \"./e-shape-container\";\nimport { EShapeCopyPart } from \"./e-shape-copy-part\";\nimport { EShapeCorner } from \"./e-shape-corner\";\nimport { EShapeEditor } from \"./e-shape-editor\";\nimport { EShapeFill } from \"./e-shape-fill\";\nimport { EShapeGradientLike } from \"./e-shape-gradient\";\nimport { EShapeLayout } from \"./e-shape-layout\";\nimport { EShapePoints } from \"./e-shape-points\";\nimport { EShapeResourceManagerSerialization } from \"./e-shape-resource-manager-serialization\";\nimport { EShapeRuntime } from \"./e-shape-runtime\";\nimport { EShapeStateSet } from \"./e-shape-state-set\";\nimport { EShapeStroke } from \"./e-shape-stroke\";\nimport { EShapeData } from \"./e-shape-data\";\nimport { EShapeText } from \"./e-shape-text\";\nimport { EShapeTransform } from \"./e-shape-transform\";\nimport { EShapeType } from \"./e-shape-type\";\nimport { EShapeUploaded } from \"./e-shape-uploaded\";\nimport { EShapeConnectorContainer } from \"./e-shape-connector-container\";\nimport { EShapeCapabilityContainer } from \"./e-shape-capability-container\";\nimport { EShapeLockPart } from \"./variant/e-shape-lock-part\";\n\nexport interface EShape extends utils.EventEmitter {\n\tid: string; // Used to identity a shape by users\n\tuuid: number; // Used to identify a shape uniquely\n\treadonly type: EShapeType;\n\treadonly size: IPoint;\n\treadonly fill: EShapeFill;\n\treadonly stroke: EShapeStroke;\n\treadonly transform: EShapeTransform;\n\tradius: number;\n\tcorner: EShapeCorner;\n\treadonly points?: EShapePoints;\n\timage?: HTMLImageElement;\n\timageSrc?: string;\n\ttexture?: Texture;\n\tgradient?: EShapeGradientLike;\n\treadonly text: EShapeText;\n\t/** @deprecated in favor of {@link data}. */\n\treadonly tag: EShapeData;\n\treadonly data: EShapeData;\n\treadonly action: EShapeAction;\n\tcursor?: string;\n\tvisible: boolean;\n\treadonly worldVisible: boolean;\n\tinteractive: boolean;\n\tshortcut?: string;\n\ttitle?: string;\n\tconnector: EShapeConnectorContainer;\n\n\t// Hierarchy\n\tparent: EShapeContainer | EShape | null;\n\troot: EShape;\n\tchildren: EShape[];\n\tlayout?: EShapeLayout;\n\n\t// Working space\n\tindex: number; // A work space for sorting.\n\tselected: boolean;\n\treference: number; // Count of references from commands\n\n\t// Working space for the viewer\n\truntime?: EShapeRuntime;\n\n\t// Working space for the editor\n\teditor?: EShapeEditor;\n\n\t// Working space for the renderer\n\tuploaded?: EShapeUploaded;\n\n\t// State\n\treadonly state: EShapeStateSet;\n\n\t// Capability\n\treadonly capability: EShapeCapabilityContainer;\n\tgetCapability(): EShapeCapabilityContainer | undefined;\n\n\t//\n\ttoDirty(): void;\n\tattach(parent: EShapeContainer | EShape, at?: number): this;\n\tonAttach(): void;\n\tdetach(exceptions?: Set<EShape>): this;\n\tonDetach(exceptions?: Set<EShape>): void;\n\tcopy(source: EShape): this;\n\tcopy(source: EShape, part: EShapeCopyPart): this;\n\tclone(): EShape;\n\tdestroy(): void;\n\n\t//\n\tfocus(): this;\n\tblur(): this;\n\n\t//\n\tonSizeChange(): void;\n\n\t// Action\n\tupdate(time: number): void;\n\tonRender(time: number, renderer: Renderer): void;\n\n\t// Lock & unlock\n\tlock(part: EShapeLockPart): this;\n\tunlock(part: EShapeLockPart, invoke: boolean): this;\n\n\t// Transform\n\tupdateTransform(): void;\n\tonTransformChange(): void;\n\tonParentTransformChange(): void;\n\tonChildTransformChange(): void;\n\n\t// Uploaded\n\tupdateUploaded(recursively?: boolean): void;\n\n\t// Serialization\n\tserialize(manager: EShapeResourceManagerSerialization): DDiagramSerializedItem;\n\taddUuid(manager: EShapeResourceManagerSerialization): void;\n\tupdateUuid(manager: EShapeResourceManagerSerialization): void;\n\n\t// Hit test\n\tcontains(x: number, y: number): EShape | null;\n\tcontainsBBox(x: number, y: number): boolean;\n\tcontainsAbs(\n\t\tx: number,\n\t\ty: number,\n\t\tax: number,\n\t\tay: number,\n\t\tsw: number,\n\t\tss: number,\n\t\tsa: number\n\t): boolean;\n\tcontainsAbsBBox(x: number, y: number, ax: number, ay: number): boolean;\n\n\t// Coordinate\n\ttoGlobal(position: IPoint, result: Point, skipUpdate?: boolean): Point;\n\ttoLocal(position: IPoint, from?: DisplayObject, result?: Point, skipUpdate?: boolean): Point;\n\tgetBounds(skipUpdate?: boolean, result?: Rectangle): Rectangle;\n\tgetBoundsInternal(skipUpdate?: boolean, result?: Rectangle): Rectangle;\n\tgetBoundsLocal(skipUpdate?: boolean, result?: Rectangle): Rectangle;\n}\n"]}
@@ -5,6 +5,7 @@
5
5
  import { EShapeConnectorBodies } from "../e-shape-connector-bodies";
6
6
  import { deserializeBase } from "./deserialize-base";
7
7
  import { EShapeConnectorLine } from "./e-shape-connector-line";
8
+ import { EShapeLockPart } from "./e-shape-lock-part";
8
9
  export var deserializeConnectorLine = function (item, manager, shape) {
9
10
  return deserializeBase(item, manager, shape || new EShapeConnectorLine());
10
11
  };
@@ -19,7 +20,7 @@ export var onDeserializedConnectorLine = function (item, shape, mapping, manager
19
20
  manager.setExtension(resourceId, parsed);
20
21
  }
21
22
  // Lock
22
- shape.lock();
23
+ shape.lock(EShapeLockPart.CONNECTOR);
23
24
  // Points
24
25
  var points = shape.points;
25
26
  points.deserialize(parsed[1], manager);
@@ -37,7 +38,7 @@ export var onDeserializedConnectorLine = function (item, shape, mapping, manager
37
38
  body.set(EShapeConnectorBodies.from(points.values, edge.tail.margin, edge.head.margin));
38
39
  }
39
40
  // Unlock
40
- shape.unlock();
41
+ shape.unlock(EShapeLockPart.CONNECTOR, true);
41
42
  }
42
43
  }
43
44
  };
@@ -1 +1 @@
1
- {"version":3,"file":"deserialize-connector-line.js","sourceRoot":"","sources":["../../../../../src/main/typescript/wcardinal/ui/shape/variant/deserialize-connector-line.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAIH,OAAO,EAAE,qBAAqB,EAAE,MAAM,6BAA6B,CAAC;AAGpE,OAAO,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AACrD,OAAO,EAAE,mBAAmB,EAAE,MAAM,0BAA0B,CAAC;AAE/D,MAAM,CAAC,IAAM,wBAAwB,GAAG,UACvC,IAA4B,EAC5B,OAA6C,EAC7C,KAA2B;IAE3B,OAAO,eAAe,CAAC,IAAI,EAAE,OAAO,EAAE,KAAK,IAAI,IAAI,mBAAmB,EAAE,CAAC,CAAC;AAC3E,CAAC,CAAC;AAEF,MAAM,CAAC,IAAM,2BAA2B,GAAG,UAC1C,IAA4B,EAC5B,KAAa,EACb,OAA0B,EAC1B,OAA6C;IAE7C,IAAI,KAAK,YAAY,mBAAmB,EAAE;QACzC,IAAM,SAAS,GAAG,OAAO,CAAC,SAAS,CAAC;QACpC,IAAM,UAAU,GAAG,IAAI,CAAC,EAAE,CAAC,CAAC;QAC5B,IAAI,CAAC,IAAI,UAAU,IAAI,UAAU,GAAG,SAAS,CAAC,MAAM,EAAE;YACrD,IAAI,MAAM,GAAG,OAAO,CAAC,YAAY,CAA4B,UAAU,CAAC,CAAC;YACzE,IAAI,MAAM,IAAI,IAAI,EAAE;gBACnB,MAAM,GAAG,IAAI,CAAC,KAAK,CAAC,SAAS,CAAC,UAAU,CAAC,CAA8B,CAAC;gBACxE,OAAO,CAAC,YAAY,CAAC,UAAU,EAAE,MAAM,CAAC,CAAC;aACzC;YAED,OAAO;YACP,KAAK,CAAC,IAAI,EAAE,CAAC;YAEb,SAAS;YACT,IAAM,MAAM,GAAG,KAAK,CAAC,MAAM,CAAC;YAC5B,MAAM,CAAC,WAAW,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,OAAO,CAAC,CAAC;YAEvC,OAAO;YACP,IAAM,IAAI,GAAG,KAAK,CAAC,IAAI,CAAC;YACxB,IAAI,CAAC,WAAW,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,OAAO,EAAE,OAAO,CAAC,CAAC;YAE9C,OAAO;YACP,IAAM,IAAI,GAAG,KAAK,CAAC,IAAI,CAAC;YACxB,IAAM,MAAM,GAAG,MAAM,CAAC,CAAC,CAAC,CAAC;YACzB,IAAI,MAAM,IAAI,IAAI,EAAE;gBACnB,IAAI,CAAC,WAAW,CAAC,MAAM,EAAE,OAAO,EAAE,OAAO,CAAC,CAAC;aAC3C;iBAAM;gBACN,+CAA+C;gBAC/C,IAAI,CAAC,GAAG,CACP,qBAAqB,CAAC,IAAI,CAAC,MAAM,CAAC,MAAM,EAAE,IAAI,CAAC,IAAI,CAAC,MAAM,EAAE,IAAI,CAAC,IAAI,CAAC,MAAM,CAAC,CAC7E,CAAC;aACF;YAED,SAAS;YACT,KAAK,CAAC,MAAM,EAAE,CAAC;SACf;KACD;AACF,CAAC,CAAC","sourcesContent":["/*\n * Copyright (C) 2019 Toshiba Corporation\n * SPDX-License-Identifier: Apache-2.0\n */\n\nimport { DDiagramSerializedItem } from \"../../d-diagram-serialized\";\nimport { EShape } from \"../e-shape\";\nimport { EShapeConnectorBodies } from \"../e-shape-connector-bodies\";\nimport { EShapeResourceManagerDeserialization } from \"../e-shape-resource-manager-deserialization\";\nimport { EShapeUuidMapping } from \"../e-shape-uuid-mapping\";\nimport { deserializeBase } from \"./deserialize-base\";\nimport { EShapeConnectorLine } from \"./e-shape-connector-line\";\n\nexport const deserializeConnectorLine = (\n\titem: DDiagramSerializedItem,\n\tmanager: EShapeResourceManagerDeserialization,\n\tshape?: EShapeConnectorLine\n): Promise<EShapeConnectorLine> | EShapeConnectorLine => {\n\treturn deserializeBase(item, manager, shape || new EShapeConnectorLine());\n};\n\nexport const onDeserializedConnectorLine = (\n\titem: DDiagramSerializedItem,\n\tshape: EShape,\n\tmapping: EShapeUuidMapping,\n\tmanager: EShapeResourceManagerDeserialization\n): void => {\n\tif (shape instanceof EShapeConnectorLine) {\n\t\tconst resources = manager.resources;\n\t\tconst resourceId = item[15];\n\t\tif (0 <= resourceId && resourceId < resources.length) {\n\t\t\tlet parsed = manager.getExtension<[number, number, number?]>(resourceId);\n\t\t\tif (parsed == null) {\n\t\t\t\tparsed = JSON.parse(resources[resourceId]) as [number, number, number?];\n\t\t\t\tmanager.setExtension(resourceId, parsed);\n\t\t\t}\n\n\t\t\t// Lock\n\t\t\tshape.lock();\n\n\t\t\t// Points\n\t\t\tconst points = shape.points;\n\t\t\tpoints.deserialize(parsed[1], manager);\n\n\t\t\t// Edge\n\t\t\tconst edge = shape.edge;\n\t\t\tedge.deserialize(parsed[0], mapping, manager);\n\n\t\t\t// Body\n\t\t\tconst body = shape.body;\n\t\t\tconst bodyId = parsed[2];\n\t\t\tif (bodyId != null) {\n\t\t\t\tbody.deserialize(bodyId, mapping, manager);\n\t\t\t} else {\n\t\t\t\t// The following is for backward compatibility.\n\t\t\t\tbody.set(\n\t\t\t\t\tEShapeConnectorBodies.from(points.values, edge.tail.margin, edge.head.margin)\n\t\t\t\t);\n\t\t\t}\n\n\t\t\t// Unlock\n\t\t\tshape.unlock();\n\t\t}\n\t}\n};\n"]}
1
+ {"version":3,"file":"deserialize-connector-line.js","sourceRoot":"","sources":["../../../../../src/main/typescript/wcardinal/ui/shape/variant/deserialize-connector-line.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAIH,OAAO,EAAE,qBAAqB,EAAE,MAAM,6BAA6B,CAAC;AAGpE,OAAO,EAAE,eAAe,EAAE,MAAM,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AE9C,OAAO;YACP,IAAM,IAAI,GAAG,KAAK,CAAC,IAAI,CAAC;YACxB,IAAM,MAAM,GAAG,MAAM,CAAC,CAAC,CAAC,CAAC;YACzB,IAAI,MAAM,IAAI,IAAI,EAAE;gBACnB,IAAI,CAAC,WAAW,CAAC,MAAM,EAAE,OAAO,EAAE,OAAO,CAAC,CAAC;aAC3C;iBAAM;gBACN,+CAA+C;gBAC/C,IAAI,CAAC,GAAG,CACP,qBAAqB,CAAC,IAAI,CAAC,MAAM,CAAC,MAAM,EAAE,IAAI,CAAC,IAAI,CAAC,MAAM,EAAE,IAAI,CAAC,IAAI,CAAC,MAAM,CAAC,CAC7E,CAAC;aACF;YAED,SAAS;YACT,KAAK,CAAC,MAAM,CAAC,cAAc,CAAC,SAAS,EAAE,IAAI,CAAC,CAAC;SAC7C;KACD;AACF,CAAC,CAAC","sourcesContent":["/*\n * Copyright (C) 2019 Toshiba Corporation\n * SPDX-License-Identifier: Apache-2.0\n */\n\nimport { DDiagramSerializedItem } from \"../../d-diagram-serialized\";\nimport { EShape } from \"../e-shape\";\nimport { EShapeConnectorBodies } from \"../e-shape-connector-bodies\";\nimport { EShapeResourceManagerDeserialization } from \"../e-shape-resource-manager-deserialization\";\nimport { EShapeUuidMapping } from \"../e-shape-uuid-mapping\";\nimport { deserializeBase } from \"./deserialize-base\";\nimport { EShapeConnectorLine } from \"./e-shape-connector-line\";\nimport { EShapeLockPart } from \"./e-shape-lock-part\";\n\nexport const deserializeConnectorLine = (\n\titem: DDiagramSerializedItem,\n\tmanager: EShapeResourceManagerDeserialization,\n\tshape?: EShapeConnectorLine\n): Promise<EShapeConnectorLine> | EShapeConnectorLine => {\n\treturn deserializeBase(item, manager, shape || new EShapeConnectorLine());\n};\n\nexport const onDeserializedConnectorLine = (\n\titem: DDiagramSerializedItem,\n\tshape: EShape,\n\tmapping: EShapeUuidMapping,\n\tmanager: EShapeResourceManagerDeserialization\n): void => {\n\tif (shape instanceof EShapeConnectorLine) {\n\t\tconst resources = manager.resources;\n\t\tconst resourceId = item[15];\n\t\tif (0 <= resourceId && resourceId < resources.length) {\n\t\t\tlet parsed = manager.getExtension<[number, number, number?]>(resourceId);\n\t\t\tif (parsed == null) {\n\t\t\t\tparsed = JSON.parse(resources[resourceId]) as [number, number, number?];\n\t\t\t\tmanager.setExtension(resourceId, parsed);\n\t\t\t}\n\n\t\t\t// Lock\n\t\t\tshape.lock(EShapeLockPart.CONNECTOR);\n\n\t\t\t// Points\n\t\t\tconst points = shape.points;\n\t\t\tpoints.deserialize(parsed[1], manager);\n\n\t\t\t// Edge\n\t\t\tconst edge = shape.edge;\n\t\t\tedge.deserialize(parsed[0], mapping, manager);\n\n\t\t\t// Body\n\t\t\tconst body = shape.body;\n\t\t\tconst bodyId = parsed[2];\n\t\t\tif (bodyId != null) {\n\t\t\t\tbody.deserialize(bodyId, mapping, manager);\n\t\t\t} else {\n\t\t\t\t// The following is for backward compatibility.\n\t\t\t\tbody.set(\n\t\t\t\t\tEShapeConnectorBodies.from(points.values, edge.tail.margin, edge.head.margin)\n\t\t\t\t);\n\t\t\t}\n\n\t\t\t// Unlock\n\t\t\tshape.unlock(EShapeLockPart.CONNECTOR, true);\n\t\t}\n\t}\n};\n"]}
@@ -16,6 +16,8 @@ import { hitTestBBox } from "./hit-test-bbox";
16
16
  import { toGradientSerialized } from "./to-gradient-serialized";
17
17
  import { EShapeCapabilityContainerImpl } from "../e-shape-capability-container-impl";
18
18
  import { EShapeCapability } from "../e-shape-capability";
19
+ import { EShapeLock } from "./e-shape-lock";
20
+ import { EShapeLockPart } from "./e-shape-lock-part";
19
21
  var EShapeBase = /** @class */ (function (_super) {
20
22
  __extends(EShapeBase, _super);
21
23
  function EShapeBase(type) {
@@ -24,13 +26,11 @@ var EShapeBase = /** @class */ (function (_super) {
24
26
  _this.uuid = 0;
25
27
  _this.type = type;
26
28
  _this.transform = _this.newTransform();
27
- _this._onTransformChangeLock = 0;
28
- _this._isOnTransformChanged = false;
29
29
  _this.action = new EShapeAction();
30
30
  _this._visible = true;
31
- _this._uploadedUpdateLock = 0;
32
- _this._isUploadedUpdated = false;
33
- _this._isUploadedUpdatedRecursively = false;
31
+ _this._lockTransform = new EShapeLock();
32
+ _this._lockTransformParent = new EShapeLock();
33
+ _this._lockUploaded = new EShapeLock();
34
34
  _this._boundsTransformId = NaN;
35
35
  _this._boundsInternalTransformId = NaN;
36
36
  _this._boundsLocalTransformId = NaN;
@@ -71,6 +71,9 @@ var EShapeBase = /** @class */ (function (_super) {
71
71
  this.onParentTransformChange();
72
72
  };
73
73
  EShapeBase.prototype.onParentTransformChange = function () {
74
+ if (this._lockTransformParent.isLocked()) {
75
+ return;
76
+ }
74
77
  this.updateUploaded();
75
78
  var connector = this._connector;
76
79
  if (connector != null) {
@@ -82,79 +85,62 @@ var EShapeBase = /** @class */ (function (_super) {
82
85
  }
83
86
  };
84
87
  EShapeBase.prototype.onTransformChange_ = function () {
85
- if (this._onTransformChangeLock === 0) {
86
- var parent_1 = this.parent;
87
- if (parent_1 != null) {
88
- parent_1.onChildTransformChange();
89
- }
88
+ if (this._lockTransform.isLocked()) {
89
+ return;
90
90
  }
91
- else {
92
- this._isOnTransformChanged = true;
91
+ var parent = this.parent;
92
+ if (parent != null) {
93
+ parent.onChildTransformChange();
93
94
  }
94
95
  };
95
- EShapeBase.prototype.disallowOnTransformChange = function () {
96
- this._onTransformChangeLock += 1;
97
- if (this._onTransformChangeLock === 1) {
98
- this._isOnTransformChanged = false;
96
+ EShapeBase.prototype.lock = function (part) {
97
+ if (part & EShapeLockPart.TRANSFORM) {
98
+ this._lockTransform.lock();
99
+ }
100
+ if (part & EShapeLockPart.TRANSFORM_PARENT) {
101
+ this._lockTransformParent.lock();
102
+ }
103
+ if (part & EShapeLockPart.UPLOADED) {
104
+ this._lockUploaded.lock();
99
105
  }
106
+ return this;
100
107
  };
101
- EShapeBase.prototype.allowOnTransformChange = function (invokeOnTransformChange) {
102
- this._onTransformChangeLock -= 1;
103
- if (this._onTransformChangeLock === 0) {
104
- if (this._isOnTransformChanged) {
105
- this._isOnTransformChanged = false;
106
- if (invokeOnTransformChange) {
107
- this.onTransformChange();
108
- }
108
+ EShapeBase.prototype.unlock = function (part, invoke) {
109
+ if (part & EShapeLockPart.UPLOADED) {
110
+ var lockUploaded = this._lockUploaded;
111
+ if (lockUploaded.unlock() && invoke) {
112
+ this.updateUploaded(lockUploaded.isHigh());
113
+ }
114
+ }
115
+ if (part & EShapeLockPart.TRANSFORM_PARENT) {
116
+ if (this._lockTransformParent.unlock() && invoke) {
117
+ this.onParentTransformChange();
109
118
  }
110
119
  }
120
+ if (part & EShapeLockPart.TRANSFORM) {
121
+ if (this._lockTransform.unlock() && invoke) {
122
+ this.onTransformChange();
123
+ }
124
+ }
125
+ return this;
111
126
  };
112
127
  EShapeBase.prototype.onChildTransformChange = function () {
113
128
  //
114
129
  };
115
- EShapeBase.prototype.disallowUploadedUpdate = function () {
116
- this._uploadedUpdateLock += 1;
117
- if (this._uploadedUpdateLock === 1) {
118
- this._isUploadedUpdated = false;
119
- this._isUploadedUpdatedRecursively = false;
130
+ EShapeBase.prototype.updateUploaded = function (recursively) {
131
+ if (this._lockUploaded.isLocked()) {
132
+ return;
120
133
  }
121
- };
122
- EShapeBase.prototype.allowUploadedUpdate = function () {
123
- this._uploadedUpdateLock -= 1;
124
- if (this._uploadedUpdateLock === 0) {
125
- if (this._isUploadedUpdatedRecursively) {
126
- this._isUploadedUpdatedRecursively = false;
127
- this._isUploadedUpdated = false;
128
- this.updateUploadedRecursively();
129
- }
130
- else if (this._isUploadedUpdated) {
131
- this._isUploadedUpdated = false;
132
- this.updateUploaded();
133
- }
134
+ var uploaded = this.uploaded;
135
+ if (uploaded != null) {
136
+ uploaded.update(this);
134
137
  }
135
- };
136
- EShapeBase.prototype.updateUploadedRecursively = function () {
137
- if (this._uploadedUpdateLock === 0) {
138
- this.updateUploaded();
138
+ if (recursively === true) {
139
139
  var children = this.children;
140
140
  for (var i = 0, imax = children.length; i < imax; ++i) {
141
- children[i].updateUploadedRecursively();
141
+ children[i].updateUploaded(true);
142
142
  }
143
143
  }
144
- else {
145
- this._isUploadedUpdatedRecursively = true;
146
- }
147
- };
148
- EShapeBase.prototype.updateUploaded = function () {
149
- if (this._uploadedUpdateLock === 0) {
150
- var uploaded = this.uploaded;
151
- if (uploaded != null) {
152
- uploaded.update(this);
153
- }
154
- }
155
- else {
156
- this._isUploadedUpdated = true;
157
- }
158
144
  };
159
145
  Object.defineProperty(EShapeBase.prototype, "image", {
160
146
  get: function () {
@@ -199,9 +185,9 @@ var EShapeBase = /** @class */ (function (_super) {
199
185
  Object.defineProperty(EShapeBase.prototype, "visible", {
200
186
  get: function () {
201
187
  if (this._visible) {
202
- var parent_2 = this.parent;
203
- if (parent_2 instanceof EShapeBase) {
204
- return parent_2.visible;
188
+ var parent_1 = this.parent;
189
+ if (parent_1 instanceof EShapeBase) {
190
+ return parent_1.visible;
205
191
  }
206
192
  return true;
207
193
  }
@@ -210,7 +196,7 @@ var EShapeBase = /** @class */ (function (_super) {
210
196
  set: function (visible) {
211
197
  if (this._visible !== visible) {
212
198
  this._visible = visible;
213
- this.updateUploadedRecursively();
199
+ this.updateUploaded(true);
214
200
  }
215
201
  },
216
202
  enumerable: false,
@@ -219,9 +205,9 @@ var EShapeBase = /** @class */ (function (_super) {
219
205
  Object.defineProperty(EShapeBase.prototype, "worldVisible", {
220
206
  get: function () {
221
207
  if (this._visible) {
222
- var parent_3 = this.parent;
223
- if (parent_3) {
224
- return parent_3.worldVisible;
208
+ var parent_2 = this.parent;
209
+ if (parent_2) {
210
+ return parent_2.worldVisible;
225
211
  }
226
212
  return true;
227
213
  }
@@ -265,7 +251,7 @@ var EShapeBase = /** @class */ (function (_super) {
265
251
  children[i].onAttach();
266
252
  }
267
253
  };
268
- EShapeBase.prototype.detach = function () {
254
+ EShapeBase.prototype.detach = function (exceptions) {
269
255
  var parent = this.parent;
270
256
  if (parent) {
271
257
  this.parent = null;
@@ -275,20 +261,20 @@ var EShapeBase = /** @class */ (function (_super) {
275
261
  children.splice(index, 1);
276
262
  parent.onChildTransformChange();
277
263
  parent.toDirty();
278
- this.onDetach();
264
+ this.onDetach(exceptions);
279
265
  }
280
266
  }
281
267
  return this;
282
268
  };
283
- EShapeBase.prototype.onDetach = function () {
269
+ EShapeBase.prototype.onDetach = function (exceptions) {
284
270
  this.uploaded = undefined;
285
271
  var connector = this._connector;
286
272
  if (connector) {
287
- connector.detach();
273
+ connector.detach(exceptions);
288
274
  }
289
275
  var children = this.children;
290
276
  for (var i = 0, imax = children.length; i < imax; ++i) {
291
- children[i].onDetach();
277
+ children[i].onDetach(exceptions);
292
278
  }
293
279
  };
294
280
  // Transform