@wcardinal/wcardinal-ui 0.145.0 → 0.149.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-note-small-error.d.ts +8 -0
- package/dist/types/wcardinal/ui/d-note-small-no-items-found.d.ts +8 -0
- package/dist/types/wcardinal/ui/d-note-small-searching.d.ts +8 -0
- package/dist/types/wcardinal/ui/d-note-small.d.ts +8 -0
- package/dist/types/wcardinal/ui/index.d.ts +4 -0
- package/dist/types/wcardinal/ui/shape/e-shape-connector-bodies.d.ts +3 -0
- package/dist/types/wcardinal/ui/shape/e-shape-connector-body-impl.d.ts +24 -0
- package/dist/types/wcardinal/ui/shape/e-shape-connector-body.d.ts +14 -0
- package/dist/types/wcardinal/ui/shape/e-shape-connector-edge-container.d.ts +3 -0
- package/dist/types/wcardinal/ui/shape/index.d.ts +3 -0
- package/dist/types/wcardinal/ui/shape/variant/e-shape-connector-line.d.ts +9 -2
- package/dist/types/wcardinal/ui/theme/dark/d-theme-dark-note-error.d.ts +0 -3
- package/dist/types/wcardinal/ui/theme/dark/d-theme-dark-note-no-items-found.d.ts +0 -3
- package/dist/types/wcardinal/ui/theme/dark/d-theme-dark-note-searching.d.ts +0 -3
- package/dist/types/wcardinal/ui/theme/dark/d-theme-dark-note-small-error.d.ts +5 -0
- package/dist/types/wcardinal/ui/theme/dark/d-theme-dark-note-small-no-items-found.d.ts +5 -0
- package/dist/types/wcardinal/ui/theme/dark/d-theme-dark-note-small-searching.d.ts +5 -0
- package/dist/types/wcardinal/ui/theme/dark/d-theme-dark-note-small.d.ts +4 -0
- package/dist/types/wcardinal/ui/theme/dark/d-theme-dark-note.d.ts +3 -0
- package/dist/types/wcardinal/ui/theme/dark/d-theme-dark-slider-thumb.d.ts +1 -0
- package/dist/types/wcardinal/ui/theme/dark/d-theme-dark-slider-track.d.ts +3 -0
- package/dist/types/wcardinal/ui/theme/dark/d-theme-dark-table-body-cells.d.ts +4 -2
- package/dist/types/wcardinal/ui/theme/dark/d-theme-dark-table-header-cell.d.ts +2 -0
- package/dist/types/wcardinal/ui/theme/dark/index.d.ts +4 -0
- package/dist/types/wcardinal/ui/theme/white/d-theme-white-note-error.d.ts +0 -3
- package/dist/types/wcardinal/ui/theme/white/d-theme-white-note-no-items-found.d.ts +0 -3
- package/dist/types/wcardinal/ui/theme/white/d-theme-white-note-searching.d.ts +0 -3
- package/dist/types/wcardinal/ui/theme/white/d-theme-white-note-small-error.d.ts +5 -0
- package/dist/types/wcardinal/ui/theme/white/d-theme-white-note-small-no-items-found.d.ts +5 -0
- package/dist/types/wcardinal/ui/theme/white/d-theme-white-note-small-searching.d.ts +5 -0
- package/dist/types/wcardinal/ui/theme/white/d-theme-white-note-small.d.ts +4 -0
- package/dist/types/wcardinal/ui/theme/white/d-theme-white-note.d.ts +3 -0
- package/dist/types/wcardinal/ui/theme/white/d-theme-white-slider-thumb.d.ts +1 -0
- package/dist/types/wcardinal/ui/theme/white/d-theme-white-slider-track.d.ts +3 -0
- package/dist/types/wcardinal/ui/theme/white/d-theme-white-table-body-cells.d.ts +4 -2
- package/dist/types/wcardinal/ui/theme/white/d-theme-white-table-header-cell.d.ts +2 -0
- package/dist/types/wcardinal/ui/theme/white/index.d.ts +4 -0
- package/dist/types/wcardinal/ui/util/util-svg-atlas-builder.d.ts +1 -0
- package/dist/wcardinal/ui/d-dialog-select.js +6 -6
- package/dist/wcardinal/ui/d-dialog-select.js.map +1 -1
- package/dist/wcardinal/ui/d-note-small-error.js +18 -0
- package/dist/wcardinal/ui/d-note-small-error.js.map +1 -0
- package/dist/wcardinal/ui/d-note-small-no-items-found.js +18 -0
- package/dist/wcardinal/ui/d-note-small-no-items-found.js.map +1 -0
- package/dist/wcardinal/ui/d-note-small-searching.js +18 -0
- package/dist/wcardinal/ui/d-note-small-searching.js.map +1 -0
- package/dist/wcardinal/ui/d-note-small.js +18 -0
- package/dist/wcardinal/ui/d-note-small.js.map +1 -0
- package/dist/wcardinal/ui/d-view-gesture-impl.js +12 -4
- package/dist/wcardinal/ui/d-view-gesture-impl.js.map +1 -1
- package/dist/wcardinal/ui/index.js +4 -0
- package/dist/wcardinal/ui/index.js.map +1 -1
- package/dist/wcardinal/ui/shape/e-shape-connector-bodies.js +36 -0
- package/dist/wcardinal/ui/shape/e-shape-connector-bodies.js.map +1 -0
- package/dist/wcardinal/ui/shape/e-shape-connector-body-impl.js +88 -0
- package/dist/wcardinal/ui/shape/e-shape-connector-body-impl.js.map +1 -0
- package/dist/wcardinal/ui/shape/e-shape-connector-body.js +6 -0
- package/dist/wcardinal/ui/shape/e-shape-connector-body.js.map +1 -0
- package/dist/wcardinal/ui/shape/e-shape-connector-edge-container-impl.js.map +1 -1
- package/dist/wcardinal/ui/shape/e-shape-connector-edge-container.js.map +1 -1
- package/dist/wcardinal/ui/shape/e-shape-runtime.js +6 -4
- package/dist/wcardinal/ui/shape/e-shape-runtime.js.map +1 -1
- package/dist/wcardinal/ui/shape/index.js +3 -0
- package/dist/wcardinal/ui/shape/index.js.map +1 -1
- package/dist/wcardinal/ui/shape/variant/deserialize-connector-line.js +19 -1
- package/dist/wcardinal/ui/shape/variant/deserialize-connector-line.js.map +1 -1
- package/dist/wcardinal/ui/shape/variant/e-shape-connector-line.js +104 -81
- package/dist/wcardinal/ui/shape/variant/e-shape-connector-line.js.map +1 -1
- package/dist/wcardinal/ui/theme/dark/d-theme-dark-note-error.js +0 -9
- package/dist/wcardinal/ui/theme/dark/d-theme-dark-note-error.js.map +1 -1
- package/dist/wcardinal/ui/theme/dark/d-theme-dark-note-no-items-found.js +0 -10
- package/dist/wcardinal/ui/theme/dark/d-theme-dark-note-no-items-found.js.map +1 -1
- package/dist/wcardinal/ui/theme/dark/d-theme-dark-note-searching.js +0 -11
- package/dist/wcardinal/ui/theme/dark/d-theme-dark-note-searching.js.map +1 -1
- package/dist/wcardinal/ui/theme/dark/d-theme-dark-note-small-error.js +18 -0
- package/dist/wcardinal/ui/theme/dark/d-theme-dark-note-small-error.js.map +1 -0
- package/dist/wcardinal/ui/theme/dark/d-theme-dark-note-small-no-items-found.js +18 -0
- package/dist/wcardinal/ui/theme/dark/d-theme-dark-note-small-no-items-found.js.map +1 -0
- package/dist/wcardinal/ui/theme/dark/d-theme-dark-note-small-searching.js +18 -0
- package/dist/wcardinal/ui/theme/dark/d-theme-dark-note-small-searching.js.map +1 -0
- package/dist/wcardinal/ui/theme/dark/d-theme-dark-note-small.js +18 -0
- package/dist/wcardinal/ui/theme/dark/d-theme-dark-note-small.js.map +1 -0
- package/dist/wcardinal/ui/theme/dark/d-theme-dark-note.js +9 -2
- package/dist/wcardinal/ui/theme/dark/d-theme-dark-note.js.map +1 -1
- package/dist/wcardinal/ui/theme/dark/d-theme-dark-slider-thumb.js +3 -0
- package/dist/wcardinal/ui/theme/dark/d-theme-dark-slider-thumb.js.map +1 -1
- package/dist/wcardinal/ui/theme/dark/d-theme-dark-slider-track.js +10 -0
- package/dist/wcardinal/ui/theme/dark/d-theme-dark-slider-track.js.map +1 -1
- package/dist/wcardinal/ui/theme/dark/d-theme-dark-slider-value.js +1 -1
- package/dist/wcardinal/ui/theme/dark/d-theme-dark-slider-value.js.map +1 -1
- package/dist/wcardinal/ui/theme/dark/d-theme-dark-table-body-cells.js +13 -5
- package/dist/wcardinal/ui/theme/dark/d-theme-dark-table-body-cells.js.map +1 -1
- package/dist/wcardinal/ui/theme/dark/d-theme-dark-table-header-cell.js +7 -2
- package/dist/wcardinal/ui/theme/dark/d-theme-dark-table-header-cell.js.map +1 -1
- package/dist/wcardinal/ui/theme/dark/index.js +4 -0
- package/dist/wcardinal/ui/theme/dark/index.js.map +1 -1
- package/dist/wcardinal/ui/theme/dark/load/load-theme-dark-note.js +6 -0
- package/dist/wcardinal/ui/theme/dark/load/load-theme-dark-note.js.map +1 -1
- package/dist/wcardinal/ui/theme/white/d-theme-white-note-error.js +0 -9
- package/dist/wcardinal/ui/theme/white/d-theme-white-note-error.js.map +1 -1
- package/dist/wcardinal/ui/theme/white/d-theme-white-note-no-items-found.js +0 -10
- package/dist/wcardinal/ui/theme/white/d-theme-white-note-no-items-found.js.map +1 -1
- package/dist/wcardinal/ui/theme/white/d-theme-white-note-searching.js +0 -11
- package/dist/wcardinal/ui/theme/white/d-theme-white-note-searching.js.map +1 -1
- package/dist/wcardinal/ui/theme/white/d-theme-white-note-small-error.js +18 -0
- package/dist/wcardinal/ui/theme/white/d-theme-white-note-small-error.js.map +1 -0
- package/dist/wcardinal/ui/theme/white/d-theme-white-note-small-no-items-found.js +18 -0
- package/dist/wcardinal/ui/theme/white/d-theme-white-note-small-no-items-found.js.map +1 -0
- package/dist/wcardinal/ui/theme/white/d-theme-white-note-small-searching.js +18 -0
- package/dist/wcardinal/ui/theme/white/d-theme-white-note-small-searching.js.map +1 -0
- package/dist/wcardinal/ui/theme/white/d-theme-white-note-small.js +18 -0
- package/dist/wcardinal/ui/theme/white/d-theme-white-note-small.js.map +1 -0
- package/dist/wcardinal/ui/theme/white/d-theme-white-note.js +9 -2
- package/dist/wcardinal/ui/theme/white/d-theme-white-note.js.map +1 -1
- package/dist/wcardinal/ui/theme/white/d-theme-white-slider-thumb.js +3 -0
- package/dist/wcardinal/ui/theme/white/d-theme-white-slider-thumb.js.map +1 -1
- package/dist/wcardinal/ui/theme/white/d-theme-white-slider-track.js +10 -0
- package/dist/wcardinal/ui/theme/white/d-theme-white-slider-track.js.map +1 -1
- package/dist/wcardinal/ui/theme/white/d-theme-white-slider-value.js +1 -1
- package/dist/wcardinal/ui/theme/white/d-theme-white-slider-value.js.map +1 -1
- package/dist/wcardinal/ui/theme/white/d-theme-white-table-body-cells.js +16 -5
- package/dist/wcardinal/ui/theme/white/d-theme-white-table-body-cells.js.map +1 -1
- package/dist/wcardinal/ui/theme/white/d-theme-white-table-header-cell.js +7 -2
- package/dist/wcardinal/ui/theme/white/d-theme-white-table-header-cell.js.map +1 -1
- package/dist/wcardinal/ui/theme/white/index.js +4 -0
- package/dist/wcardinal/ui/theme/white/index.js.map +1 -1
- package/dist/wcardinal/ui/theme/white/load/load-theme-white-note.js +6 -0
- package/dist/wcardinal/ui/theme/white/load/load-theme-white-note.js.map +1 -1
- package/dist/wcardinal/ui/util/util-svg-atlas-builder.js +3 -0
- package/dist/wcardinal/ui/util/util-svg-atlas-builder.js.map +1 -1
- package/dist/wcardinal-ui-theme-dark.js +111 -38
- package/dist/wcardinal-ui-theme-dark.min.js +2 -2
- package/dist/wcardinal-ui-theme-dark.min.js.map +1 -1
- package/dist/wcardinal-ui-theme-white.js +114 -38
- package/dist/wcardinal-ui-theme-white.min.js +2 -2
- package/dist/wcardinal-ui-theme-white.min.js.map +1 -1
- package/dist/wcardinal-ui.cjs.js +577 -188
- package/dist/wcardinal-ui.js +354 -114
- 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":"e-shape-runtime.js","sourceRoot":"","sources":["../../../../src/main/typescript/wcardinal/ui/shape/e-shape-runtime.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAe,KAAK,EAAY,MAAM,SAAS,CAAC;AAGvD,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,IAAM,UAAU,GAAG,CAAC,CAAC;AACrB,IAAM,UAAU,GAAG,CAAC,CAAC;AACrB,IAAM,QAAQ,GAAG,CAAC,CAAC;AACnB,IAAM,UAAU,GAAG,CAAC,CAAC;AACrB,IAAM,YAAY,GAAG,EAAE,CAAC;AACxB,IAAM,UAAU,GAAG,EAAE,CAAC;AACtB,IAAM,kBAAkB,GAAG,EAAE,CAAC;AAC9B,IAAM,UAAU,GAAG,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,MAAM,GAAG,IAAI,CAAC,MAAM,CAAC;aAC3B;SACD;IACF,CAAC;IACF,oBAAC;AAAD,CAAC,AAnQD,IAmQC","sourcesContent":["/*\n * Copyright (C) 2019 Toshiba Corporation\n * SPDX-License-Identifier: Apache-2.0\n */\n\nimport { interaction, Point, 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\";\n\nconst POSITION_X = 1;\nconst POSITION_Y = 2;\nconst ROTATION = 4;\nconst COLOR_FILL = 8;\nconst COLOR_STROKE = 16;\nconst COLOR_TEXT = 32;\nconst COLOR_TEXT_OUTLINE = 64;\nconst VISIBILITY = 128;\nconst HEIGHT = 256;\nconst WIDTH = 512;\nconst TEXT = 1024;\nconst CURSOR = 2048;\n\nexport const EShapeRuntimeReset = {\n\tNONE: 0,\n\tPOSITION_X,\n\tPOSITION_Y,\n\tPOSITION: POSITION_X | POSITION_Y,\n\tROTATION,\n\tCOLOR_FILL,\n\tCOLOR_STROKE,\n\tCOLOR_FILL_AND_STROKE: COLOR_FILL | COLOR_STROKE,\n\tCOLOR_TEXT,\n\tCOLOR_TEXT_OUTLINE,\n\tCOLOR: COLOR_FILL | COLOR_STROKE | COLOR_TEXT | COLOR_TEXT_OUTLINE,\n\tVISIBILITY,\n\tHEIGHT,\n\tWIDTH,\n\tSIZE: HEIGHT | WIDTH,\n\tTEXT,\n\tCURSOR\n} as const;\n\nexport type EShapeRuntimeReset = typeof EShapeRuntimeReset[keyof typeof EShapeRuntimeReset];\n\nexport class EShapeRuntime {\n\tx: number;\n\ty: number;\n\tsize: Point;\n\trotation: number;\n\tactions: EShapeActionRuntime[];\n\tfill: EShapeFillLike;\n\tstroke: EShapeStrokeLike;\n\ttext: EShapeTextLike;\n\tcursor: string;\n\n\treset: EShapeRuntimeReset;\n\twritten: EShapeRuntimeReset;\n\n\teffect: number;\n\n\tisStateChanged: boolean;\n\tinteractive: 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.size = new Point(size.x, 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\tthis.onInitialize(shape);\n\t\tshape.allowUploadedUpdate();\n\t}\n\n\tonInitialize(shape: EShape): void {\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}\n\n\tisActionable(): boolean {\n\t\treturn 0 < this.actions.length;\n\t}\n\n\tonClick(shape: EShape, e: InteractionEvent | KeyboardEvent): void {\n\t\tconst state = shape.state;\n\t\tif (state.isActionable) {\n\t\t\tstate.isClicked = true;\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\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\t\treturn false;\n\t}\n\n\tonOver(shape: EShape, e: InteractionEvent): void {\n\t\tshape.state.isHovered = true;\n\t}\n\n\tonOut(shape: EShape, e: InteractionEvent): void {\n\t\tshape.state.isHovered = false;\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\tif (!shape.state.isDown) {\n\t\t\t// Down / Press\n\t\t\tshape.state.addAll(EShapeState.DOWN, DBaseState.PRESSED);\n\n\t\t\t// Focus and states\n\t\t\tconst layer = DApplications.getLayer(shape);\n\t\t\tif (layer) {\n\t\t\t\t// Focus\n\t\t\t\tconst focusController = layer.getFocusController();\n\t\t\t\tfocusController.focus(focusController.findParent(shape));\n\t\t\t}\n\t\t}\n\n\t\t// Actions\n\t\tfor (let i = 0, imax = actions.length; i < imax; ++i) {\n\t\t\tactions[i].onDown(shape, this, e);\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\tstate.set(EShapeState.UP, DBaseState.PRESSED);\n\t\t}\n\t}\n\n\tonUpOutside(shape: EShape, e: InteractionEvent): void {\n\t\tshape.state.isPressed = false;\n\t}\n\n\tonMove(shape: EShape, e: InteractionEvent): void {\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\tif (UtilKeyboardEvent.isActivateKey(e)) {\n\t\t\tthis.onDown(shape, e);\n\t\t}\n\t\treturn false;\n\t}\n\n\tonKeyUp(shape: EShape, e: KeyboardEvent): boolean {\n\t\tif (UtilKeyboardEvent.isActivateKey(e)) {\n\t\t\tconst state = shape.state;\n\t\t\tconst wasUp = state.isUp;\n\t\t\tthis.onUp(shape, e);\n\t\t\tif (!wasUp && state.isUp) {\n\t\t\t\tthis.onClick(shape, e);\n\t\t\t}\n\t\t}\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\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\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\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\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\tshape.state.removeAll(\n\t\t\t\tEShapeState.CLICKED,\n\t\t\t\tEShapeState.DOWN,\n\t\t\t\tEShapeState.UP,\n\t\t\t\tEShapeState.ACTIVATED,\n\t\t\t\tEShapeState.DEACTIVATED\n\t\t\t);\n\t\t\tthis.isStateChanged = false;\n\t\t\tdata.isChanged = false;\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.size.y;\n\t\t\t}\n\t\t\tif (target & EShapeRuntimeReset.WIDTH) {\n\t\t\t\tshape.size.x = this.size.x;\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.js","sourceRoot":"","sources":["../../../../src/main/typescript/wcardinal/ui/shape/e-shape-runtime.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAe,KAAK,EAAY,MAAM,SAAS,CAAC;AAGvD,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,IAAM,UAAU,GAAG,CAAC,CAAC;AACrB,IAAM,UAAU,GAAG,CAAC,CAAC;AACrB,IAAM,QAAQ,GAAG,CAAC,CAAC;AACnB,IAAM,UAAU,GAAG,CAAC,CAAC;AACrB,IAAM,YAAY,GAAG,EAAE,CAAC;AACxB,IAAM,UAAU,GAAG,EAAE,CAAC;AACtB,IAAM,kBAAkB,GAAG,EAAE,CAAC;AAC9B,IAAM,UAAU,GAAG,GAAG,CAAC;AACvB,IAAM,MAAM,GAAG,GAAG,CAAC;AACnB,IAAM,KAAK,GAAG,GAAG,CAAC;AAClB,IAAM,IAAI,GAAG,IAAI,CAAC;AAClB,IAAM,MAAM,GAAG,IAAI,CAAC;AAEpB,MAAM,CAAC,IAAM,kBAAkB,GAAG;IACjC,IAAI,EAAE,CAAC;IACP,UAAU,YAAA;IACV,UAAU,YAAA;IACV,QAAQ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EAAE;gBAC3C,IAAM,IAAI,GAAG,IAAI,CAAC,IAAI,CAAC;gBACvB,KAAK,CAAC,IAAI,CAAC,GAAG,CAAC,SAAS,EAAE,IAAI,CAAC,KAAK,EAAE,IAAI,CAAC,KAAK,CAAC,CAAC;aAClD;YACD,IAAI,MAAM,GAAG,kBAAkB,CAAC,kBAAkB,EAAE;gBACnD,IAAM,OAAO,GAAG,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC;gBAClC,KAAK,CAAC,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,SAAS,EAAE,OAAO,CAAC,KAAK,EAAE,OAAO,CAAC,KAAK,CAAC,CAAC;aAChE;YACD,IAAI,MAAM,GAAG,kBAAkB,CAAC,MAAM,EAAE;gBACvC,KAAK,CAAC,IAAI,CAAC,CAAC,GAAG,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC;aAC3B;YACD,IAAI,MAAM,GAAG,kBAAkB,CAAC,KAAK,EAAE;gBACtC,KAAK,CAAC,IAAI,CAAC,CAAC,GAAG,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC;aAC3B;YACD,IAAI,MAAM,GAAG,kBAAkB,CAAC,QAAQ,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;IACF,oBAAC;AAAD,CAAC,AArQD,IAqQC","sourcesContent":["/*\n * Copyright (C) 2019 Toshiba Corporation\n * SPDX-License-Identifier: Apache-2.0\n */\n\nimport { interaction, Point, 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\";\n\nconst POSITION_X = 1;\nconst POSITION_Y = 2;\nconst ROTATION = 4;\nconst COLOR_FILL = 8;\nconst COLOR_STROKE = 16;\nconst COLOR_TEXT = 32;\nconst COLOR_TEXT_OUTLINE = 64;\nconst VISIBILITY = 128;\nconst HEIGHT = 256;\nconst WIDTH = 512;\nconst TEXT = 1024;\nconst CURSOR = 2048;\n\nexport const EShapeRuntimeReset = {\n\tNONE: 0,\n\tPOSITION_X,\n\tPOSITION_Y,\n\tPOSITION: POSITION_X | POSITION_Y,\n\tROTATION,\n\tCOLOR_FILL,\n\tCOLOR_STROKE,\n\tCOLOR_FILL_AND_STROKE: COLOR_FILL | COLOR_STROKE,\n\tCOLOR_TEXT,\n\tCOLOR_TEXT_OUTLINE,\n\tCOLOR: COLOR_FILL | COLOR_STROKE | COLOR_TEXT | COLOR_TEXT_OUTLINE,\n\tVISIBILITY,\n\tHEIGHT,\n\tWIDTH,\n\tSIZE: HEIGHT | WIDTH,\n\tTEXT,\n\tCURSOR\n} as const;\n\nexport type EShapeRuntimeReset = typeof EShapeRuntimeReset[keyof typeof EShapeRuntimeReset];\n\nexport class EShapeRuntime {\n\tx: number;\n\ty: number;\n\tsize: Point;\n\trotation: number;\n\tactions: EShapeActionRuntime[];\n\tfill: EShapeFillLike;\n\tstroke: EShapeStrokeLike;\n\ttext: EShapeTextLike;\n\tcursor: string;\n\n\treset: EShapeRuntimeReset;\n\twritten: EShapeRuntimeReset;\n\n\teffect: number;\n\n\tisStateChanged: boolean;\n\tinteractive: 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.size = new Point(size.x, 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\tthis.onInitialize(shape);\n\t\tshape.allowUploadedUpdate();\n\t}\n\n\tonInitialize(shape: EShape): void {\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}\n\n\tisActionable(): boolean {\n\t\treturn 0 < this.actions.length;\n\t}\n\n\tonClick(shape: EShape, e: InteractionEvent | KeyboardEvent): void {\n\t\tconst state = shape.state;\n\t\tif (state.isActionable) {\n\t\t\tstate.isClicked = true;\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\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\t\treturn false;\n\t}\n\n\tonOver(shape: EShape, e: InteractionEvent): void {\n\t\tshape.state.isHovered = true;\n\t}\n\n\tonOut(shape: EShape, e: InteractionEvent): void {\n\t\tshape.state.isHovered = false;\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\tif (!shape.state.isDown) {\n\t\t\t// Down / Press\n\t\t\tshape.state.addAll(EShapeState.DOWN, DBaseState.PRESSED);\n\n\t\t\t// Focus and states\n\t\t\tconst layer = DApplications.getLayer(shape);\n\t\t\tif (layer) {\n\t\t\t\t// Focus\n\t\t\t\tconst focusController = layer.getFocusController();\n\t\t\t\tfocusController.focus(focusController.findParent(shape));\n\t\t\t}\n\t\t}\n\n\t\t// Actions\n\t\tfor (let i = 0, imax = actions.length; i < imax; ++i) {\n\t\t\tactions[i].onDown(shape, this, e);\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\tstate.set(EShapeState.UP, DBaseState.PRESSED);\n\t\t}\n\t}\n\n\tonUpOutside(shape: EShape, e: InteractionEvent): void {\n\t\tshape.state.isPressed = false;\n\t}\n\n\tonMove(shape: EShape, e: InteractionEvent): void {\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\tif (UtilKeyboardEvent.isActivateKey(e)) {\n\t\t\tthis.onDown(shape, e);\n\t\t}\n\t\treturn false;\n\t}\n\n\tonKeyUp(shape: EShape, e: KeyboardEvent): boolean {\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\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\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\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\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\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\tshape.state.removeAll(\n\t\t\t\tEShapeState.CLICKED,\n\t\t\t\tEShapeState.DOWN,\n\t\t\t\tEShapeState.UP,\n\t\t\t\tEShapeState.ACTIVATED,\n\t\t\t\tEShapeState.DEACTIVATED\n\t\t\t);\n\t\t\tthis.isStateChanged = false;\n\t\t\tdata.isChanged = false;\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.size.y;\n\t\t\t}\n\t\t\tif (target & EShapeRuntimeReset.WIDTH) {\n\t\t\t\tshape.size.x = this.size.x;\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"]}
|
|
@@ -14,6 +14,9 @@ export * from "./e-shape-buffer-unit";
|
|
|
14
14
|
export * from "./e-shape-buffer";
|
|
15
15
|
export * from "./e-shape-capabilities";
|
|
16
16
|
export * from "./e-shape-capability";
|
|
17
|
+
export * from "./e-shape-connector-bodies";
|
|
18
|
+
export * from "./e-shape-connector-body-impl";
|
|
19
|
+
export * from "./e-shape-connector-body";
|
|
17
20
|
export * from "./e-shape-connector-container-impl";
|
|
18
21
|
export * from "./e-shape-connector-container";
|
|
19
22
|
export * from "./e-shape-connector-edge-acceptor-impl";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/main/typescript/wcardinal/ui/shape/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,cAAc,UAAU,CAAC;AACzB,cAAc,QAAQ,CAAC;AACvB,cAAc,WAAW,CAAC;AAC1B,cAAc,yBAAyB,CAAC;AACxC,cAAc,yBAAyB,CAAC;AACxC,cAAc,oBAAoB,CAAC;AACnC,cAAc,qBAAqB,CAAC;AACpC,cAAc,+BAA+B,CAAC;AAC9C,cAAc,uBAAuB,CAAC;AACtC,cAAc,kBAAkB,CAAC;AACjC,cAAc,wBAAwB,CAAC;AACvC,cAAc,sBAAsB,CAAC;AACrC,cAAc,oCAAoC,CAAC;AACnD,cAAc,+BAA+B,CAAC;AAC9C,cAAc,wCAAwC,CAAC;AACvD,cAAc,mCAAmC,CAAC;AAClD,cAAc,yCAAyC,CAAC;AACxD,cAAc,oCAAoC,CAAC;AACnD,cAAc,+BAA+B,CAAC;AAC9C,cAAc,0BAA0B,CAAC;AACzC,cAAc,qBAAqB,CAAC;AACpC,cAAc,sBAAsB,CAAC;AACrC,cAAc,qBAAqB,CAAC;AACpC,cAAc,qBAAqB,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B,CAAC;AACjC,cAAc,iCAAiC,CAAC;AAChD,cAAc,+BAA+B,CAAC;AAC9C,cAAc,sBAAsB,CAAC;AACrC,cAAc,0BAA0B,CAAC;AACzC,cAAc,uBAAuB,CAAC;AACtC,cAAc,wBAAwB,CAAC;AACvC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,4BAA4B,CAAC;AAC3C,cAAc,qBAAqB,CAAC;AACpC,cAAc,sBAAsB,CAAC;AACrC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,gCAAgC,CAAC;AAC/C,cAAc,oBAAoB,CAAC;AACnC,cAAc,qBAAqB,CAAC;AACpC,cAAc,6BAA6B,CAAC;AAC5C,cAAc,wBAAwB,CAAC;AACvC,cAAc,WAAW,CAAC","sourcesContent":["/*\n * Copyright (C) 2019 Toshiba Corporation\n * SPDX-License-Identifier: Apache-2.0\n */\n\nexport * from \"./action\";\nexport * from \"./load\";\nexport * from \"./variant\";\nexport * from \"./e-shape-acceptor-impl\";\nexport * from \"./e-shape-acceptor-type\";\nexport * from \"./e-shape-acceptor\";\nexport * from \"./e-shape-acceptors\";\nexport * from \"./e-shape-buffer-unit-builder\";\nexport * from \"./e-shape-buffer-unit\";\nexport * from \"./e-shape-buffer\";\nexport * from \"./e-shape-capabilities\";\nexport * from \"./e-shape-capability\";\nexport * from \"./e-shape-connector-container-impl\";\nexport * from \"./e-shape-connector-container\";\nexport * from \"./e-shape-connector-edge-acceptor-impl\";\nexport * from \"./e-shape-connector-edge-acceptor\";\nexport * from \"./e-shape-connector-edge-container-impl\";\nexport * from \"./e-shape-connector-edge-container\";\nexport * from \"./e-shape-connector-edge-impl\";\nexport * from \"./e-shape-connector-edge\";\nexport * from \"./e-shape-connector\";\nexport * from \"./e-shape-connectors\";\nexport * from \"./e-shape-container\";\nexport * from \"./e-shape-copy-part\";\nexport * from \"./e-shape-corner\";\nexport * from \"./e-shape-data-value-range\";\nexport * from \"./e-shape-data-value\";\nexport * from \"./e-shape-data\";\nexport * from \"./e-shape-defaults\";\nexport * from \"./e-shape-deleter\";\nexport * from \"./e-shape-deserializer\";\nexport * from \"./e-shape-deserializers\";\nexport * from \"./e-shape-editor\";\nexport * from \"./e-shape-fill\";\nexport * from \"./e-shape-gradient\";\nexport * from \"./e-shape-image-elements\";\nexport * from \"./e-shape-layer-container\";\nexport * from \"./e-shape-layer-state\";\nexport * from \"./e-shape-layer\";\nexport * from \"./e-shape-layout\";\nexport * from \"./e-shape-points-formatted\";\nexport * from \"./e-shape-points-formatter-curve\";\nexport * from \"./e-shape-points-formatter\";\nexport * from \"./e-shape-points-marker-base\";\nexport * from \"./e-shape-points-marker-container-impl-noop\";\nexport * from \"./e-shape-points-marker-container-impl\";\nexport * from \"./e-shape-points-marker-container\";\nexport * from \"./e-shape-points-marker-head\";\nexport * from \"./e-shape-points-marker-noop\";\nexport * from \"./e-shape-points-marker-tail\";\nexport * from \"./e-shape-points-marker-type\";\nexport * from \"./e-shape-points-marker\";\nexport * from \"./e-shape-points-style\";\nexport * from \"./e-shape-points-styles\";\nexport * from \"./e-shape-points\";\nexport * from \"./e-shape-renderer-iterator-datum\";\nexport * from \"./e-shape-renderer-iterator\";\nexport * from \"./e-shape-renderer\";\nexport * from \"./e-shape-resource-manager-deserialization\";\nexport * from \"./e-shape-resource-manager-serialization\";\nexport * from \"./e-shape-runtime\";\nexport * from \"./e-shape-runtimes\";\nexport * from \"./e-shape-search\";\nexport * from \"./e-shape-sizes\";\nexport * from \"./e-shape-state-set-impl-observable\";\nexport * from \"./e-shape-state-set\";\nexport * from \"./e-shape-state\";\nexport * from \"./e-shape-stroke-side\";\nexport * from \"./e-shape-stroke-style\";\nexport * from \"./e-shape-stroke\";\nexport * from \"./e-shape-text-align-horizontal\";\nexport * from \"./e-shape-text-align-vertical\";\nexport * from \"./e-shape-text-align\";\nexport * from \"./e-shape-text-direction\";\nexport * from \"./e-shape-text-offset\";\nexport * from \"./e-shape-text-outline\";\nexport * from \"./e-shape-text\";\nexport * from \"./e-shape-transform-parent\";\nexport * from \"./e-shape-transform\";\nexport * from \"./e-shape-transforms\";\nexport * from \"./e-shape-type\";\nexport * from \"./e-shape-uploaded-constructor\";\nexport * from \"./e-shape-uploaded\";\nexport * from \"./e-shape-uploadeds\";\nexport * from \"./e-shape-uuid-mapping-impl\";\nexport * from \"./e-shape-uuid-mapping\";\nexport * from \"./e-shape\";\n"]}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/main/typescript/wcardinal/ui/shape/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,cAAc,UAAU,CAAC;AACzB,cAAc,QAAQ,CAAC;AACvB,cAAc,WAAW,CAAC;AAC1B,cAAc,yBAAyB,CAAC;AACxC,cAAc,yBAAyB,CAAC;AACxC,cAAc,oBAAoB,CAAC;AACnC,cAAc,qBAAqB,CAAC;AACpC,cAAc,+BAA+B,CAAC;AAC9C,cAAc,uBAAuB,CAAC;AACtC,cAAc,kBAAkB,CAAC;AACjC,cAAc,wBAAwB,CAAC;AACvC,cAAc,sBAAsB,CAAC;AACrC,cAAc,4BAA4B,CAAC;AAC3C,cAAc,+BAA+B,CAAC;AAC9C,cAAc,0BAA0B,CAAC;AACzC,cAAc,oCAAoC,CAAC;AACnD,cAAc,+BAA+B,CAAC;AAC9C,cAAc,wCAAwC,CAAC;AACvD,cAAc,mCAAmC,CAAC;AAClD,cAAc,yCAAyC,CAAC;AACxD,cAAc,oCAAoC,CAAC;AACnD,cAAc,+BAA+B,CAAC;AAC9C,cAAc,0BAA0B,CAAC;AACzC,cAAc,qBAAqB,CAAC;AACpC,cAAc,sBAAsB,CAAC;AACrC,cAAc,qBAAqB,CAAC;AACpC,cAAc,qBAAqB,CAAC;AACpC,cAAc,kBAAkB,CAAC;AACjC,cAAc,4BAA4B,CAAC;AAC3C,cAAc,sBAAsB,CAAC;AACrC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,oBAAoB,CAAC;AACnC,cAAc,mBAAmB,CAAC;AAClC,cAAc,wBAA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AgB,CAAC;AAC/B,cAAc,4BAA4B,CAAC;AAC3C,cAAc,qBAAqB,CAAC;AACpC,cAAc,sBAAsB,CAAC;AACrC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,gCAAgC,CAAC;AAC/C,cAAc,oBAAoB,CAAC;AACnC,cAAc,qBAAqB,CAAC;AACpC,cAAc,6BAA6B,CAAC;AAC5C,cAAc,wBAAwB,CAAC;AACvC,cAAc,WAAW,CAAC","sourcesContent":["/*\n * Copyright (C) 2019 Toshiba Corporation\n * SPDX-License-Identifier: Apache-2.0\n */\n\nexport * from \"./action\";\nexport * from \"./load\";\nexport * from \"./variant\";\nexport * from \"./e-shape-acceptor-impl\";\nexport * from \"./e-shape-acceptor-type\";\nexport * from \"./e-shape-acceptor\";\nexport * from \"./e-shape-acceptors\";\nexport * from \"./e-shape-buffer-unit-builder\";\nexport * from \"./e-shape-buffer-unit\";\nexport * from \"./e-shape-buffer\";\nexport * from \"./e-shape-capabilities\";\nexport * from \"./e-shape-capability\";\nexport * from \"./e-shape-connector-bodies\";\nexport * from \"./e-shape-connector-body-impl\";\nexport * from \"./e-shape-connector-body\";\nexport * from \"./e-shape-connector-container-impl\";\nexport * from \"./e-shape-connector-container\";\nexport * from \"./e-shape-connector-edge-acceptor-impl\";\nexport * from \"./e-shape-connector-edge-acceptor\";\nexport * from \"./e-shape-connector-edge-container-impl\";\nexport * from \"./e-shape-connector-edge-container\";\nexport * from \"./e-shape-connector-edge-impl\";\nexport * from \"./e-shape-connector-edge\";\nexport * from \"./e-shape-connector\";\nexport * from \"./e-shape-connectors\";\nexport * from \"./e-shape-container\";\nexport * from \"./e-shape-copy-part\";\nexport * from \"./e-shape-corner\";\nexport * from \"./e-shape-data-value-range\";\nexport * from \"./e-shape-data-value\";\nexport * from \"./e-shape-data\";\nexport * from \"./e-shape-defaults\";\nexport * from \"./e-shape-deleter\";\nexport * from \"./e-shape-deserializer\";\nexport * from \"./e-shape-deserializers\";\nexport * from \"./e-shape-editor\";\nexport * from \"./e-shape-fill\";\nexport * from \"./e-shape-gradient\";\nexport * from \"./e-shape-image-elements\";\nexport * from \"./e-shape-layer-container\";\nexport * from \"./e-shape-layer-state\";\nexport * from \"./e-shape-layer\";\nexport * from \"./e-shape-layout\";\nexport * from \"./e-shape-points-formatted\";\nexport * from \"./e-shape-points-formatter-curve\";\nexport * from \"./e-shape-points-formatter\";\nexport * from \"./e-shape-points-marker-base\";\nexport * from \"./e-shape-points-marker-container-impl-noop\";\nexport * from \"./e-shape-points-marker-container-impl\";\nexport * from \"./e-shape-points-marker-container\";\nexport * from \"./e-shape-points-marker-head\";\nexport * from \"./e-shape-points-marker-noop\";\nexport * from \"./e-shape-points-marker-tail\";\nexport * from \"./e-shape-points-marker-type\";\nexport * from \"./e-shape-points-marker\";\nexport * from \"./e-shape-points-style\";\nexport * from \"./e-shape-points-styles\";\nexport * from \"./e-shape-points\";\nexport * from \"./e-shape-renderer-iterator-datum\";\nexport * from \"./e-shape-renderer-iterator\";\nexport * from \"./e-shape-renderer\";\nexport * from \"./e-shape-resource-manager-deserialization\";\nexport * from \"./e-shape-resource-manager-serialization\";\nexport * from \"./e-shape-runtime\";\nexport * from \"./e-shape-runtimes\";\nexport * from \"./e-shape-search\";\nexport * from \"./e-shape-sizes\";\nexport * from \"./e-shape-state-set-impl-observable\";\nexport * from \"./e-shape-state-set\";\nexport * from \"./e-shape-state\";\nexport * from \"./e-shape-stroke-side\";\nexport * from \"./e-shape-stroke-style\";\nexport * from \"./e-shape-stroke\";\nexport * from \"./e-shape-text-align-horizontal\";\nexport * from \"./e-shape-text-align-vertical\";\nexport * from \"./e-shape-text-align\";\nexport * from \"./e-shape-text-direction\";\nexport * from \"./e-shape-text-offset\";\nexport * from \"./e-shape-text-outline\";\nexport * from \"./e-shape-text\";\nexport * from \"./e-shape-transform-parent\";\nexport * from \"./e-shape-transform\";\nexport * from \"./e-shape-transforms\";\nexport * from \"./e-shape-type\";\nexport * from \"./e-shape-uploaded-constructor\";\nexport * from \"./e-shape-uploaded\";\nexport * from \"./e-shape-uploadeds\";\nexport * from \"./e-shape-uuid-mapping-impl\";\nexport * from \"./e-shape-uuid-mapping\";\nexport * from \"./e-shape\";\n"]}
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
* Copyright (C) 2019 Toshiba Corporation
|
|
3
3
|
* SPDX-License-Identifier: Apache-2.0
|
|
4
4
|
*/
|
|
5
|
+
import { EShapeConnectorBodies } from "../e-shape-connector-bodies";
|
|
5
6
|
import { EShapeDeserializer } from "../e-shape-deserializer";
|
|
6
7
|
import { EShapeConnectorLine } from "./e-shape-connector-line";
|
|
7
8
|
export var deserializeConnectorLine = function (item, manager) {
|
|
@@ -17,8 +18,25 @@ export var onConnectorLineDeserialized = function (item, shape, mapping, manager
|
|
|
17
18
|
parsed = JSON.parse(resources[resourceId]);
|
|
18
19
|
manager.setExtension(resourceId, parsed);
|
|
19
20
|
}
|
|
20
|
-
|
|
21
|
+
// Lock
|
|
22
|
+
shape.lock();
|
|
23
|
+
// Points
|
|
24
|
+
var points = shape.points;
|
|
25
|
+
points.deserialize(parsed[1], manager);
|
|
26
|
+
// Edge
|
|
21
27
|
shape.edge.deserialize(parsed[0], mapping, manager);
|
|
28
|
+
// Body
|
|
29
|
+
var body = shape.body;
|
|
30
|
+
var bodyId = parsed[2];
|
|
31
|
+
if (bodyId != null) {
|
|
32
|
+
body.deserialize(bodyId, mapping, manager);
|
|
33
|
+
}
|
|
34
|
+
else {
|
|
35
|
+
// The following is for backward compatibility.
|
|
36
|
+
body.set(EShapeConnectorBodies.from(points.values));
|
|
37
|
+
}
|
|
38
|
+
// Unlock
|
|
39
|
+
shape.unlock();
|
|
22
40
|
}
|
|
23
41
|
}
|
|
24
42
|
};
|
|
@@ -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,kBAAkB,EAAE,MAAM,yBAAyB,CAAC;AAG7D,OAAO,EAAE,mBAAmB,EAAE,MAAM,0BAA0B,CAAC;AAE/D,MAAM,CAAC,IAAM,wBAAwB,GAAG,UACvC,IAA4B,EAC5B,OAA6C;IAE7C,OAAO,kBAAkB,CAAC,WAAW,CAAC,IAAI,EAAE,OAAO,EAAE,IAAI,mBAAmB,EAAE,CAAC,CAAC;AACjF,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,
|
|
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;AACpE,OAAO,EAAE,kBAAkB,EAAE,MAAM,yBAAyB,CAAC;AAG7D,OAAO,EAAE,mBAAmB,EAAE,MAAM,0BAA0B,CAAC;AAE/D,MAAM,CAAC,IAAM,wBAAwB,GAAG,UACvC,IAA4B,EAC5B,OAA6C;IAE7C,OAAO,kBAAkB,CAAC,WAAW,CAAC,IAAI,EAAE,OAAO,EAAE,IAAI,mBAAmB,EAAE,CAAC,CAAC;AACjF,CAAC,CAAC;AAEF,MAAM,CAAC,IAAM,2BAA2B,GAAG,UAC1C,IAA4B,EAC5B,KAAa,EACb,OAA0B,EAC1B,OAA6C;IAE7C,IAAI,KAAK,YAAY,mBAAmB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\nimport { DDiagramSerializedItem } from \"../../d-diagram-serialized\";\nimport { EShape } from \"../e-shape\";\nimport { EShapeConnectorBodies } from \"../e-shape-connector-bodies\";\nimport { EShapeDeserializer } from \"../e-shape-deserializer\";\nimport { EShapeResourceManagerDeserialization } from \"../e-shape-resource-manager-deserialization\";\nimport { EShapeUuidMapping } from \"../e-shape-uuid-mapping\";\nimport { EShapeConnectorLine } from \"./e-shape-connector-line\";\n\nexport const deserializeConnectorLine = (\n\titem: DDiagramSerializedItem,\n\tmanager: EShapeResourceManagerDeserialization\n): Promise<EShapeConnectorLine> | EShapeConnectorLine | null => {\n\treturn EShapeDeserializer.deserialize(item, manager, new EShapeConnectorLine());\n};\n\nexport const onConnectorLineDeserialized = (\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\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\tshape.edge.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(EShapeConnectorBodies.from(points.values));\n\t\t\t}\n\n\t\t\t// Unlock\n\t\t\tshape.unlock();\n\t\t}\n\t}\n};\n"]}
|
|
@@ -10,6 +10,7 @@ import { EShapeLinePoints } from "./e-shape-line-points";
|
|
|
10
10
|
import { EShapeDefaults } from "../e-shape-defaults";
|
|
11
11
|
import { EShapeCopyPart } from "../e-shape-copy-part";
|
|
12
12
|
import { toPointsBoundary } from "../e-shape-points-formatted";
|
|
13
|
+
import { EShapeConnectorBodyImpl } from "../e-shape-connector-body-impl";
|
|
13
14
|
var EShapeConnectorLine = /** @class */ (function (_super) {
|
|
14
15
|
__extends(EShapeConnectorLine, _super);
|
|
15
16
|
function EShapeConnectorLine(type) {
|
|
@@ -19,16 +20,36 @@ var EShapeConnectorLine = /** @class */ (function (_super) {
|
|
|
19
20
|
_this._tailMargin = 0;
|
|
20
21
|
_this._headLocalId = 0;
|
|
21
22
|
_this._headMargin = 0;
|
|
23
|
+
_this._bodyId = 0;
|
|
24
|
+
_this._lockCount = 0;
|
|
25
|
+
_this._isChanged = false;
|
|
22
26
|
var sx = EShapeDefaults.SIZE_X;
|
|
23
27
|
var sy = EShapeDefaults.SIZE_Y;
|
|
24
28
|
var hx = sx * 0.5;
|
|
25
29
|
var hy = sy * 0.5;
|
|
26
|
-
_this._points = new EShapeLinePoints(_this).set(
|
|
27
|
-
|
|
28
|
-
_this.
|
|
29
|
-
}
|
|
30
|
+
_this._points = new EShapeLinePoints(_this).set([-hx, -hy, +hx, +hy]);
|
|
31
|
+
var onChangeBound = function () {
|
|
32
|
+
_this.onChange();
|
|
33
|
+
};
|
|
34
|
+
_this._edge = new EShapeConnectorEdgeContainerImpl(_this, onChangeBound);
|
|
35
|
+
_this._body = new EShapeConnectorBodyImpl(_this, onChangeBound);
|
|
30
36
|
return _this;
|
|
31
37
|
}
|
|
38
|
+
EShapeConnectorLine.prototype.lock = function () {
|
|
39
|
+
this._lockCount += 1;
|
|
40
|
+
if (this._lockCount === 1) {
|
|
41
|
+
this._isChanged = false;
|
|
42
|
+
}
|
|
43
|
+
};
|
|
44
|
+
EShapeConnectorLine.prototype.unlock = function () {
|
|
45
|
+
this._lockCount -= 1;
|
|
46
|
+
if (this._lockCount === 0) {
|
|
47
|
+
if (this._isChanged) {
|
|
48
|
+
this.onChange();
|
|
49
|
+
}
|
|
50
|
+
this._isChanged = false;
|
|
51
|
+
}
|
|
52
|
+
};
|
|
32
53
|
Object.defineProperty(EShapeConnectorLine.prototype, "points", {
|
|
33
54
|
get: function () {
|
|
34
55
|
return this._points;
|
|
@@ -43,6 +64,13 @@ var EShapeConnectorLine = /** @class */ (function (_super) {
|
|
|
43
64
|
enumerable: false,
|
|
44
65
|
configurable: true
|
|
45
66
|
});
|
|
67
|
+
Object.defineProperty(EShapeConnectorLine.prototype, "body", {
|
|
68
|
+
get: function () {
|
|
69
|
+
return this._body;
|
|
70
|
+
},
|
|
71
|
+
enumerable: false,
|
|
72
|
+
configurable: true
|
|
73
|
+
});
|
|
46
74
|
EShapeConnectorLine.prototype.onAttach = function () {
|
|
47
75
|
_super.prototype.onAttach.call(this);
|
|
48
76
|
this._edge.attach();
|
|
@@ -51,8 +79,12 @@ var EShapeConnectorLine = /** @class */ (function (_super) {
|
|
|
51
79
|
this._edge.detach();
|
|
52
80
|
_super.prototype.onDetach.call(this);
|
|
53
81
|
};
|
|
54
|
-
EShapeConnectorLine.prototype.
|
|
82
|
+
EShapeConnectorLine.prototype.onChange = function () {
|
|
55
83
|
var _a;
|
|
84
|
+
if (0 < this._lockCount) {
|
|
85
|
+
this._isChanged = true;
|
|
86
|
+
return;
|
|
87
|
+
}
|
|
56
88
|
var edge = this._edge;
|
|
57
89
|
var tail = edge.tail;
|
|
58
90
|
var tailLocalId = tail.localId;
|
|
@@ -60,22 +92,29 @@ var EShapeConnectorLine = /** @class */ (function (_super) {
|
|
|
60
92
|
var head = edge.head;
|
|
61
93
|
var headLocalId = head.localId;
|
|
62
94
|
var headMargin = head.margin;
|
|
95
|
+
var body = this._body;
|
|
96
|
+
var bodyId = body.id;
|
|
63
97
|
if (this._tailLocalId !== tailLocalId ||
|
|
64
98
|
this._tailMargin !== tailMargin ||
|
|
65
99
|
this._headLocalId !== headLocalId ||
|
|
66
|
-
this._headMargin !== headMargin
|
|
100
|
+
this._headMargin !== headMargin ||
|
|
101
|
+
this._bodyId !== bodyId) {
|
|
67
102
|
this._tailLocalId = tailLocalId;
|
|
68
103
|
this._tailMargin = tailMargin;
|
|
69
104
|
this._headLocalId = headLocalId;
|
|
70
105
|
this._headMargin = headMargin;
|
|
71
|
-
|
|
106
|
+
this._bodyId !== bodyId;
|
|
107
|
+
// Tail
|
|
72
108
|
var tailLocal = tail.local;
|
|
73
109
|
var tailLocalX = tailLocal.x;
|
|
74
110
|
var tailLocalY = tailLocal.y;
|
|
75
|
-
//
|
|
111
|
+
// Head
|
|
76
112
|
var headLocal = head.local;
|
|
77
113
|
var headLocalX = headLocal.x;
|
|
78
114
|
var headLocalY = headLocal.y;
|
|
115
|
+
// Body
|
|
116
|
+
var bodyValues = body.values;
|
|
117
|
+
var bodyValuesLength = bodyValues.length;
|
|
79
118
|
// Values
|
|
80
119
|
var transform = this.transform;
|
|
81
120
|
var transformPosition = transform.position;
|
|
@@ -83,7 +122,58 @@ var EShapeConnectorLine = /** @class */ (function (_super) {
|
|
|
83
122
|
var py = transformPosition.y;
|
|
84
123
|
var points = this._points;
|
|
85
124
|
var values = points.values;
|
|
86
|
-
|
|
125
|
+
if (values.length < 4) {
|
|
126
|
+
values[0] = 0;
|
|
127
|
+
values[1] = 0;
|
|
128
|
+
}
|
|
129
|
+
var threshold = 0.000001;
|
|
130
|
+
var x0 = tailLocalX - px;
|
|
131
|
+
var y0 = tailLocalY - py;
|
|
132
|
+
var x1 = headLocalX - px;
|
|
133
|
+
var y1 = headLocalY - py;
|
|
134
|
+
// Body
|
|
135
|
+
if (0 < bodyValuesLength) {
|
|
136
|
+
var cx_1 = (x1 + x0) * 0.5;
|
|
137
|
+
var cy_1 = (y1 + y0) * 0.5;
|
|
138
|
+
var dx = x1 - x0;
|
|
139
|
+
var dy = y1 - y0;
|
|
140
|
+
var a = Math.atan2(dy, dx);
|
|
141
|
+
var c = Math.cos(a);
|
|
142
|
+
var s = Math.sin(a);
|
|
143
|
+
var l = Math.sqrt(dx * dx + dy * dy);
|
|
144
|
+
for (var i = 0; i < bodyValuesLength; i += 2) {
|
|
145
|
+
var x = bodyValues[i + 0];
|
|
146
|
+
var y = bodyValues[i + 1];
|
|
147
|
+
values[i + 2] = cx_1 + (c * x - s * y) * l;
|
|
148
|
+
values[i + 3] = cy_1 + (c * y + s * x) * l;
|
|
149
|
+
}
|
|
150
|
+
}
|
|
151
|
+
// Tail
|
|
152
|
+
values[0] = x0;
|
|
153
|
+
values[1] = y0;
|
|
154
|
+
if (tailMargin !== 0) {
|
|
155
|
+
var dx = values[2] - x0;
|
|
156
|
+
var dy = values[3] - y0;
|
|
157
|
+
var d = dx * dx + dy * dy;
|
|
158
|
+
if (threshold < d) {
|
|
159
|
+
var f = tailMargin / Math.sqrt(dx * dx + dy * dy);
|
|
160
|
+
values[0] = x0 + dx * f;
|
|
161
|
+
values[1] = y0 + dy * f;
|
|
162
|
+
}
|
|
163
|
+
}
|
|
164
|
+
// Head
|
|
165
|
+
values[2 + bodyValuesLength] = x1;
|
|
166
|
+
values[3 + bodyValuesLength] = y1;
|
|
167
|
+
if (headMargin !== 0) {
|
|
168
|
+
var dx = values[0 + bodyValuesLength] - x1;
|
|
169
|
+
var dy = values[1 + bodyValuesLength] - y1;
|
|
170
|
+
var d = dx * dx + dy * dy;
|
|
171
|
+
if (threshold < d) {
|
|
172
|
+
var f = headMargin / Math.sqrt(dx * dx + dy * dy);
|
|
173
|
+
values[2 + bodyValuesLength] = x1 + dx * f;
|
|
174
|
+
values[3 + bodyValuesLength] = y1 + dy * f;
|
|
175
|
+
}
|
|
176
|
+
}
|
|
87
177
|
// Center & size
|
|
88
178
|
var boundary = ((_a = EShapeConnectorLine.WORK_BOUNDARY) !== null && _a !== void 0 ? _a : (EShapeConnectorLine.WORK_BOUNDARY = [0, 0, 0, 0]));
|
|
89
179
|
toPointsBoundary(values, boundary);
|
|
@@ -107,82 +197,12 @@ var EShapeConnectorLine = /** @class */ (function (_super) {
|
|
|
107
197
|
this.allowUploadedUpdate();
|
|
108
198
|
}
|
|
109
199
|
};
|
|
110
|
-
EShapeConnectorLine.prototype.toValues = function (x0, y0, x1, y1, margin0, margin1, result) {
|
|
111
|
-
var threshold = 0.000001;
|
|
112
|
-
var resultLength = result.length;
|
|
113
|
-
if (resultLength <= 4) {
|
|
114
|
-
if (margin0 !== 0 || margin1 !== 0) {
|
|
115
|
-
var dx = x1 - x0;
|
|
116
|
-
var dy = y1 - y0;
|
|
117
|
-
var d = dx * dx + dy * dy;
|
|
118
|
-
if (threshold < d) {
|
|
119
|
-
var f = 1 / Math.sqrt(dx * dx + dy * dy);
|
|
120
|
-
var nx = dx * f;
|
|
121
|
-
var ny = dy * f;
|
|
122
|
-
result[0] = x0 + margin0 * nx;
|
|
123
|
-
result[1] = y0 + margin0 * ny;
|
|
124
|
-
result[2] = x1 - margin1 * nx;
|
|
125
|
-
result[3] = y1 - margin1 * ny;
|
|
126
|
-
}
|
|
127
|
-
else {
|
|
128
|
-
result[0] = x0;
|
|
129
|
-
result[1] = y0;
|
|
130
|
-
result[2] = x1;
|
|
131
|
-
result[3] = y1;
|
|
132
|
-
}
|
|
133
|
-
}
|
|
134
|
-
else {
|
|
135
|
-
result[0] = x0;
|
|
136
|
-
result[1] = y0;
|
|
137
|
-
result[2] = x1;
|
|
138
|
-
result[3] = y1;
|
|
139
|
-
}
|
|
140
|
-
}
|
|
141
|
-
else {
|
|
142
|
-
if (margin0 !== 0) {
|
|
143
|
-
var dx = result[2] - x0;
|
|
144
|
-
var dy = result[3] - y0;
|
|
145
|
-
var d = dx * dx + dy * dy;
|
|
146
|
-
if (threshold < d) {
|
|
147
|
-
var f = 1 / Math.sqrt(dx * dx + dy * dy);
|
|
148
|
-
result[0] = x0 + margin0 * dx * f;
|
|
149
|
-
result[1] = y0 + margin0 * dy * f;
|
|
150
|
-
}
|
|
151
|
-
else {
|
|
152
|
-
result[0] = x0;
|
|
153
|
-
result[1] = y0;
|
|
154
|
-
}
|
|
155
|
-
}
|
|
156
|
-
else {
|
|
157
|
-
result[0] = x0;
|
|
158
|
-
result[1] = y0;
|
|
159
|
-
}
|
|
160
|
-
if (margin1 !== 0) {
|
|
161
|
-
var dx = result[resultLength - 4] - x1;
|
|
162
|
-
var dy = result[resultLength - 3] - y1;
|
|
163
|
-
var d = dx * dx + dy * dy;
|
|
164
|
-
if (threshold < d) {
|
|
165
|
-
var f = 1 / Math.sqrt(dx * dx + dy * dy);
|
|
166
|
-
result[resultLength - 2] = x1 + margin1 * dx * f;
|
|
167
|
-
result[resultLength - 1] = y1 + margin1 * dy * f;
|
|
168
|
-
}
|
|
169
|
-
else {
|
|
170
|
-
result[resultLength - 2] = x1;
|
|
171
|
-
result[resultLength - 1] = y1;
|
|
172
|
-
}
|
|
173
|
-
}
|
|
174
|
-
else {
|
|
175
|
-
result[resultLength - 2] = x1;
|
|
176
|
-
result[resultLength - 1] = y1;
|
|
177
|
-
}
|
|
178
|
-
}
|
|
179
|
-
return result;
|
|
180
|
-
};
|
|
181
200
|
EShapeConnectorLine.prototype.copy = function (source, part) {
|
|
182
201
|
if (part === void 0) { part = EShapeCopyPart.ALL; }
|
|
183
202
|
_super.prototype.copy.call(this, source, part);
|
|
184
203
|
if (source instanceof EShapeConnectorLine) {
|
|
185
204
|
this._edge.copy(source.edge);
|
|
205
|
+
this._body.copy(source.body);
|
|
186
206
|
}
|
|
187
207
|
return this;
|
|
188
208
|
};
|
|
@@ -191,7 +211,10 @@ var EShapeConnectorLine = /** @class */ (function (_super) {
|
|
|
191
211
|
};
|
|
192
212
|
EShapeConnectorLine.prototype.serialize = function (manager) {
|
|
193
213
|
var result = _super.prototype.serialize.call(this, manager);
|
|
194
|
-
|
|
214
|
+
var edgeId = this._edge.serialize(manager);
|
|
215
|
+
var bodyId = this._body.serialize(manager);
|
|
216
|
+
var pointsId = this._points.serialize(manager);
|
|
217
|
+
result[15] = manager.addResource("[" + edgeId + "," + pointsId + "," + bodyId + "]");
|
|
195
218
|
return result;
|
|
196
219
|
};
|
|
197
220
|
return EShapeConnectorLine;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"e-shape-connector-line.js","sourceRoot":"","sources":["../../../../../src/main/typescript/wcardinal/ui/shape/variant/e-shape-connector-line.ts"],"names":[],"mappings":"AAAA;;;GAGG;;AAEH,OAAO,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAG7C,OAAO,EAAE,gCAAgC,EAAE,MAAM,0CAA0C,CAAC;AAC5F,OAAO,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AACrD,OAAO,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AACzD,OAAO,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AACrD,OAAO,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AAItD,OAAO,EAAE,gBAAgB,EAAE,MAAM,6BAA6B,CAAC;AAE/D;IAAyC,uCAAc;IAStD,6BAAY,IAA4C;QAA5C,qBAAA,EAAA,OAAmB,UAAU,CAAC,cAAc;QAAxD,YACC,kBAAM,IAAI,CAAC,SAaX;QAZA,KAAI,CAAC,YAAY,GAAG,CAAC,CAAC;QACtB,KAAI,CAAC,WAAW,GAAG,CAAC,CAAC;QACrB,KAAI,CAAC,YAAY,GAAG,CAAC,CAAC;QACtB,KAAI,CAAC,WAAW,GAAG,CAAC,CAAC;QACrB,IAAM,EAAE,GAAG,cAAc,CAAC,MAAM,CAAC;QACjC,IAAM,EAAE,GAAG,cAAc,CAAC,MAAM,CAAC;QACjC,IAAM,EAAE,GAAG,EAAE,GAAG,GAAG,CAAC;QACpB,IAAM,EAAE,GAAG,EAAE,GAAG,GAAG,CAAC;QACpB,KAAI,CAAC,OAAO,GAAG,IAAI,gBAAgB,CAAC,KAAI,CAAC,CAAC,GAAG,CAAC,KAAI,CAAC,QAAQ,CAAC,CAA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QACF,OAAO,MAAM,CAAC;IACf,CAAC;IACF,0BAAC;AAAD,CAAC,AAhND,CAAyC,cAAc,GAgNtD","sourcesContent":["/*\n * Copyright (C) 2019 Toshiba Corporation\n * SPDX-License-Identifier: Apache-2.0\n */\n\nimport { EShapeType } from \"../e-shape-type\";\nimport { EShapeConnector } from \"../e-shape-connector\";\nimport { EShapeConnectorEdgeContainer } from \"../e-shape-connector-edge-container\";\nimport { EShapeConnectorEdgeContainerImpl } from \"../e-shape-connector-edge-container-impl\";\nimport { EShapeLineBase } from \"./e-shape-line-base\";\nimport { EShapeLinePoints } from \"./e-shape-line-points\";\nimport { EShapeDefaults } from \"../e-shape-defaults\";\nimport { EShapeCopyPart } from \"../e-shape-copy-part\";\nimport { DDiagramSerializedItem } from \"../../d-diagram-serialized\";\nimport { EShapeResourceManagerSerialization } from \"../e-shape-resource-manager-serialization\";\nimport { EShape } from \"../e-shape\";\nimport { toPointsBoundary } from \"../e-shape-points-formatted\";\n\nexport class EShapeConnectorLine extends EShapeLineBase implements EShapeConnector {\n\tprotected static WORK_BOUNDARY: [number, number, number, number];\n\tprotected _edge: EShapeConnectorEdgeContainer;\n\tprotected declare _points: EShapeLinePoints;\n\tprotected _tailLocalId: number;\n\tprotected _tailMargin: number;\n\tprotected _headLocalId: number;\n\tprotected _headMargin: number;\n\n\tconstructor(type: EShapeType = EShapeType.CONNECTOR_LINE) {\n\t\tsuper(type);\n\t\tthis._tailLocalId = 0;\n\t\tthis._tailMargin = 0;\n\t\tthis._headLocalId = 0;\n\t\tthis._headMargin = 0;\n\t\tconst sx = EShapeDefaults.SIZE_X;\n\t\tconst sy = EShapeDefaults.SIZE_Y;\n\t\tconst hx = sx * 0.5;\n\t\tconst hy = sy * 0.5;\n\t\tthis._points = new EShapeLinePoints(this).set(this.toValues(-hx, -hy, +hx, +hy, 0, 0, []));\n\t\tthis._edge = new EShapeConnectorEdgeContainerImpl(this, (): void => {\n\t\t\tthis.onEdgeChange();\n\t\t});\n\t}\n\n\tget points(): EShapeLinePoints {\n\t\treturn this._points;\n\t}\n\n\tget edge(): EShapeConnectorEdgeContainer {\n\t\treturn this._edge;\n\t}\n\n\tonAttach(): void {\n\t\tsuper.onAttach();\n\t\tthis._edge.attach();\n\t}\n\n\tonDetach(): void {\n\t\tthis._edge.detach();\n\t\tsuper.onDetach();\n\t}\n\n\tprotected onEdgeChange(): void {\n\t\tconst edge = this._edge;\n\t\tconst tail = edge.tail;\n\t\tconst tailLocalId = tail.localId;\n\t\tconst tailMargin = tail.margin;\n\t\tconst head = edge.head;\n\t\tconst headLocalId = head.localId;\n\t\tconst headMargin = head.margin;\n\t\tif (\n\t\t\tthis._tailLocalId !== tailLocalId ||\n\t\t\tthis._tailMargin !== tailMargin ||\n\t\t\tthis._headLocalId !== headLocalId ||\n\t\t\tthis._headMargin !== headMargin\n\t\t) {\n\t\t\tthis._tailLocalId = tailLocalId;\n\t\t\tthis._tailMargin = tailMargin;\n\t\t\tthis._headLocalId = headLocalId;\n\t\t\tthis._headMargin = headMargin;\n\n\t\t\t// Left\n\t\t\tconst tailLocal = tail.local;\n\t\t\tconst tailLocalX = tailLocal.x;\n\t\t\tconst tailLocalY = tailLocal.y;\n\n\t\t\t// Right\n\t\t\tconst headLocal = head.local;\n\t\t\tconst headLocalX = headLocal.x;\n\t\t\tconst headLocalY = headLocal.y;\n\n\t\t\t// Values\n\t\t\tconst transform = this.transform;\n\t\t\tconst transformPosition = transform.position;\n\t\t\tconst px = transformPosition.x;\n\t\t\tconst py = transformPosition.y;\n\t\t\tconst points = this._points;\n\t\t\tconst values = points.values;\n\t\t\tthis.toValues(\n\t\t\t\ttailLocalX - px,\n\t\t\t\ttailLocalY - py,\n\t\t\t\theadLocalX - px,\n\t\t\t\theadLocalY - py,\n\t\t\t\ttailMargin,\n\t\t\t\theadMargin,\n\t\t\t\tvalues\n\t\t\t);\n\n\t\t\t// Center & size\n\t\t\tconst boundary = (EShapeConnectorLine.WORK_BOUNDARY ??= [0, 0, 0, 0]);\n\t\t\ttoPointsBoundary(values, boundary);\n\t\t\tconst cx = (boundary[2] + boundary[0]) * 0.5;\n\t\t\tconst cy = (boundary[3] + boundary[1]) * 0.5;\n\t\t\tconst sx = boundary[2] - boundary[0];\n\t\t\tconst sy = boundary[3] - boundary[1];\n\n\t\t\t// Adjust values\n\t\t\tfor (let i = 0, imax = values.length; i < imax; i += 2) {\n\t\t\t\tvalues[i + 0] -= cx;\n\t\t\t\tvalues[i + 1] -= cy;\n\t\t\t}\n\n\t\t\tthis.disallowUploadedUpdate();\n\t\t\ttransformPosition.set(px + cx, py + cy);\n\t\t\ttransform.scale.set(1, 1);\n\t\t\ttransform.rotation = 0;\n\t\t\ttransform.skew.set(0, 0);\n\t\t\tthis.size.set(sx, sy);\n\t\t\tpoints.toFitted();\n\t\t\tpoints.set(values);\n\t\t\tthis.allowUploadedUpdate();\n\t\t}\n\t}\n\n\tprotected toValues(\n\t\tx0: number,\n\t\ty0: number,\n\t\tx1: number,\n\t\ty1: number,\n\t\tmargin0: number,\n\t\tmargin1: number,\n\t\tresult: number[]\n\t): number[] {\n\t\tconst threshold = 0.000001;\n\t\tconst resultLength = result.length;\n\t\tif (resultLength <= 4) {\n\t\t\tif (margin0 !== 0 || margin1 !== 0) {\n\t\t\t\tconst dx = x1 - x0;\n\t\t\t\tconst dy = y1 - y0;\n\t\t\t\tconst d = dx * dx + dy * dy;\n\t\t\t\tif (threshold < d) {\n\t\t\t\t\tconst f = 1 / Math.sqrt(dx * dx + dy * dy);\n\t\t\t\t\tconst nx = dx * f;\n\t\t\t\t\tconst ny = dy * f;\n\t\t\t\t\tresult[0] = x0 + margin0 * nx;\n\t\t\t\t\tresult[1] = y0 + margin0 * ny;\n\t\t\t\t\tresult[2] = x1 - margin1 * nx;\n\t\t\t\t\tresult[3] = y1 - margin1 * ny;\n\t\t\t\t} else {\n\t\t\t\t\tresult[0] = x0;\n\t\t\t\t\tresult[1] = y0;\n\t\t\t\t\tresult[2] = x1;\n\t\t\t\t\tresult[3] = y1;\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tresult[0] = x0;\n\t\t\t\tresult[1] = y0;\n\t\t\t\tresult[2] = x1;\n\t\t\t\tresult[3] = y1;\n\t\t\t}\n\t\t} else {\n\t\t\tif (margin0 !== 0) {\n\t\t\t\tconst dx = result[2] - x0;\n\t\t\t\tconst dy = result[3] - y0;\n\t\t\t\tconst d = dx * dx + dy * dy;\n\t\t\t\tif (threshold < d) {\n\t\t\t\t\tconst f = 1 / Math.sqrt(dx * dx + dy * dy);\n\t\t\t\t\tresult[0] = x0 + margin0 * dx * f;\n\t\t\t\t\tresult[1] = y0 + margin0 * dy * f;\n\t\t\t\t} else {\n\t\t\t\t\tresult[0] = x0;\n\t\t\t\t\tresult[1] = y0;\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tresult[0] = x0;\n\t\t\t\tresult[1] = y0;\n\t\t\t}\n\n\t\t\tif (margin1 !== 0) {\n\t\t\t\tconst dx = result[resultLength - 4] - x1;\n\t\t\t\tconst dy = result[resultLength - 3] - y1;\n\t\t\t\tconst d = dx * dx + dy * dy;\n\t\t\t\tif (threshold < d) {\n\t\t\t\t\tconst f = 1 / Math.sqrt(dx * dx + dy * dy);\n\t\t\t\t\tresult[resultLength - 2] = x1 + margin1 * dx * f;\n\t\t\t\t\tresult[resultLength - 1] = y1 + margin1 * dy * f;\n\t\t\t\t} else {\n\t\t\t\t\tresult[resultLength - 2] = x1;\n\t\t\t\t\tresult[resultLength - 1] = y1;\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tresult[resultLength - 2] = x1;\n\t\t\t\tresult[resultLength - 1] = y1;\n\t\t\t}\n\t\t}\n\t\treturn result;\n\t}\n\n\tcopy(source: EShape, part: EShapeCopyPart = EShapeCopyPart.ALL): this {\n\t\tsuper.copy(source, part);\n\t\tif (source instanceof EShapeConnectorLine) {\n\t\t\tthis._edge.copy(source.edge);\n\t\t}\n\t\treturn this;\n\t}\n\n\tclone(): EShapeConnectorLine {\n\t\treturn new EShapeConnectorLine().copy(this);\n\t}\n\n\tserialize(manager: EShapeResourceManagerSerialization): DDiagramSerializedItem {\n\t\tconst result = super.serialize(manager);\n\t\tresult[15] = manager.addResource(\n\t\t\t`[${this._edge.serialize(manager)},${this._points.serialize(manager)}]`\n\t\t);\n\t\treturn result;\n\t}\n}\n"]}
|
|
1
|
+
{"version":3,"file":"e-shape-connector-line.js","sourceRoot":"","sources":["../../../../../src/main/typescript/wcardinal/ui/shape/variant/e-shape-connector-line.ts"],"names":[],"mappings":"AAAA;;;GAGG;;AAEH,OAAO,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAG7C,OAAO,EAAE,gCAAgC,EAAE,MAAM,0CAA0C,CAAC;AAC5F,OAAO,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AACrD,OAAO,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AACzD,OAAO,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AACrD,OAAO,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AAItD,OAAO,EAAE,gBAAgB,EAAE,MAAM,6BAA6B,CAAC;AAE/D,OAAO,EAAE,uBAAuB,EAAE,MAAM,gCAAgC,CAAC;AAEzE;IAAyC,uCAAc;IAatD,6BAAY,IAA4C;QAA5C,qBAAA,EAAA,OAAmB,UAAU,CAAC,cAAc;QAAxD,YACC,kBAAM,IAAI,CAAC,SAkBX;QAjBA,KAAI,CAAC,YAAY,GAAG,CAAC,CAAC;QACtB,KAAI,CAAC,WAAW,GAAG,CAAC,CAAC;QACrB,KAAI,CAAC,YAAY,GAAG,CAAC,CAAC;QACtB,KAAI,CAAC,WAAW,GAAG,CAAC,CAAC;QACrB,KAAI,CAAC,OAAO,GAAG,CAAC,CAAC;QACjB,KAAI,CAAC,UAAU,GAAG,CAAC,CAAC;QACpB,KAAI,CAAC,UAAU,GAAG,KAAK,CAAC;QACxB,IAAM,EAAE,GAAG,cAAc,CAAC,MAAM,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nector } from \"../e-shape-connector\";\nimport { EShapeConnectorEdgeContainer } from \"../e-shape-connector-edge-container\";\nimport { EShapeConnectorEdgeContainerImpl } from \"../e-shape-connector-edge-container-impl\";\nimport { EShapeLineBase } from \"./e-shape-line-base\";\nimport { EShapeLinePoints } from \"./e-shape-line-points\";\nimport { EShapeDefaults } from \"../e-shape-defaults\";\nimport { EShapeCopyPart } from \"../e-shape-copy-part\";\nimport { DDiagramSerializedItem } from \"../../d-diagram-serialized\";\nimport { EShapeResourceManagerSerialization } from \"../e-shape-resource-manager-serialization\";\nimport { EShape } from \"../e-shape\";\nimport { toPointsBoundary } from \"../e-shape-points-formatted\";\nimport { EShapeConnectorBody } from \"../e-shape-connector-body\";\nimport { EShapeConnectorBodyImpl } from \"../e-shape-connector-body-impl\";\n\nexport class EShapeConnectorLine extends EShapeLineBase implements EShapeConnector {\n\tprotected static WORK_BOUNDARY: [number, number, number, number];\n\tprotected _edge: EShapeConnectorEdgeContainer;\n\tprotected _body: EShapeConnectorBody;\n\tprotected declare _points: EShapeLinePoints;\n\tprotected _tailLocalId: number;\n\tprotected _tailMargin: number;\n\tprotected _headLocalId: number;\n\tprotected _headMargin: number;\n\tprotected _bodyId: number;\n\tprotected _lockCount: number;\n\tprotected _isChanged: boolean;\n\n\tconstructor(type: EShapeType = EShapeType.CONNECTOR_LINE) {\n\t\tsuper(type);\n\t\tthis._tailLocalId = 0;\n\t\tthis._tailMargin = 0;\n\t\tthis._headLocalId = 0;\n\t\tthis._headMargin = 0;\n\t\tthis._bodyId = 0;\n\t\tthis._lockCount = 0;\n\t\tthis._isChanged = false;\n\t\tconst sx = EShapeDefaults.SIZE_X;\n\t\tconst sy = EShapeDefaults.SIZE_Y;\n\t\tconst hx = sx * 0.5;\n\t\tconst hy = sy * 0.5;\n\t\tthis._points = new EShapeLinePoints(this).set([-hx, -hy, +hx, +hy]);\n\t\tconst onChangeBound = (): void => {\n\t\t\tthis.onChange();\n\t\t};\n\t\tthis._edge = new EShapeConnectorEdgeContainerImpl(this, onChangeBound);\n\t\tthis._body = new EShapeConnectorBodyImpl(this, onChangeBound);\n\t}\n\n\tlock(): void {\n\t\tthis._lockCount += 1;\n\t\tif (this._lockCount === 1) {\n\t\t\tthis._isChanged = false;\n\t\t}\n\t}\n\n\tunlock(): void {\n\t\tthis._lockCount -= 1;\n\t\tif (this._lockCount === 0) {\n\t\t\tif (this._isChanged) {\n\t\t\t\tthis.onChange();\n\t\t\t}\n\t\t\tthis._isChanged = false;\n\t\t}\n\t}\n\n\tget points(): EShapeLinePoints {\n\t\treturn this._points;\n\t}\n\n\tget edge(): EShapeConnectorEdgeContainer {\n\t\treturn this._edge;\n\t}\n\n\tget body(): EShapeConnectorBody {\n\t\treturn this._body;\n\t}\n\n\tonAttach(): void {\n\t\tsuper.onAttach();\n\t\tthis._edge.attach();\n\t}\n\n\tonDetach(): void {\n\t\tthis._edge.detach();\n\t\tsuper.onDetach();\n\t}\n\n\tprotected onChange(): void {\n\t\tif (0 < this._lockCount) {\n\t\t\tthis._isChanged = true;\n\t\t\treturn;\n\t\t}\n\n\t\tconst edge = this._edge;\n\t\tconst tail = edge.tail;\n\t\tconst tailLocalId = tail.localId;\n\t\tconst tailMargin = tail.margin;\n\t\tconst head = edge.head;\n\t\tconst headLocalId = head.localId;\n\t\tconst headMargin = head.margin;\n\t\tconst body = this._body;\n\t\tconst bodyId = body.id;\n\t\tif (\n\t\t\tthis._tailLocalId !== tailLocalId ||\n\t\t\tthis._tailMargin !== tailMargin ||\n\t\t\tthis._headLocalId !== headLocalId ||\n\t\t\tthis._headMargin !== headMargin ||\n\t\t\tthis._bodyId !== bodyId\n\t\t) {\n\t\t\tthis._tailLocalId = tailLocalId;\n\t\t\tthis._tailMargin = tailMargin;\n\t\t\tthis._headLocalId = headLocalId;\n\t\t\tthis._headMargin = headMargin;\n\t\t\tthis._bodyId !== bodyId;\n\n\t\t\t// Tail\n\t\t\tconst tailLocal = tail.local;\n\t\t\tconst tailLocalX = tailLocal.x;\n\t\t\tconst tailLocalY = tailLocal.y;\n\n\t\t\t// Head\n\t\t\tconst headLocal = head.local;\n\t\t\tconst headLocalX = headLocal.x;\n\t\t\tconst headLocalY = headLocal.y;\n\n\t\t\t// Body\n\t\t\tconst bodyValues = body.values;\n\t\t\tconst bodyValuesLength = bodyValues.length;\n\n\t\t\t// Values\n\t\t\tconst transform = this.transform;\n\t\t\tconst transformPosition = transform.position;\n\t\t\tconst px = transformPosition.x;\n\t\t\tconst py = transformPosition.y;\n\t\t\tconst points = this._points;\n\t\t\tconst values = points.values;\n\t\t\tif (values.length < 4) {\n\t\t\t\tvalues[0] = 0;\n\t\t\t\tvalues[1] = 0;\n\t\t\t}\n\n\t\t\tconst threshold = 0.000001;\n\t\t\tconst x0 = tailLocalX - px;\n\t\t\tconst y0 = tailLocalY - py;\n\t\t\tconst x1 = headLocalX - px;\n\t\t\tconst y1 = headLocalY - py;\n\n\t\t\t// Body\n\t\t\tif (0 < bodyValuesLength) {\n\t\t\t\tconst cx = (x1 + x0) * 0.5;\n\t\t\t\tconst cy = (y1 + y0) * 0.5;\n\t\t\t\tconst dx = x1 - x0;\n\t\t\t\tconst dy = y1 - y0;\n\t\t\t\tconst a = Math.atan2(dy, dx);\n\t\t\t\tconst c = Math.cos(a);\n\t\t\t\tconst s = Math.sin(a);\n\t\t\t\tconst l = Math.sqrt(dx * dx + dy * dy);\n\t\t\t\tfor (let i = 0; i < bodyValuesLength; i += 2) {\n\t\t\t\t\tconst x = bodyValues[i + 0];\n\t\t\t\t\tconst y = bodyValues[i + 1];\n\t\t\t\t\tvalues[i + 2] = cx + (c * x - s * y) * l;\n\t\t\t\t\tvalues[i + 3] = cy + (c * y + s * x) * l;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Tail\n\t\t\tvalues[0] = x0;\n\t\t\tvalues[1] = y0;\n\t\t\tif (tailMargin !== 0) {\n\t\t\t\tconst dx = values[2] - x0;\n\t\t\t\tconst dy = values[3] - y0;\n\t\t\t\tconst d = dx * dx + dy * dy;\n\t\t\t\tif (threshold < d) {\n\t\t\t\t\tconst f = tailMargin / Math.sqrt(dx * dx + dy * dy);\n\t\t\t\t\tvalues[0] = x0 + dx * f;\n\t\t\t\t\tvalues[1] = y0 + dy * f;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Head\n\t\t\tvalues[2 + bodyValuesLength] = x1;\n\t\t\tvalues[3 + bodyValuesLength] = y1;\n\t\t\tif (headMargin !== 0) {\n\t\t\t\tconst dx = values[0 + bodyValuesLength] - x1;\n\t\t\t\tconst dy = values[1 + bodyValuesLength] - y1;\n\t\t\t\tconst d = dx * dx + dy * dy;\n\t\t\t\tif (threshold < d) {\n\t\t\t\t\tconst f = headMargin / Math.sqrt(dx * dx + dy * dy);\n\t\t\t\t\tvalues[2 + bodyValuesLength] = x1 + dx * f;\n\t\t\t\t\tvalues[3 + bodyValuesLength] = y1 + dy * f;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Center & size\n\t\t\tconst boundary = (EShapeConnectorLine.WORK_BOUNDARY ??= [0, 0, 0, 0]);\n\t\t\ttoPointsBoundary(values, boundary);\n\t\t\tconst cx = (boundary[2] + boundary[0]) * 0.5;\n\t\t\tconst cy = (boundary[3] + boundary[1]) * 0.5;\n\t\t\tconst sx = boundary[2] - boundary[0];\n\t\t\tconst sy = boundary[3] - boundary[1];\n\n\t\t\t// Adjust values\n\t\t\tfor (let i = 0, imax = values.length; i < imax; i += 2) {\n\t\t\t\tvalues[i + 0] -= cx;\n\t\t\t\tvalues[i + 1] -= cy;\n\t\t\t}\n\n\t\t\tthis.disallowUploadedUpdate();\n\t\t\ttransformPosition.set(px + cx, py + cy);\n\t\t\ttransform.scale.set(1, 1);\n\t\t\ttransform.rotation = 0;\n\t\t\ttransform.skew.set(0, 0);\n\t\t\tthis.size.set(sx, sy);\n\t\t\tpoints.toFitted();\n\t\t\tpoints.set(values);\n\t\t\tthis.allowUploadedUpdate();\n\t\t}\n\t}\n\n\tcopy(source: EShape, part: EShapeCopyPart = EShapeCopyPart.ALL): this {\n\t\tsuper.copy(source, part);\n\t\tif (source instanceof EShapeConnectorLine) {\n\t\t\tthis._edge.copy(source.edge);\n\t\t\tthis._body.copy(source.body);\n\t\t}\n\t\treturn this;\n\t}\n\n\tclone(): EShapeConnectorLine {\n\t\treturn new EShapeConnectorLine().copy(this);\n\t}\n\n\tserialize(manager: EShapeResourceManagerSerialization): DDiagramSerializedItem {\n\t\tconst result = super.serialize(manager);\n\t\tconst edgeId = this._edge.serialize(manager);\n\t\tconst bodyId = this._body.serialize(manager);\n\t\tconst pointsId = this._points.serialize(manager);\n\t\tresult[15] = manager.addResource(`[${edgeId},${pointsId},${bodyId}]`);\n\t\treturn result;\n\t}\n}\n"]}
|
|
@@ -3,13 +3,7 @@
|
|
|
3
3
|
* SPDX-License-Identifier: Apache-2.0
|
|
4
4
|
*/
|
|
5
5
|
import { __extends } from "tslib";
|
|
6
|
-
import { DThemeDarkAtlas } from "./d-theme-dark-atlas";
|
|
7
6
|
import { DThemeDarkNote } from "./d-theme-dark-note";
|
|
8
|
-
/* eslint-disable prettier/prettier */
|
|
9
|
-
DThemeDarkAtlas.add("note_erorr", 48, 48, "<g transform=\"translate(-3,3) scale(3,3)\">" +
|
|
10
|
-
'<path d="M12 5.99L19.53 19H4.47L12 5.99M12 2L1 21h22L12 2zm1 14h-2v2h2v-2zm0-6h-2v4h2v-4z" fill="#fff"/>' +
|
|
11
|
-
"</g>");
|
|
12
|
-
/* eslint-enable prettier/prettier */
|
|
13
7
|
var DThemeDarkNoteError = /** @class */ (function (_super) {
|
|
14
8
|
__extends(DThemeDarkNoteError, _super);
|
|
15
9
|
function DThemeDarkNoteError() {
|
|
@@ -18,9 +12,6 @@ var DThemeDarkNoteError = /** @class */ (function (_super) {
|
|
|
18
12
|
DThemeDarkNoteError.prototype.newTextValue = function () {
|
|
19
13
|
return "Error";
|
|
20
14
|
};
|
|
21
|
-
DThemeDarkNoteError.prototype.getImageSource = function (state) {
|
|
22
|
-
return DThemeDarkAtlas.mappings.note_erorr;
|
|
23
|
-
};
|
|
24
15
|
return DThemeDarkNoteError;
|
|
25
16
|
}(DThemeDarkNote));
|
|
26
17
|
export { DThemeDarkNoteError };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"d-theme-dark-note-error.js","sourceRoot":"","sources":["../../../../../src/main/typescript/wcardinal/ui/theme/dark/d-theme-dark-note-error.ts"],"names":[],"mappings":"AAAA;;;GAGG;;
|
|
1
|
+
{"version":3,"file":"d-theme-dark-note-error.js","sourceRoot":"","sources":["../../../../../src/main/typescript/wcardinal/ui/theme/dark/d-theme-dark-note-error.ts"],"names":[],"mappings":"AAAA;;;GAGG;;AAGH,OAAO,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AAErD;IAAyC,uCAAc;IAAvD;;IAIA,CAAC;IAHA,0CAAY,GAAZ;QACC,OAAO,OAAO,CAAC;IAChB,CAAC;IACF,0BAAC;AAAD,CAAC,AAJD,CAAyC,cAAc,GAItD","sourcesContent":["/*\n * Copyright (C) 2019 Toshiba Corporation\n * SPDX-License-Identifier: Apache-2.0\n */\n\nimport { DStateAwareOrValueMightBe } from \"../../d-state-aware\";\nimport { DThemeDarkNote } from \"./d-theme-dark-note\";\n\nexport class DThemeDarkNoteError extends DThemeDarkNote {\n\tnewTextValue(): DStateAwareOrValueMightBe<string> {\n\t\treturn \"Error\";\n\t}\n}\n"]}
|
|
@@ -3,14 +3,7 @@
|
|
|
3
3
|
* SPDX-License-Identifier: Apache-2.0
|
|
4
4
|
*/
|
|
5
5
|
import { __extends } from "tslib";
|
|
6
|
-
import { DThemeDarkAtlas } from "./d-theme-dark-atlas";
|
|
7
6
|
import { DThemeDarkNote } from "./d-theme-dark-note";
|
|
8
|
-
/* eslint-disable prettier/prettier */
|
|
9
|
-
DThemeDarkAtlas.add("note_no_items_found", 48, 48, "<g transform=\"translate(-3,3) scale(3,3)\">" +
|
|
10
|
-
'<path d="M11 15h2v2h-2v-2zm0-8h2v6h-2V7zm.99-5C6.47 2 2 6.48 2 12s4.47 10 9.99 10C17.52 22 22 17.52 22 12S17.52 2 11.99 2zM12 20c' +
|
|
11
|
-
'-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8z" fill="#fff"/>' +
|
|
12
|
-
"</g>");
|
|
13
|
-
/* eslint-enable prettier/prettier */
|
|
14
7
|
var DThemeDarkNoteNoItemsFound = /** @class */ (function (_super) {
|
|
15
8
|
__extends(DThemeDarkNoteNoItemsFound, _super);
|
|
16
9
|
function DThemeDarkNoteNoItemsFound() {
|
|
@@ -19,9 +12,6 @@ var DThemeDarkNoteNoItemsFound = /** @class */ (function (_super) {
|
|
|
19
12
|
DThemeDarkNoteNoItemsFound.prototype.newTextValue = function () {
|
|
20
13
|
return "No items found";
|
|
21
14
|
};
|
|
22
|
-
DThemeDarkNoteNoItemsFound.prototype.getImageSource = function (state) {
|
|
23
|
-
return DThemeDarkAtlas.mappings.note_no_items_found;
|
|
24
|
-
};
|
|
25
15
|
return DThemeDarkNoteNoItemsFound;
|
|
26
16
|
}(DThemeDarkNote));
|
|
27
17
|
export { DThemeDarkNoteNoItemsFound };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"d-theme-dark-note-no-items-found.js","sourceRoot":"","sources":["../../../../../src/main/typescript/wcardinal/ui/theme/dark/d-theme-dark-note-no-items-found.ts"],"names":[],"mappings":"AAAA;;;GAGG;;
|
|
1
|
+
{"version":3,"file":"d-theme-dark-note-no-items-found.js","sourceRoot":"","sources":["../../../../../src/main/typescript/wcardinal/ui/theme/dark/d-theme-dark-note-no-items-found.ts"],"names":[],"mappings":"AAAA;;;GAGG;;AAGH,OAAO,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AAErD;IAAgD,8CAAc;IAA9D;;IAIA,CAAC;IAHA,iDAAY,GAAZ;QACC,OAAO,gBAAgB,CAAC;IACzB,CAAC;IACF,iCAAC;AAAD,CAAC,AAJD,CAAgD,cAAc,GAI7D","sourcesContent":["/*\n * Copyright (C) 2019 Toshiba Corporation\n * SPDX-License-Identifier: Apache-2.0\n */\n\nimport { DStateAwareOrValueMightBe } from \"../../d-state-aware\";\nimport { DThemeDarkNote } from \"./d-theme-dark-note\";\n\nexport class DThemeDarkNoteNoItemsFound extends DThemeDarkNote {\n\tnewTextValue(): DStateAwareOrValueMightBe<string> {\n\t\treturn \"No items found\";\n\t}\n}\n"]}
|
|
@@ -3,15 +3,7 @@
|
|
|
3
3
|
* SPDX-License-Identifier: Apache-2.0
|
|
4
4
|
*/
|
|
5
5
|
import { __extends } from "tslib";
|
|
6
|
-
import { DThemeDarkAtlas } from "./d-theme-dark-atlas";
|
|
7
6
|
import { DThemeDarkNote } from "./d-theme-dark-note";
|
|
8
|
-
/* eslint-disable prettier/prettier */
|
|
9
|
-
DThemeDarkAtlas.add("note_searching", 48, 48, "<g transform=\"translate(-3,3) scale(3,3)\">" +
|
|
10
|
-
"<path d=\"M15.5 14h-.79l-.28-.27C15.41 12.59 16 11.11 16 9.5 16 5.91 13.09 3 9.5 3S3 5.91 3 " +
|
|
11
|
-
"9.5 5.91 16 9.5 16c1.61 0 3.09-.59 4.23-1.57l.27.28v.79l5 4.99L20.49 19l-4.99-5zm-6 0C7.01 " +
|
|
12
|
-
"14 5 11.99 5 9.5S7.01 5 9.5 5 14 7.01 14 9.5 11.99 14 9.5 14z\" fill=\"#fff\"/>" +
|
|
13
|
-
"</g>");
|
|
14
|
-
/* eslint-enable prettier/prettier */
|
|
15
7
|
var DThemeDarkNoteSearching = /** @class */ (function (_super) {
|
|
16
8
|
__extends(DThemeDarkNoteSearching, _super);
|
|
17
9
|
function DThemeDarkNoteSearching() {
|
|
@@ -20,9 +12,6 @@ var DThemeDarkNoteSearching = /** @class */ (function (_super) {
|
|
|
20
12
|
DThemeDarkNoteSearching.prototype.newTextValue = function () {
|
|
21
13
|
return "Searching";
|
|
22
14
|
};
|
|
23
|
-
DThemeDarkNoteSearching.prototype.getImageSource = function (state) {
|
|
24
|
-
return DThemeDarkAtlas.mappings.note_searching;
|
|
25
|
-
};
|
|
26
15
|
return DThemeDarkNoteSearching;
|
|
27
16
|
}(DThemeDarkNote));
|
|
28
17
|
export { DThemeDarkNoteSearching };
|