@wcardinal/wcardinal-ui 0.329.0 → 0.331.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-animation-base.d.ts +3 -1
- package/dist/types/wcardinal/ui/d-animation.d.ts +21 -3
- package/dist/types/wcardinal/ui/d-diagram-canvas-base.d.ts +12 -0
- package/dist/types/wcardinal/ui/d-diagram-serialized.d.ts +6 -0
- package/dist/types/wcardinal/ui/d-view-gesture-impl.d.ts +7 -4
- package/dist/types/wcardinal/ui/d-view-impl.d.ts +2 -2
- package/dist/types/wcardinal/ui/d-view-parent.d.ts +5 -0
- package/dist/types/wcardinal/ui/d-view-transform-impl.d.ts +8 -4
- package/dist/types/wcardinal/ui/d-view.d.ts +35 -0
- package/dist/types/wcardinal/ui/index.d.ts +1 -1
- package/dist/types/wcardinal/ui/util/util-gesture.d.ts +12 -0
- package/dist/wcardinal/ui/d-animation-base.js +10 -0
- package/dist/wcardinal/ui/d-animation-base.js.map +1 -1
- package/dist/wcardinal/ui/d-animation.js.map +1 -1
- package/dist/wcardinal/ui/d-diagram-base.js +3 -0
- package/dist/wcardinal/ui/d-diagram-base.js.map +1 -1
- package/dist/wcardinal/ui/d-diagram-canvas-base.js +39 -1
- package/dist/wcardinal/ui/d-diagram-canvas-base.js.map +1 -1
- package/dist/wcardinal/ui/d-diagram-canvas-editor.js +3 -0
- package/dist/wcardinal/ui/d-diagram-canvas-editor.js.map +1 -1
- package/dist/wcardinal/ui/d-diagram-serialized.js.map +1 -1
- package/dist/wcardinal/ui/d-diagrams.js +6 -0
- package/dist/wcardinal/ui/d-diagrams.js.map +1 -1
- package/dist/wcardinal/ui/d-view-gesture-impl.js +30 -9
- package/dist/wcardinal/ui/d-view-gesture-impl.js.map +1 -1
- package/dist/wcardinal/ui/d-view-impl.js +44 -27
- package/dist/wcardinal/ui/d-view-impl.js.map +1 -1
- package/dist/wcardinal/ui/{d-view-stopper.js → d-view-parent.js} +1 -1
- package/dist/wcardinal/ui/d-view-parent.js.map +1 -0
- package/dist/wcardinal/ui/d-view-transform-impl.js +30 -5
- package/dist/wcardinal/ui/d-view-transform-impl.js.map +1 -1
- package/dist/wcardinal/ui/d-view.js.map +1 -1
- package/dist/wcardinal/ui/index.js +1 -1
- package/dist/wcardinal/ui/index.js.map +1 -1
- package/dist/wcardinal/ui/util/util-gesture.js +22 -0
- package/dist/wcardinal/ui/util/util-gesture.js.map +1 -1
- package/dist/wcardinal-ui-theme-dark.js +1 -1
- package/dist/wcardinal-ui-theme-dark.min.js +1 -1
- package/dist/wcardinal-ui-theme-white.js +1 -1
- package/dist/wcardinal-ui-theme-white.min.js +1 -1
- package/dist/wcardinal-ui.cjs.js +186 -42
- package/dist/wcardinal-ui.js +186 -42
- package/dist/wcardinal-ui.min.js +2 -2
- package/dist/wcardinal-ui.min.js.map +1 -1
- package/package.json +1 -1
- package/dist/types/wcardinal/ui/d-view-stopper.d.ts +0 -4
- package/dist/wcardinal/ui/d-view-stopper.js.map +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"d-diagram-canvas-editor.js","sourceRoot":"","sources":["../../../src/main/typescript/wcardinal/ui/d-diagram-canvas-editor.ts"],"names":[],"mappings":"AAAA;;;GAGG;;AAEH,OAAO,EACN,kBAAkB,EAGlB,MAAM,yBAAyB,CAAC;AAEjC,OAAO,EAAE,6BAA6B,EAAE,MAAM,sCAAsC,CAAC;AACrF,OAAO,EACN,wBAAwB,EAGxB,MAAM,gCAAgC,CAAC;AACxC,OAAO,EAGN,yBAAyB,EACzB,MAAM,wBAAwB,CAAC;AAChC,OAAO,EAAE,kCAAkC,EAAE,MAAM,gDAAgD,CAAC;AACpG,OAAO,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAgB5C;IAGU,wCAAkC;IAI3C,8BAAY,OAAgB;QAA5B,YACC,kBAAM,OAAO,CAAC,SAEd;QADA,KAAI,CAAC,KAAK,GAAG,KAAI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I,CAAC,OAAO;YACrB,WAAW,EAAE,IAAI,CAAC,WAAW;YAC7B,UAAU,EAAE;gBACX,KAAK,EAAE,QAAQ,CAAC,eAAe,CAAC,CAAC,CAAC,CAAC,eAAe,CAAC,CAAC,CAAC,QAAQ;gBAC7D,KAAK,EAAE,QAAQ,CAAC,eAAe,CAAC,CAAC,CAAC,CAAC,eAAe,CAAC,CAAC,CAAC,CAAC;aACtD;YACD,IAAI,EAAE,IAAI,CAAC,KAAK,CAAC,SAAS,EAAE;YAC5B,SAAS,EAAE,OAAO,CAAC,SAAS;YAC5B,IAAI,EAAE,OAAO,CAAC,IAAI;YAClB,MAAM,EAAE,OAAO,CAAC,MAAM;YACtB,MAAM,EAAE,IAAI,CAAC,MAAM,CAAC,SAAS,CAAC,OAAO,EAAE,KAAK,CAAC;YAC7C,KAAK,OAAA;YACL,IAAI,EAAE,MAAA,IAAI,CAAC,KAAK,0CAAE,SAAS,EAAE;YAC7B,SAAS,EAAE,SAAS,aAAT,SAAS,uBAAT,SAAS,CAAE,SAAS,EAAE;SACjC,CAAC;IACH,CAAC;IAED,uCAAQ,GAAR;;QACC,iBAAM,QAAQ,WAAE,CAAC;QACjB,MAAA,IAAI,CAAC,KAAK,0CAAE,QAAQ,EAAE,CAAC;IACxB,CAAC;IAES,sCAAO,GAAjB;QACC,OAAO,sBAAsB,CAAC;IAC/B,CAAC;IACF,2BAAC;AAAD,CAAC,AA7ED,CAGU,kBAAkB,GA0E3B","sourcesContent":["/*\n * Copyright (C) 2019 Toshiba Corporation\n * SPDX-License-Identifier: Apache-2.0\n */\n\nimport {\n\tDDiagramCanvasBase,\n\tDDiagramCanvasBaseOptions,\n\tDThemeDiagramCanvasBase\n} from \"./d-diagram-canvas-base\";\nimport { DDiagramCanvasEditorShape } from \"./d-diagram-canvas-editor-shape\";\nimport { DDiagramCanvasEditorShapeImpl } from \"./d-diagram-canvas-editor-shape-impl\";\nimport {\n\tDDiagramCanvasEditorSnap,\n\tDDiagramCanvasEditorSnapOptions,\n\tDThemeDiagramCanvasEditorSnap\n} from \"./d-diagram-canvas-editor-snap\";\nimport {\n\tDDiagramSerialized,\n\tDDiagramSerializedItem,\n\tDDiagramSerializedVersion\n} from \"./d-diagram-serialized\";\nimport { EShapeResourceManagerSerialization } from \"./shape/e-shape-resource-manager-serialization\";\nimport { isNumber } from \"./util/is-number\";\n\nexport interface DDiagramCanvasEditorOptions<\n\tTHEME extends DThemeDiagramCanvasEditor = DThemeDiagramCanvasEditor\n> extends DDiagramCanvasBaseOptions<THEME> {\n\tsnap?: DDiagramCanvasEditorSnapOptions;\n}\n\nexport interface DThemeDiagramCanvasEditor\n\textends DThemeDiagramCanvasBase,\n\t\tDThemeDiagramCanvasEditorSnap {}\n\nexport interface DDiagramCanvasEditorThumbnail {\n\tserialize(): string | undefined;\n}\n\nexport class DDiagramCanvasEditor<\n\tTHEME extends DThemeDiagramCanvasEditor = DThemeDiagramCanvasEditor,\n\tOPTIONS extends DDiagramCanvasEditorOptions<THEME> = DDiagramCanvasEditorOptions<THEME>\n> extends DDiagramCanvasBase<THEME, OPTIONS> {\n\tprotected _shape?: DDiagramCanvasEditorShape;\n\tprotected _snap: DDiagramCanvasEditorSnap | null;\n\n\tconstructor(options: OPTIONS) {\n\t\tsuper(options);\n\t\tthis._snap = this.toSnap(this.theme, options.snap);\n\t}\n\n\tprotected toSnap(\n\t\ttheme: THEME,\n\t\toptions?: DDiagramCanvasEditorSnapOptions\n\t): DDiagramCanvasEditorSnap | null {\n\t\tif (options) {\n\t\t\treturn new DDiagramCanvasEditorSnap(this, theme, options);\n\t\t}\n\t\treturn null;\n\t}\n\n\tget snap(): DDiagramCanvasEditorSnap | null {\n\t\treturn this._snap;\n\t}\n\n\tget shape(): DDiagramCanvasEditorShape {\n\t\tlet result = this._shape;\n\t\tif (result == null) {\n\t\t\tresult = this.newShape();\n\t\t\tthis._shape = result;\n\t\t}\n\t\treturn result;\n\t}\n\n\tprotected newShape(): DDiagramCanvasEditorShape {\n\t\treturn new DDiagramCanvasEditorShapeImpl(this);\n\t}\n\n\tserialize(id?: number, thumbnail?: DDiagramCanvasEditorThumbnail): DDiagramSerialized {\n\t\tconst manager = new EShapeResourceManagerSerialization();\n\t\tconst items: DDiagramSerializedItem[] = [];\n\t\tconst background = this._background;\n\t\tconst backgroundColor = background.color;\n\t\tconst backgroundAlpha = background.alpha;\n\t\treturn {\n\t\t\tversion: DDiagramSerializedVersion,\n\t\t\tid,\n\t\t\tname: this.name,\n\t\t\tlabel: this.label,\n\t\t\twidth: this.width,\n\t\t\theight: this.height,\n\t\t\tsummary: this.summary,\n\t\t\tdescription: this.description,\n\t\t\tbackground: {\n\t\t\t\tcolor: isNumber(backgroundColor) ? backgroundColor : 0xffffff,\n\t\t\t\talpha: isNumber(backgroundAlpha) ? backgroundAlpha : 0\n\t\t\t},\n\t\t\ttile: this._tile.serialize(),\n\t\t\tresources: manager.resources,\n\t\t\tdata: manager.data,\n\t\t\tpieces: manager.pieces,\n\t\t\tlayers: this._layer.serialize(manager, items),\n\t\t\titems,\n\t\t\tsnap: this._snap?.serialize(),\n\t\t\tthumbnail: thumbnail?.serialize()\n\t\t};\n\t}\n\n\tonReflow(): void {\n\t\tsuper.onReflow();\n\t\tthis._snap?.onReflow();\n\t}\n\n\tprotected getType(): string {\n\t\treturn \"DDiagramCanvasEditor\";\n\t}\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"d-diagram-serialized.js","sourceRoot":"","sources":["../../../src/main/typescript/wcardinal/ui/d-diagram-serialized.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAiBH,MAAM,CAAC,IAAM,yBAAyB,GAAW,CAAC,CAAC","sourcesContent":["/*\n * Copyright (C) 2019 Toshiba Corporation\n * SPDX-License-Identifier: Apache-2.0\n */\n\nimport { DDiagramCanvasTileMapping } from \"./d-diagram-canvas-mapping\";\nimport { EShapeCorner } from \"./shape/e-shape-corner\";\nimport { EShapeStrokeSide } from \"./shape/e-shape-stroke-side\";\nimport { EShapeStrokeStyle } from \"./shape/e-shape-stroke-style\";\nimport { EShapeDataValueOrder } from \"./shape/e-shape-data-value-order\";\nimport { EShapeTextStyle, EShapeTextWeight } from \"./shape/e-shape-text\";\nimport { EShapeTextAlignHorizontal } from \"./shape/e-shape-text-align-horizontal\";\nimport { EShapeTextAlignVertical } from \"./shape/e-shape-text-align-vertical\";\nimport { EShapeTextDirection } from \"./shape/e-shape-text-direction\";\nimport { EShapeType } from \"./shape/e-shape-type\";\nimport { ESnapperTargetValueType } from \"./snapper/e-snapper-target-value\";\nimport { EShapeDataValueRangeType } from \"./shape/e-shape-data-value-range\";\nimport { EShapeDataValueType } from \"./shape/e-shape-data-value-type\";\nimport { EShapeDataValueScope } from \"./shape/e-shape-data-value-scope\";\n\nexport const DDiagramSerializedVersion: number = 1;\n\n/**\n * A serialized data range.\n */\nexport interface DDiagramSerializedDataRange {\n\t/** A type. */\n\t[0]: EShapeDataValueRangeType;\n\n\t/** A lower bound. */\n\t[1]: number;\n\n\t/** An upper bound. */\n\t[2]: number;\n}\n\n/**\n * A serialized data value.\n */\nexport interface DDiagramSerializedDataValue {\n\t/**\n\t * A resource index number of an ID.\n\t */\n\t[0]: number;\n\n\t/**\n\t * A resource index number of an initial value expression.\n\t */\n\t[1]: number;\n\n\t/**\n\t * A resource index number of a format expression.\n\t */\n\t[2]: number;\n\n\t/**\n\t * A resource index number of JSON.stringify(DDiagramSerializedDataRange).\n\t */\n\t[3]: number;\n\n\t/**\n\t * A capacity.\n\t */\n\t[4]: number;\n\n\t/**\n\t * A order.\n\t */\n\t[5]: EShapeDataValueOrder;\n\n\t/**\n\t * A type.\n\t */\n\t[6]: EShapeDataValueType | undefined;\n\n\t/**\n\t * A scope.\n\t */\n\t[7]: EShapeDataValueScope | undefined;\n\n\t/**\n\t * A resource index number of an alias.\n\t */\n\t[8]: number | undefined;\n}\n\n/**\n * A serialized system data.\n */\nexport type DDiagramSerializedDataSystem = number[];\n\n/**\n * A serialized data mapping.\n * Each number at the index 2N+0 is a resource index number of the N-th mapping source.\n * Each number at the index 2N+1 is a resource index number of the N-th mapping destination.\n */\nexport type DDiagramSerializedDataMapping = number[];\n\n/**\n * A serialized data with a mapping data.\n */\nexport interface DDiagramSerializedDataWithMapping extends Array<unknown> {\n\t/**\n\t * Each number is a resource index number of JSON.stringify(DDiagramSerializedDataValue).\n\t * The last number is a resource index number of JSON.stringify(DDiagramSerializedDataMapping).\n\t */\n\t[0]: number[];\n\n\t/**\n\t * A resource index number of JSON.stringify(DDiagramSerializedDataSystem).\n\t */\n\t[1]: number | undefined;\n}\n\n/**\n * A serialized data without a mapping data.\n * Each number is a resource index number of JSON.stringify(DDiagramSerializedDataValue).\n */\nexport type DDiagramSerializedDataWithoutMapping = number[];\n\n/**\n * A serialized data.\n */\nexport type DDiagramSerializedData =\n\t| DDiagramSerializedDataWithoutMapping\n\t| DDiagramSerializedDataWithMapping;\n\n/**\n * A serialized fill.\n */\nexport interface DDiagramSerializedFill {\n\t/** 0: Disabled, 1: Enabled */\n\t[0]: number;\n\n\t/** A color. */\n\t[1]: number;\n\n\t/** An alpha. */\n\t[2]: number;\n}\n\n/**\n * A serialized stroke.\n */\nexport interface DDiagramSerializedStroke {\n\t/** 0: Disabled, 1: Enabled */\n\t[0]: number;\n\n\t/** A color. */\n\t[1]: number;\n\n\t/** An alpha. */\n\t[2]: number;\n\n\t/** A width. */\n\t[3]: number;\n\n\t/** An align. */\n\t[4]: number;\n\n\t/** A side. */\n\t[5]: EShapeStrokeSide;\n\n\t/** A style */\n\t[6]: EShapeStrokeStyle | undefined;\n}\n\n/**\n * A serialized text outline.\n */\nexport interface DDiagramSerializedTextOutline {\n\t/** 0: Disabled, 1: Enabled */\n\t[0]: number;\n\n\t/** A color. */\n\t[1]: number;\n\n\t/** An alpha. */\n\t[2]: number;\n\n\t/** A width. */\n\t[3]: number;\n}\n\n/**\n * A serialized text align.\n */\nexport interface DDiagramSerializedTextAlign {\n\t/** A horizontal align. */\n\t[0]: EShapeTextAlignHorizontal;\n\n\t/** A vertical align. */\n\t[1]: EShapeTextAlignVertical;\n}\n\n/**\n * A serialized text offset.\n */\nexport interface DDiagramSerializedTextOffset {\n\t/** A horizontal offset. */\n\t[0]: number;\n\n\t/** A vertical offset. */\n\t[1]: number;\n}\n\n/**\n * A serialized text spacing.\n */\nexport interface DDiagramSerializedTextSpacing {\n\t/** A horizontal spacing. */\n\t[0]: number;\n\n\t/** A vertical spacing. */\n\t[1]: number;\n}\n\n/**\n * A serialized text padding.\n */\nexport interface DDiagramSerializedTextPadding {\n\t/** A horizontal padding. */\n\t[0]: number;\n\n\t/** A vertical padding. */\n\t[1]: number;\n}\n\n/**\n * A serialized text.\n */\nexport interface DDiagramSerializedText {\n\t/** A resource index number of a value. */\n\t[0]: number;\n\n\t/** A color. */\n\t[1]: number;\n\n\t/** An alpha. */\n\t[2]: number;\n\n\t/** A resource index number of a font family. */\n\t[3]: number;\n\n\t/** A size. */\n\t[4]: number;\n\n\t/** A weight. */\n\t[5]: EShapeTextWeight;\n\n\t/**\n\t * A resource index number of JSON.stringify(DDiagramSerializedTextAlign).\n\t */\n\t[6]: number;\n\n\t/**\n\t * A resource index number of JSON.stringify(DDiagramSerializedTextOffset).\n\t */\n\t[7]: number;\n\n\t/** A style. */\n\t[8]: EShapeTextStyle;\n\n\t/**\n\t * A resource index number of JSON.stringify(DDiagramSerializedTextOutline).\n\t */\n\t[9]: number;\n\n\t/**\n\t * A resource index number of JSON.stringify(DDiagramSerializedTextSpacing).\n\t */\n\t[10]: number;\n\n\t/** A direction. */\n\t[11]: EShapeTextDirection;\n\n\t/**\n\t * A resource index number of JSON.stringify(DDiagramSerializedTextPadding).\n\t */\n\t[12]: number;\n\n\t/** A clipping. (0: Off, 1: On) */\n\t[13]: number;\n\n\t/** A fitting. (0: Off, 1: On) */\n\t[14]: number;\n}\n\n/**\n * A serialized item.\n */\nexport interface DDiagramSerializedItem {\n\t/** A type. */\n\t[0]: EShapeType;\n\n\t/** A resource index number of a ID. */\n\t[1]: number;\n\n\t/** A X-coordinate position. */\n\t[2]: number;\n\n\t/** A Y-coordinate position. */\n\t[3]: number;\n\n\t/** A width. */\n\t[4]: number;\n\n\t/** A height. */\n\t[5]: number;\n\n\t/** A rotation. */\n\t[6]: number;\n\n\t/** A skew. */\n\t[7]: number;\n\n\t/**\n\t * A resource index number of JSON.stringify(DDiagramSerializedFill).\n\t */\n\t[8]: number;\n\n\t/**\n\t * A resource index number of JSON.stringify(DDiagramSerializedStroke).\n\t */\n\t[9]: number;\n\n\t/** A resource index number of a cursor. */\n\t[10]: number;\n\n\t/**\n\t * A resource index number of JSON.stringify(DDiagramSerializedText).\n\t */\n\t[11]: number;\n\n\t/**\n\t * A resource index number of JSON.stringify(DDiagramSerializedData).\n\t */\n\t[12]: number;\n\n\t/** A radius. */\n\t[13]: number;\n\n\t/** A corner. */\n\t[14]: EShapeCorner;\n\n\t/** A resource index number of a shape-specific resource. */\n\t[15]: number;\n\n\t/** A layer index number. */\n\t[16]: number;\n\n\t/** Actions */\n\t[17]: number[];\n\n\t/** A resource index number of an image. */\n\t[18]: number;\n\n\t/**\n\t * A resource index number of a stringified serialized gradient.\n\t * A stringified serialized gradient is a stringified number array,\n\t * JSON.stringify(number[]).\n\t *\n\t * * The first number in the array is a direction in degree.\n\t * * Each number at the index 3N + 1 is a color of a N-th point.\n\t * * Each number at the index 3N + 2 is a alpha of a N-th point.\n\t * * Each number at the index 3N + 3 is a position of a N-th point whose range is [0, 1].\n\t */\n\t[19]: number;\n\n\t/** Children. */\n\t[20]: DDiagramSerializedItem[];\n\n\t/** A X pivot. */\n\t[21]: number;\n\n\t/** A Y pivot. */\n\t[22]: number;\n\n\t/** (interactive ? 1 : 0) | (unfocusable ? 2 : 0) */\n\t[23]: number;\n\n\t/** A resource index number of a shortcut. */\n\t[24]: number;\n\n\t/** A resource index number of a title. */\n\t[25]: number;\n\n\t/** UUID */\n\t[26]: number;\n\n\t/** Added capabilities */\n\t[27]: number;\n\n\t/** Removed capabilities */\n\t[28]: number;\n\n\t/** Locked capabilities */\n\t[29]: number;\n}\n\n/**\n * A serialized layer.\n */\nexport interface DDiagramSerializedLayer {\n\t/** A name or a resource index number of a name*/\n\t[0]: string | number;\n\n\t/**\n\t * A visibility.\n\t *\n\t * * 1st bit\n\t * * 0: Invisible when edit mode\n\t * * 1: Visible when edit mode\n\t * * 2nd bit\n\t * * 0: Invisible when non-edit mode\n\t * * 1: Visible when non-edit mode\n\t */\n\t[1]?: number;\n\n\t/** A X-coordinate position. */\n\t[2]?: number;\n\n\t/** A Y-coordinate position. */\n\t[3]?: number;\n\n\t/** A width. */\n\t[4]?: number;\n\n\t/** A height. */\n\t[5]?: number;\n\n\t/**\n\t * A resource index number of a stringified serialized fill,\n\t * JSON.stringify(DDiagramSerializedFill).\n\t */\n\t[6]?: number;\n\n\t/**\n\t * * 1st bit\n\t * * 0: Not interactive\n\t * * 1: Interactive\n\t * * 2nd bit\n\t * * 0: Not draggable\n\t * * 1: Draggable\n\t * * 3rd bit\n\t * * 0: Not pinchable\n\t * * 1: Pinchable\n\t */\n\t[7]?: number;\n}\n\n/**\n * A serialized snap target.\n */\nexport interface DDiagramSerializedSnapTargetValue {\n\t/** A type. */\n\t[0]: ESnapperTargetValueType;\n\n\t/** A position. */\n\t[1]: number;\n}\n\n/**\n * Serialized snap on guide settings.\n */\nexport interface DDiagramSerializedSnapTarget {\n\t/** Snap on guide (0: Off, 1: On) */\n\t[0]: number;\n\n\t/** A visibility (0: Invisible, 1: Visible). */\n\t[1]: number;\n\n\t/** Snap targets. */\n\t[2]: DDiagramSerializedSnapTargetValue[];\n}\n\n/**\n * Serialized grid snap settings without a visibility option.\n */\nexport interface DDiagramSerializedSnapGridWithoutVisibility {\n\t/** Snap on grid (0: Off, 1: On) */\n\t[0]: number;\n\n\t/** A grid size. */\n\t[1]: number;\n}\n\n/**\n * Serialized grid snap settings with a visibility option.\n */\nexport interface DDiagramSerializedSnapGridWithVisibility {\n\t/** Snap on grid (0: Off, 1: On) */\n\t[0]: number;\n\n\t/** A visibility (0: Invisible, 1: Visible). */\n\t[1]: number;\n\n\t/** A grid size. */\n\t[2]: number;\n}\n\n/**\n * Serialized grid snap settings with a visibility.\n */\nexport type DDiagramSerializedSnapGrid =\n\t| DDiagramSerializedSnapGridWithoutVisibility\n\t| DDiagramSerializedSnapGridWithVisibility;\n\n/**\n * Serialized snap settings.\n */\nexport interface DDiagramSerializedSnap {\n\t/** Snap (0: Off, 1: On). */\n\t[0]: number;\n\n\t/** Snap on targets */\n\t[1]: DDiagramSerializedSnapTarget;\n\n\t/** Snap on grid */\n\t[2]: DDiagramSerializedSnapGrid;\n}\n\n/**\n * Serialized background settings.\n */\nexport interface DDiagramSerializedBackground {\n\tcolor?: number | null;\n\talpha?: number;\n}\n\n/**\n * Serialized tile settings.\n */\nexport interface DDiagramSerializedTile {\n\tmapping?: DDiagramCanvasTileMapping;\n}\n\n/**\n * A serialized diagram.\n */\nexport interface DDiagramSerialized {\n\tversion: number;\n\tid?: number;\n\tname: string;\n\twidth: number;\n\theight: number;\n\tbackground?: DDiagramSerializedBackground;\n\ttile?: DDiagramSerializedTile;\n\tresources: string[];\n\t/** @deprecated in favor of {@link data} */\n\ttags?: string[];\n\tdata?: string[];\n\tpieces?: string[];\n\tlayers: DDiagramSerializedLayer[];\n\titems: DDiagramSerializedItem[];\n\tsnap?: DDiagramSerializedSnap;\n\tthumbnail?: string;\n}\n\nexport type DDiagramSerializedSimpleData = Omit<\n\tDDiagramSerialized,\n\t\"version\" | \"id\" | \"name\" | \"thumbnail\"\n>;\n\n/**\n * A simplified version of a serialized diagram.\n */\nexport interface DDiagramSerializedSimple {\n\tversion: number;\n\tid: number | undefined;\n\tname: string;\n\n\t/**\n\t * A stringified {@link DDiagramSerialized#data}.\n\t *\n\t * @deprecated in favor of {@link DDiagramSerializedSimpleData}.\n\t */\n\ttags?: string;\n\n\t/**\n\t * A stringified {@link DDiagramSerialized#pieces}.\n\t *\n\t * @deprecated in favor of {@link DDiagramSerializedSimpleData}.\n\t */\n\tpieces?: string;\n\n\t/**\n\t * Thumbnail data URL.\n\t */\n\tthumbnail?: string;\n\n\t/**\n\t * A stringified {@link DDiagramSerializedSimpleData}.\n\t */\n\tdata: string;\n}\n\nexport interface DDiagramSerializedName {\n\tid: number;\n\tname: string;\n}\n"]}
|
|
1
|
+
{"version":3,"file":"d-diagram-serialized.js","sourceRoot":"","sources":["../../../src/main/typescript/wcardinal/ui/d-diagram-serialized.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAiBH,MAAM,CAAC,IAAM,yBAAyB,GAAW,CAAC,CAAC","sourcesContent":["/*\n * Copyright (C) 2019 Toshiba Corporation\n * SPDX-License-Identifier: Apache-2.0\n */\n\nimport { DDiagramCanvasTileMapping } from \"./d-diagram-canvas-mapping\";\nimport { EShapeCorner } from \"./shape/e-shape-corner\";\nimport { EShapeStrokeSide } from \"./shape/e-shape-stroke-side\";\nimport { EShapeStrokeStyle } from \"./shape/e-shape-stroke-style\";\nimport { EShapeDataValueOrder } from \"./shape/e-shape-data-value-order\";\nimport { EShapeTextStyle, EShapeTextWeight } from \"./shape/e-shape-text\";\nimport { EShapeTextAlignHorizontal } from \"./shape/e-shape-text-align-horizontal\";\nimport { EShapeTextAlignVertical } from \"./shape/e-shape-text-align-vertical\";\nimport { EShapeTextDirection } from \"./shape/e-shape-text-direction\";\nimport { EShapeType } from \"./shape/e-shape-type\";\nimport { ESnapperTargetValueType } from \"./snapper/e-snapper-target-value\";\nimport { EShapeDataValueRangeType } from \"./shape/e-shape-data-value-range\";\nimport { EShapeDataValueType } from \"./shape/e-shape-data-value-type\";\nimport { EShapeDataValueScope } from \"./shape/e-shape-data-value-scope\";\n\nexport const DDiagramSerializedVersion: number = 1;\n\n/**\n * A serialized data range.\n */\nexport interface DDiagramSerializedDataRange {\n\t/** A type. */\n\t[0]: EShapeDataValueRangeType;\n\n\t/** A lower bound. */\n\t[1]: number;\n\n\t/** An upper bound. */\n\t[2]: number;\n}\n\n/**\n * A serialized data value.\n */\nexport interface DDiagramSerializedDataValue {\n\t/**\n\t * A resource index number of an ID.\n\t */\n\t[0]: number;\n\n\t/**\n\t * A resource index number of an initial value expression.\n\t */\n\t[1]: number;\n\n\t/**\n\t * A resource index number of a format expression.\n\t */\n\t[2]: number;\n\n\t/**\n\t * A resource index number of JSON.stringify(DDiagramSerializedDataRange).\n\t */\n\t[3]: number;\n\n\t/**\n\t * A capacity.\n\t */\n\t[4]: number;\n\n\t/**\n\t * A order.\n\t */\n\t[5]: EShapeDataValueOrder;\n\n\t/**\n\t * A type.\n\t */\n\t[6]: EShapeDataValueType | undefined;\n\n\t/**\n\t * A scope.\n\t */\n\t[7]: EShapeDataValueScope | undefined;\n\n\t/**\n\t * A resource index number of an alias.\n\t */\n\t[8]: number | undefined;\n}\n\n/**\n * A serialized system data.\n */\nexport type DDiagramSerializedDataSystem = number[];\n\n/**\n * A serialized data mapping.\n * Each number at the index 2N+0 is a resource index number of the N-th mapping source.\n * Each number at the index 2N+1 is a resource index number of the N-th mapping destination.\n */\nexport type DDiagramSerializedDataMapping = number[];\n\n/**\n * A serialized data with a mapping data.\n */\nexport interface DDiagramSerializedDataWithMapping extends Array<unknown> {\n\t/**\n\t * Each number is a resource index number of JSON.stringify(DDiagramSerializedDataValue).\n\t * The last number is a resource index number of JSON.stringify(DDiagramSerializedDataMapping).\n\t */\n\t[0]: number[];\n\n\t/**\n\t * A resource index number of JSON.stringify(DDiagramSerializedDataSystem).\n\t */\n\t[1]: number | undefined;\n}\n\n/**\n * A serialized data without a mapping data.\n * Each number is a resource index number of JSON.stringify(DDiagramSerializedDataValue).\n */\nexport type DDiagramSerializedDataWithoutMapping = number[];\n\n/**\n * A serialized data.\n */\nexport type DDiagramSerializedData =\n\t| DDiagramSerializedDataWithoutMapping\n\t| DDiagramSerializedDataWithMapping;\n\n/**\n * A serialized fill.\n */\nexport interface DDiagramSerializedFill {\n\t/** 0: Disabled, 1: Enabled */\n\t[0]: number;\n\n\t/** A color. */\n\t[1]: number;\n\n\t/** An alpha. */\n\t[2]: number;\n}\n\n/**\n * A serialized stroke.\n */\nexport interface DDiagramSerializedStroke {\n\t/** 0: Disabled, 1: Enabled */\n\t[0]: number;\n\n\t/** A color. */\n\t[1]: number;\n\n\t/** An alpha. */\n\t[2]: number;\n\n\t/** A width. */\n\t[3]: number;\n\n\t/** An align. */\n\t[4]: number;\n\n\t/** A side. */\n\t[5]: EShapeStrokeSide;\n\n\t/** A style */\n\t[6]: EShapeStrokeStyle | undefined;\n}\n\n/**\n * A serialized text outline.\n */\nexport interface DDiagramSerializedTextOutline {\n\t/** 0: Disabled, 1: Enabled */\n\t[0]: number;\n\n\t/** A color. */\n\t[1]: number;\n\n\t/** An alpha. */\n\t[2]: number;\n\n\t/** A width. */\n\t[3]: number;\n}\n\n/**\n * A serialized text align.\n */\nexport interface DDiagramSerializedTextAlign {\n\t/** A horizontal align. */\n\t[0]: EShapeTextAlignHorizontal;\n\n\t/** A vertical align. */\n\t[1]: EShapeTextAlignVertical;\n}\n\n/**\n * A serialized text offset.\n */\nexport interface DDiagramSerializedTextOffset {\n\t/** A horizontal offset. */\n\t[0]: number;\n\n\t/** A vertical offset. */\n\t[1]: number;\n}\n\n/**\n * A serialized text spacing.\n */\nexport interface DDiagramSerializedTextSpacing {\n\t/** A horizontal spacing. */\n\t[0]: number;\n\n\t/** A vertical spacing. */\n\t[1]: number;\n}\n\n/**\n * A serialized text padding.\n */\nexport interface DDiagramSerializedTextPadding {\n\t/** A horizontal padding. */\n\t[0]: number;\n\n\t/** A vertical padding. */\n\t[1]: number;\n}\n\n/**\n * A serialized text.\n */\nexport interface DDiagramSerializedText {\n\t/** A resource index number of a value. */\n\t[0]: number;\n\n\t/** A color. */\n\t[1]: number;\n\n\t/** An alpha. */\n\t[2]: number;\n\n\t/** A resource index number of a font family. */\n\t[3]: number;\n\n\t/** A size. */\n\t[4]: number;\n\n\t/** A weight. */\n\t[5]: EShapeTextWeight;\n\n\t/**\n\t * A resource index number of JSON.stringify(DDiagramSerializedTextAlign).\n\t */\n\t[6]: number;\n\n\t/**\n\t * A resource index number of JSON.stringify(DDiagramSerializedTextOffset).\n\t */\n\t[7]: number;\n\n\t/** A style. */\n\t[8]: EShapeTextStyle;\n\n\t/**\n\t * A resource index number of JSON.stringify(DDiagramSerializedTextOutline).\n\t */\n\t[9]: number;\n\n\t/**\n\t * A resource index number of JSON.stringify(DDiagramSerializedTextSpacing).\n\t */\n\t[10]: number;\n\n\t/** A direction. */\n\t[11]: EShapeTextDirection;\n\n\t/**\n\t * A resource index number of JSON.stringify(DDiagramSerializedTextPadding).\n\t */\n\t[12]: number;\n\n\t/** A clipping. (0: Off, 1: On) */\n\t[13]: number;\n\n\t/** A fitting. (0: Off, 1: On) */\n\t[14]: number;\n}\n\n/**\n * A serialized item.\n */\nexport interface DDiagramSerializedItem {\n\t/** A type. */\n\t[0]: EShapeType;\n\n\t/** A resource index number of a ID. */\n\t[1]: number;\n\n\t/** A X-coordinate position. */\n\t[2]: number;\n\n\t/** A Y-coordinate position. */\n\t[3]: number;\n\n\t/** A width. */\n\t[4]: number;\n\n\t/** A height. */\n\t[5]: number;\n\n\t/** A rotation. */\n\t[6]: number;\n\n\t/** A skew. */\n\t[7]: number;\n\n\t/**\n\t * A resource index number of JSON.stringify(DDiagramSerializedFill).\n\t */\n\t[8]: number;\n\n\t/**\n\t * A resource index number of JSON.stringify(DDiagramSerializedStroke).\n\t */\n\t[9]: number;\n\n\t/** A resource index number of a cursor. */\n\t[10]: number;\n\n\t/**\n\t * A resource index number of JSON.stringify(DDiagramSerializedText).\n\t */\n\t[11]: number;\n\n\t/**\n\t * A resource index number of JSON.stringify(DDiagramSerializedData).\n\t */\n\t[12]: number;\n\n\t/** A radius. */\n\t[13]: number;\n\n\t/** A corner. */\n\t[14]: EShapeCorner;\n\n\t/** A resource index number of a shape-specific resource. */\n\t[15]: number;\n\n\t/** A layer index number. */\n\t[16]: number;\n\n\t/** Actions */\n\t[17]: number[];\n\n\t/** A resource index number of an image. */\n\t[18]: number;\n\n\t/**\n\t * A resource index number of a stringified serialized gradient.\n\t * A stringified serialized gradient is a stringified number array,\n\t * JSON.stringify(number[]).\n\t *\n\t * * The first number in the array is a direction in degree.\n\t * * Each number at the index 3N + 1 is a color of a N-th point.\n\t * * Each number at the index 3N + 2 is a alpha of a N-th point.\n\t * * Each number at the index 3N + 3 is a position of a N-th point whose range is [0, 1].\n\t */\n\t[19]: number;\n\n\t/** Children. */\n\t[20]: DDiagramSerializedItem[];\n\n\t/** A X pivot. */\n\t[21]: number;\n\n\t/** A Y pivot. */\n\t[22]: number;\n\n\t/** (interactive ? 1 : 0) | (unfocusable ? 2 : 0) */\n\t[23]: number;\n\n\t/** A resource index number of a shortcut. */\n\t[24]: number;\n\n\t/** A resource index number of a title. */\n\t[25]: number;\n\n\t/** UUID */\n\t[26]: number;\n\n\t/** Added capabilities */\n\t[27]: number;\n\n\t/** Removed capabilities */\n\t[28]: number;\n\n\t/** Locked capabilities */\n\t[29]: number;\n}\n\n/**\n * A serialized layer.\n */\nexport interface DDiagramSerializedLayer {\n\t/** A name or a resource index number of a name*/\n\t[0]: string | number;\n\n\t/**\n\t * A visibility.\n\t *\n\t * * 1st bit\n\t * * 0: Invisible when edit mode\n\t * * 1: Visible when edit mode\n\t * * 2nd bit\n\t * * 0: Invisible when non-edit mode\n\t * * 1: Visible when non-edit mode\n\t */\n\t[1]?: number;\n\n\t/** A X-coordinate position. */\n\t[2]?: number;\n\n\t/** A Y-coordinate position. */\n\t[3]?: number;\n\n\t/** A width. */\n\t[4]?: number;\n\n\t/** A height. */\n\t[5]?: number;\n\n\t/**\n\t * A resource index number of a stringified serialized fill,\n\t * JSON.stringify(DDiagramSerializedFill).\n\t */\n\t[6]?: number;\n\n\t/**\n\t * * 1st bit\n\t * * 0: Not interactive\n\t * * 1: Interactive\n\t * * 2nd bit\n\t * * 0: Not draggable\n\t * * 1: Draggable\n\t * * 3rd bit\n\t * * 0: Not pinchable\n\t * * 1: Pinchable\n\t */\n\t[7]?: number;\n}\n\n/**\n * A serialized snap target.\n */\nexport interface DDiagramSerializedSnapTargetValue {\n\t/** A type. */\n\t[0]: ESnapperTargetValueType;\n\n\t/** A position. */\n\t[1]: number;\n}\n\n/**\n * Serialized snap on guide settings.\n */\nexport interface DDiagramSerializedSnapTarget {\n\t/** Snap on guide (0: Off, 1: On) */\n\t[0]: number;\n\n\t/** A visibility (0: Invisible, 1: Visible). */\n\t[1]: number;\n\n\t/** Snap targets. */\n\t[2]: DDiagramSerializedSnapTargetValue[];\n}\n\n/**\n * Serialized grid snap settings without a visibility option.\n */\nexport interface DDiagramSerializedSnapGridWithoutVisibility {\n\t/** Snap on grid (0: Off, 1: On) */\n\t[0]: number;\n\n\t/** A grid size. */\n\t[1]: number;\n}\n\n/**\n * Serialized grid snap settings with a visibility option.\n */\nexport interface DDiagramSerializedSnapGridWithVisibility {\n\t/** Snap on grid (0: Off, 1: On) */\n\t[0]: number;\n\n\t/** A visibility (0: Invisible, 1: Visible). */\n\t[1]: number;\n\n\t/** A grid size. */\n\t[2]: number;\n}\n\n/**\n * Serialized grid snap settings with a visibility.\n */\nexport type DDiagramSerializedSnapGrid =\n\t| DDiagramSerializedSnapGridWithoutVisibility\n\t| DDiagramSerializedSnapGridWithVisibility;\n\n/**\n * Serialized snap settings.\n */\nexport interface DDiagramSerializedSnap {\n\t/** Snap (0: Off, 1: On). */\n\t[0]: number;\n\n\t/** Snap on targets */\n\t[1]: DDiagramSerializedSnapTarget;\n\n\t/** Snap on grid */\n\t[2]: DDiagramSerializedSnapGrid;\n}\n\n/**\n * Serialized background settings.\n */\nexport interface DDiagramSerializedBackground {\n\tcolor?: number | null;\n\talpha?: number;\n}\n\n/**\n * Serialized tile settings.\n */\nexport interface DDiagramSerializedTile {\n\tmapping?: DDiagramCanvasTileMapping;\n}\n\n/**\n * A serialized diagram.\n */\nexport interface DDiagramSerialized {\n\tversion: number;\n\tid?: number;\n\tname: string;\n\tlabel?: string;\n\twidth: number;\n\theight: number;\n\tsummary?: string;\n\tdescription?: string;\n\tbackground?: DDiagramSerializedBackground;\n\ttile?: DDiagramSerializedTile;\n\tresources: string[];\n\t/** @deprecated in favor of {@link data} */\n\ttags?: string[];\n\tdata?: string[];\n\tpieces?: string[];\n\tlayers: DDiagramSerializedLayer[];\n\titems: DDiagramSerializedItem[];\n\tsnap?: DDiagramSerializedSnap;\n\tthumbnail?: string;\n}\n\nexport type DDiagramSerializedSimpleData = Omit<\n\tDDiagramSerialized,\n\t\"version\" | \"id\" | \"name\" | \"thumbnail\"\n>;\n\n/**\n * A simplified version of a serialized diagram.\n */\nexport interface DDiagramSerializedSimple {\n\tversion: number;\n\tid: number | undefined;\n\tname: string;\n\tlabel?: string;\n\tsummary?: string;\n\tdescription?: string;\n\n\t/**\n\t * A stringified {@link DDiagramSerialized#data}.\n\t *\n\t * @deprecated in favor of {@link DDiagramSerializedSimpleData}.\n\t */\n\ttags?: string;\n\n\t/**\n\t * A stringified {@link DDiagramSerialized#pieces}.\n\t *\n\t * @deprecated in favor of {@link DDiagramSerializedSimpleData}.\n\t */\n\tpieces?: string;\n\n\t/**\n\t * Thumbnail data URL.\n\t */\n\tthumbnail?: string;\n\n\t/**\n\t * A stringified {@link DDiagramSerializedSimpleData}.\n\t */\n\tdata: string;\n}\n\nexport interface DDiagramSerializedName {\n\tid: number;\n\tname: string;\n}\n"]}
|
|
@@ -14,6 +14,9 @@ var DDiagrams = /** @class */ (function () {
|
|
|
14
14
|
version: serialized.version,
|
|
15
15
|
id: serialized.id,
|
|
16
16
|
name: serialized.name,
|
|
17
|
+
label: serialized.label,
|
|
18
|
+
summary: serialized.summary,
|
|
19
|
+
description: serialized.description,
|
|
17
20
|
thumbnail: serialized.thumbnail,
|
|
18
21
|
data: JSON.stringify({
|
|
19
22
|
width: serialized.width,
|
|
@@ -36,8 +39,11 @@ var DDiagrams = /** @class */ (function () {
|
|
|
36
39
|
version: target.version,
|
|
37
40
|
id: target.id,
|
|
38
41
|
name: target.name,
|
|
42
|
+
label: target.label,
|
|
39
43
|
width: data.width,
|
|
40
44
|
height: data.height,
|
|
45
|
+
summary: target.summary,
|
|
46
|
+
description: target.description,
|
|
41
47
|
background: data.background,
|
|
42
48
|
tile: data.tile,
|
|
43
49
|
resources: data.resources,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"d-diagrams.js","sourceRoot":"","sources":["../../../src/main/typescript/wcardinal/ui/d-diagrams.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAWH,OAAO,EAAE,oCAAoC,EAAE,MAAM,kDAAkD,CAAC;AAExG,OAAO,EAAE,cAAc,EAAE,MAAM,iCAAiC,CAAC;AACjE,OAAO,EAAE,mBAAmB,EAAE,MAAM,wCAAwC,CAAC;AAC7E,OAAO,EAAE,4BAA4B,EAAE,MAAM,kDAAkD,CAAC;AAEhG;IAAA;IAgMA,CAAC;IA/LO,kBAAQ,GAAf,UAAgB,UAA8B;QAC7C,OAAO;YACN,OAAO,EAAE,UAAU,CAAC,OAAO;YAC3B,EAAE,EAAE,UAAU,CAAC,EAAE;YACjB,IAAI,EAAE,UAAU,CAAC,IAAI;YACrB,SAAS,EAAE,UAAU,CAAC,SAAS;YAC/B,IAAI,EAAE,IAAI,CAAC,SAAS,CAAC;gBACpB,KAAK,EAAE,UAAU,CAAC,KAAK;gBACvB,MAAM,EAAE,UAAU,CAAC,MAAM;gBACzB,UAAU,EAAE,UAAU,CAAC,UAAU;gBACjC,IAAI,EAAE,UAAU,CAAC,IAAI;gBACrB,SAAS,EAAE,UAAU,CAAC,SAAS;gBAC/B,IAAI,EAAE,UAAU,CAAC,IAAI,IAAI,UAAU,CAAC,IAAI;gBACxC,MAAM,EAAE,UAAU,CAAC,MAAM;gBACzB,MAAM,EAAE,UAAU,CAAC,MAAM;gBACzB,KAAK,EAAE,UAAU,CAAC,KAAK;gBACvB,IAAI,EAAE,UAAU,CAAC,IAAI;aACrB,CAAC;SACF,CAAC;IACH,CAAC;IA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AAI,EACJ,KAAK,CACL,CAAC,IAAI,CAAC;YACN,OAAO,KAAI,CAAC,QAAQ,CACnB,UAAU,EACV,SAAS,EACT,IAAI,oCAAoC,CACvC,UAAU,EACV,MAAM,EACN,YAAY,EACZ,IAAI,EACJ,KAAK,CACL,CACD,CAAC;QACH,CAAC,CAAC,CAAC;IACJ,CAAC;IACF,gBAAC;AAAD,CAAC,AAhMD,IAgMC","sourcesContent":["/*\n * Copyright (C) 2019 Toshiba Corporation\n * SPDX-License-Identifier: Apache-2.0\n */\n\nimport { DDiagramBaseController } from \"./d-diagram-base-controller\";\nimport { DDiagramLayerContainer } from \"./d-diagram-layer-container\";\nimport {\n\tDDiagramSerialized,\n\tDDiagramSerializedSimple,\n\tDDiagramSerializedSimpleData\n} from \"./d-diagram-serialized\";\nimport { EShape } from \"./shape/e-shape\";\nimport { EShapeLayerContainer } from \"./shape/e-shape-layer-container\";\nimport { EShapeResourceManagerDeserialization } from \"./shape/e-shape-resource-manager-deserialization\";\nimport { EShapeResourceManagerDeserializationMode } from \"./shape/e-shape-resource-manager-deserialization-mode\";\nimport { deserializeAll } from \"./shape/variant/deserialize-all\";\nimport { EShapeEmbeddedDatum } from \"./shape/variant/e-shape-embedded-datum\";\nimport { EShapeEmbeddedLayerContainer } from \"./shape/variant/e-shape-embedded-layer-container\";\n\nexport class DDiagrams {\n\tstatic toSimple(serialized: DDiagramSerialized): DDiagramSerializedSimple {\n\t\treturn {\n\t\t\tversion: serialized.version,\n\t\t\tid: serialized.id,\n\t\t\tname: serialized.name,\n\t\t\tthumbnail: serialized.thumbnail,\n\t\t\tdata: JSON.stringify({\n\t\t\t\twidth: serialized.width,\n\t\t\t\theight: serialized.height,\n\t\t\t\tbackground: serialized.background,\n\t\t\t\ttile: serialized.tile,\n\t\t\t\tresources: serialized.resources,\n\t\t\t\tdata: serialized.data || serialized.tags,\n\t\t\t\tpieces: serialized.pieces,\n\t\t\t\tlayers: serialized.layers,\n\t\t\t\titems: serialized.items,\n\t\t\t\tsnap: serialized.snap\n\t\t\t})\n\t\t};\n\t}\n\n\tstatic toSerialized(target: DDiagramSerializedSimple | DDiagramSerialized): DDiagramSerialized {\n\t\tif (!(\"items\" in target)) {\n\t\t\tconst data: DDiagramSerializedSimpleData = JSON.parse(target.data);\n\t\t\tconst result: DDiagramSerialized = {\n\t\t\t\tversion: target.version,\n\t\t\t\tid: target.id,\n\t\t\t\tname: target.name,\n\t\t\t\twidth: data.width,\n\t\t\t\theight: data.height,\n\t\t\t\tbackground: data.background,\n\t\t\t\ttile: data.tile,\n\t\t\t\tresources: data.resources,\n\t\t\t\tdata: data.data || data.tags,\n\t\t\t\tpieces: data.pieces,\n\t\t\t\tlayers: data.layers,\n\t\t\t\titems: data.items,\n\t\t\t\tsnap: data.snap,\n\t\t\t\tthumbnail: target.thumbnail\n\t\t\t};\n\t\t\tif (result.data == null) {\n\t\t\t\tconst tags = target.tags;\n\t\t\t\tif (tags != null) {\n\t\t\t\t\tresult.data = JSON.parse(tags);\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (result.pieces == null) {\n\t\t\t\tconst pieces = target.pieces;\n\t\t\t\tif (pieces != null) {\n\t\t\t\t\tresult.pieces = JSON.parse(pieces);\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn result;\n\t\t}\n\t\treturn target;\n\t}\n\n\tstatic newLayer(\n\t\tserialized: DDiagramSerialized,\n\t\tcontainer: DDiagramLayerContainer | EShapeLayerContainer,\n\t\tmanager: EShapeResourceManagerDeserialization\n\t): Promise<EShape[]> {\n\t\t// Layers\n\t\tcontainer.deserialize(serialized.layers, manager);\n\n\t\t// Items\n\t\tconst serializedItems = serialized.items;\n\t\tconst shapePromises = deserializeAll(serializedItems, manager);\n\t\tif (shapePromises != null) {\n\t\t\treturn shapePromises.then((shapes: EShape[]): EShape[] => {\n\t\t\t\tconst layers = container.children;\n\t\t\t\tfor (let i = 0, imax = shapes.length; i < imax; ++i) {\n\t\t\t\t\tconst serializedItem = serializedItems[i];\n\t\t\t\t\tconst shape = shapes[i];\n\t\t\t\t\tconst layer = layers[serializedItem[16]];\n\t\t\t\t\tif (layer != null) {\n\t\t\t\t\t\tshape.parent = layer;\n\t\t\t\t\t\tshape.uploaded = undefined;\n\t\t\t\t\t\tlayer.children.push(shape);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tfor (let i = 0, imax = layers.length; i < imax; ++i) {\n\t\t\t\t\tconst layer = layers[i];\n\t\t\t\t\tlayer.onChildTransformChange();\n\t\t\t\t\tlayer.toDirty();\n\t\t\t\t\tconst children = layer.children;\n\t\t\t\t\tfor (let j = 0, jmax = children.length; j < jmax; ++j) {\n\t\t\t\t\t\tchildren[j].onAttach();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\treturn shapes;\n\t\t\t});\n\t\t} else {\n\t\t\treturn Promise.resolve([]);\n\t\t}\n\t}\n\n\tstatic toPieceData(\n\t\tcontroller: DDiagramBaseController | null | undefined,\n\t\tpieces: string[] | null | undefined,\n\t\tmode: EShapeResourceManagerDeserializationMode\n\t): Promise<Map<string, EShapeEmbeddedDatum | null>> {\n\t\tconst pieceToDatum = new Map<string, EShapeEmbeddedDatum | null>();\n\t\tconst pieceToPromise = new Map<string, Promise<EShape[] | null>>();\n\t\tconst onFulfilled = () => {\n\t\t\treturn pieceToDatum;\n\t\t};\n\t\treturn this.toPieceData_(controller, pieces, pieceToDatum, pieceToPromise, mode, 0).then(\n\t\t\tonFulfilled,\n\t\t\tonFulfilled\n\t\t);\n\t}\n\n\tprivate static toPieceData_(\n\t\tcontroller: DDiagramBaseController | null | undefined,\n\t\tpieces: string[] | null | undefined,\n\t\tpieceToDatum: Map<string, EShapeEmbeddedDatum | null>,\n\t\tpieceToPromise: Map<string, Promise<EShape[] | null>>,\n\t\tmode: EShapeResourceManagerDeserializationMode,\n\t\tdepth: number\n\t): Promise<Array<EShape[] | null>> {\n\t\tconst promises: Array<Promise<EShape[] | null>> = [];\n\t\tif (pieces && 0 < pieces.length && controller) {\n\t\t\tfor (let i = 0, imax = pieces.length; i < imax; ++i) {\n\t\t\t\tconst piece = pieces[i];\n\t\t\t\tconst promise = pieceToPromise.get(piece);\n\t\t\t\tif (promise != null) {\n\t\t\t\t\tpromises.push(promise);\n\t\t\t\t} else {\n\t\t\t\t\tconst newPromise = controller.piece.getByName(piece).then(\n\t\t\t\t\t\t(found) => {\n\t\t\t\t\t\t\treturn this.toPieceData__(\n\t\t\t\t\t\t\t\tcontroller,\n\t\t\t\t\t\t\t\tpiece,\n\t\t\t\t\t\t\t\tfound,\n\t\t\t\t\t\t\t\tmode,\n\t\t\t\t\t\t\t\tdepth + 1,\n\t\t\t\t\t\t\t\tpieceToDatum,\n\t\t\t\t\t\t\t\tpieceToPromise\n\t\t\t\t\t\t\t);\n\t\t\t\t\t\t},\n\t\t\t\t\t\t() => {\n\t\t\t\t\t\t\treturn null;\n\t\t\t\t\t\t}\n\t\t\t\t\t);\n\t\t\t\t\tpieceToPromise.set(piece, newPromise);\n\t\t\t\t\tpromises.push(newPromise);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn Promise.all(promises);\n\t}\n\n\tprivate static toPieceData__(\n\t\tcontroller: DDiagramBaseController,\n\t\tname: string,\n\t\tserializedOrSimple: DDiagramSerialized | DDiagramSerializedSimple,\n\t\tmode: EShapeResourceManagerDeserializationMode,\n\t\tdepth: number,\n\t\tpieceToDatum: Map<string, EShapeEmbeddedDatum | null>,\n\t\tpieceToPromise: Map<string, Promise<EShape[] | null>>\n\t): Promise<EShape[]> {\n\t\tconst serialized = this.toSerialized(serializedOrSimple);\n\t\tconst width = serialized.width;\n\t\tconst height = serialized.height;\n\t\tconst container = new EShapeEmbeddedLayerContainer(width, height);\n\n\t\tpieceToDatum.set(name, new EShapeEmbeddedDatum(name, width, height, container));\n\n\t\tconst pieces = serialized.pieces;\n\t\treturn this.toPieceData_(\n\t\t\tcontroller,\n\t\t\tpieces,\n\t\t\tpieceToDatum,\n\t\t\tpieceToPromise,\n\t\t\tmode,\n\t\t\tdepth\n\t\t).then(() => {\n\t\t\treturn this.newLayer(\n\t\t\t\tserialized,\n\t\t\t\tcontainer,\n\t\t\t\tnew EShapeResourceManagerDeserialization(\n\t\t\t\t\tserialized,\n\t\t\t\t\tpieces,\n\t\t\t\t\tpieceToDatum,\n\t\t\t\t\tmode,\n\t\t\t\t\tdepth\n\t\t\t\t)\n\t\t\t);\n\t\t});\n\t}\n}\n"]}
|
|
1
|
+
{"version":3,"file":"d-diagrams.js","sourceRoot":"","sources":["../../../src/main/typescript/wcardinal/ui/d-diagrams.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAWH,OAAO,EAAE,oCAAoC,EAAE,MAAM,kDAAkD,CAAC;AAExG,OAAO,EAAE,cAAc,EAAE,MAAM,iCAAiC,CAAC;AACjE,OAAO,EAAE,mBAAmB,EAAE,MAAM,wCAAwC,CAAC;AAC7E,OAAO,EAAE,4BAA4B,EAAE,MAAM,kDAAkD,CAAC;AAEhG;IAAA;IAsMA,CAAC;IArMO,kBAAQ,GAAf,UAAgB,UAA8B;QAC7C,OAAO;YACN,OAAO,EAAE,UAAU,CAAC,OAAO;YAC3B,EAAE,EAAE,UAAU,CAAC,EAAE;YACjB,IAAI,EAAE,UAAU,CAAC,IAAI;YACrB,KAAK,EAAE,UAAU,CAAC,KAAK;YACvB,OAAO,EAAE,UAAU,CAAC,OAAO;YAC3B,WAAW,EAAE,UAAU,CAAC,WAAW;YACnC,SAAS,EAAE,UAAU,CAAC,SAAS;YAC/B,IAAI,EAAE,IAAI,CAAC,SAAS,CAAC;gBACpB,KAAK,EAAE,UAAU,CAAC,KAAK;gBACvB,MAAM,EAAE,UAAU,CAAC,MAAM;gBACzB,UAAU,EAAE,UAAU,CAAC,UAAU;gBACjC,IAAI,EAAE,UAAU,CAAC,IAAI;gBACrB,SAAS,EAAE,UAAU,CAAC,SAAS;gBAC/B,IAAI,EAAE,UAAU,CAAC,IAAI,IAAI,UAAU,CAAC,IAAI;gBACxC,MAAM,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,KAAK,EAAE,MAAM,CAAC,CAAC;QAElE,YAAY,CAAC,GAAG,CAAC,IAAI,EAAE,IAAI,mBAAmB,CAAC,IAAI,EAAE,KAAK,EAAE,MAAM,EAAE,SAAS,CAAC,CAAC,CAAC;QAEhF,IAAM,MAAM,GAAG,UAAU,CAAC,MAAM,CAAC;QACjC,OAAO,IAAI,CAAC,YAAY,CACvB,UAAU,EACV,MAAM,EACN,YAAY,EACZ,cAAc,EACd,IAAI,EACJ,KAAK,CACL,CAAC,IAAI,CAAC;YACN,OAAO,KAAI,CAAC,QAAQ,CACnB,UAAU,EACV,SAAS,EACT,IAAI,oCAAoC,CACvC,UAAU,EACV,MAAM,EACN,YAAY,EACZ,IAAI,EACJ,KAAK,CACL,CACD,CAAC;QACH,CAAC,CAAC,CAAC;IACJ,CAAC;IACF,gBAAC;AAAD,CAAC,AAtMD,IAsMC","sourcesContent":["/*\n * Copyright (C) 2019 Toshiba Corporation\n * SPDX-License-Identifier: Apache-2.0\n */\n\nimport { DDiagramBaseController } from \"./d-diagram-base-controller\";\nimport { DDiagramLayerContainer } from \"./d-diagram-layer-container\";\nimport {\n\tDDiagramSerialized,\n\tDDiagramSerializedSimple,\n\tDDiagramSerializedSimpleData\n} from \"./d-diagram-serialized\";\nimport { EShape } from \"./shape/e-shape\";\nimport { EShapeLayerContainer } from \"./shape/e-shape-layer-container\";\nimport { EShapeResourceManagerDeserialization } from \"./shape/e-shape-resource-manager-deserialization\";\nimport { EShapeResourceManagerDeserializationMode } from \"./shape/e-shape-resource-manager-deserialization-mode\";\nimport { deserializeAll } from \"./shape/variant/deserialize-all\";\nimport { EShapeEmbeddedDatum } from \"./shape/variant/e-shape-embedded-datum\";\nimport { EShapeEmbeddedLayerContainer } from \"./shape/variant/e-shape-embedded-layer-container\";\n\nexport class DDiagrams {\n\tstatic toSimple(serialized: DDiagramSerialized): DDiagramSerializedSimple {\n\t\treturn {\n\t\t\tversion: serialized.version,\n\t\t\tid: serialized.id,\n\t\t\tname: serialized.name,\n\t\t\tlabel: serialized.label,\n\t\t\tsummary: serialized.summary,\n\t\t\tdescription: serialized.description,\n\t\t\tthumbnail: serialized.thumbnail,\n\t\t\tdata: JSON.stringify({\n\t\t\t\twidth: serialized.width,\n\t\t\t\theight: serialized.height,\n\t\t\t\tbackground: serialized.background,\n\t\t\t\ttile: serialized.tile,\n\t\t\t\tresources: serialized.resources,\n\t\t\t\tdata: serialized.data || serialized.tags,\n\t\t\t\tpieces: serialized.pieces,\n\t\t\t\tlayers: serialized.layers,\n\t\t\t\titems: serialized.items,\n\t\t\t\tsnap: serialized.snap\n\t\t\t})\n\t\t};\n\t}\n\n\tstatic toSerialized(target: DDiagramSerializedSimple | DDiagramSerialized): DDiagramSerialized {\n\t\tif (!(\"items\" in target)) {\n\t\t\tconst data: DDiagramSerializedSimpleData = JSON.parse(target.data);\n\t\t\tconst result: DDiagramSerialized = {\n\t\t\t\tversion: target.version,\n\t\t\t\tid: target.id,\n\t\t\t\tname: target.name,\n\t\t\t\tlabel: target.label,\n\t\t\t\twidth: data.width,\n\t\t\t\theight: data.height,\n\t\t\t\tsummary: target.summary,\n\t\t\t\tdescription: target.description,\n\t\t\t\tbackground: data.background,\n\t\t\t\ttile: data.tile,\n\t\t\t\tresources: data.resources,\n\t\t\t\tdata: data.data || data.tags,\n\t\t\t\tpieces: data.pieces,\n\t\t\t\tlayers: data.layers,\n\t\t\t\titems: data.items,\n\t\t\t\tsnap: data.snap,\n\t\t\t\tthumbnail: target.thumbnail\n\t\t\t};\n\t\t\tif (result.data == null) {\n\t\t\t\tconst tags = target.tags;\n\t\t\t\tif (tags != null) {\n\t\t\t\t\tresult.data = JSON.parse(tags);\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (result.pieces == null) {\n\t\t\t\tconst pieces = target.pieces;\n\t\t\t\tif (pieces != null) {\n\t\t\t\t\tresult.pieces = JSON.parse(pieces);\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn result;\n\t\t}\n\t\treturn target;\n\t}\n\n\tstatic newLayer(\n\t\tserialized: DDiagramSerialized,\n\t\tcontainer: DDiagramLayerContainer | EShapeLayerContainer,\n\t\tmanager: EShapeResourceManagerDeserialization\n\t): Promise<EShape[]> {\n\t\t// Layers\n\t\tcontainer.deserialize(serialized.layers, manager);\n\n\t\t// Items\n\t\tconst serializedItems = serialized.items;\n\t\tconst shapePromises = deserializeAll(serializedItems, manager);\n\t\tif (shapePromises != null) {\n\t\t\treturn shapePromises.then((shapes: EShape[]): EShape[] => {\n\t\t\t\tconst layers = container.children;\n\t\t\t\tfor (let i = 0, imax = shapes.length; i < imax; ++i) {\n\t\t\t\t\tconst serializedItem = serializedItems[i];\n\t\t\t\t\tconst shape = shapes[i];\n\t\t\t\t\tconst layer = layers[serializedItem[16]];\n\t\t\t\t\tif (layer != null) {\n\t\t\t\t\t\tshape.parent = layer;\n\t\t\t\t\t\tshape.uploaded = undefined;\n\t\t\t\t\t\tlayer.children.push(shape);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tfor (let i = 0, imax = layers.length; i < imax; ++i) {\n\t\t\t\t\tconst layer = layers[i];\n\t\t\t\t\tlayer.onChildTransformChange();\n\t\t\t\t\tlayer.toDirty();\n\t\t\t\t\tconst children = layer.children;\n\t\t\t\t\tfor (let j = 0, jmax = children.length; j < jmax; ++j) {\n\t\t\t\t\t\tchildren[j].onAttach();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\treturn shapes;\n\t\t\t});\n\t\t} else {\n\t\t\treturn Promise.resolve([]);\n\t\t}\n\t}\n\n\tstatic toPieceData(\n\t\tcontroller: DDiagramBaseController | null | undefined,\n\t\tpieces: string[] | null | undefined,\n\t\tmode: EShapeResourceManagerDeserializationMode\n\t): Promise<Map<string, EShapeEmbeddedDatum | null>> {\n\t\tconst pieceToDatum = new Map<string, EShapeEmbeddedDatum | null>();\n\t\tconst pieceToPromise = new Map<string, Promise<EShape[] | null>>();\n\t\tconst onFulfilled = () => {\n\t\t\treturn pieceToDatum;\n\t\t};\n\t\treturn this.toPieceData_(controller, pieces, pieceToDatum, pieceToPromise, mode, 0).then(\n\t\t\tonFulfilled,\n\t\t\tonFulfilled\n\t\t);\n\t}\n\n\tprivate static toPieceData_(\n\t\tcontroller: DDiagramBaseController | null | undefined,\n\t\tpieces: string[] | null | undefined,\n\t\tpieceToDatum: Map<string, EShapeEmbeddedDatum | null>,\n\t\tpieceToPromise: Map<string, Promise<EShape[] | null>>,\n\t\tmode: EShapeResourceManagerDeserializationMode,\n\t\tdepth: number\n\t): Promise<Array<EShape[] | null>> {\n\t\tconst promises: Array<Promise<EShape[] | null>> = [];\n\t\tif (pieces && 0 < pieces.length && controller) {\n\t\t\tfor (let i = 0, imax = pieces.length; i < imax; ++i) {\n\t\t\t\tconst piece = pieces[i];\n\t\t\t\tconst promise = pieceToPromise.get(piece);\n\t\t\t\tif (promise != null) {\n\t\t\t\t\tpromises.push(promise);\n\t\t\t\t} else {\n\t\t\t\t\tconst newPromise = controller.piece.getByName(piece).then(\n\t\t\t\t\t\t(found) => {\n\t\t\t\t\t\t\treturn this.toPieceData__(\n\t\t\t\t\t\t\t\tcontroller,\n\t\t\t\t\t\t\t\tpiece,\n\t\t\t\t\t\t\t\tfound,\n\t\t\t\t\t\t\t\tmode,\n\t\t\t\t\t\t\t\tdepth + 1,\n\t\t\t\t\t\t\t\tpieceToDatum,\n\t\t\t\t\t\t\t\tpieceToPromise\n\t\t\t\t\t\t\t);\n\t\t\t\t\t\t},\n\t\t\t\t\t\t() => {\n\t\t\t\t\t\t\treturn null;\n\t\t\t\t\t\t}\n\t\t\t\t\t);\n\t\t\t\t\tpieceToPromise.set(piece, newPromise);\n\t\t\t\t\tpromises.push(newPromise);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn Promise.all(promises);\n\t}\n\n\tprivate static toPieceData__(\n\t\tcontroller: DDiagramBaseController,\n\t\tname: string,\n\t\tserializedOrSimple: DDiagramSerialized | DDiagramSerializedSimple,\n\t\tmode: EShapeResourceManagerDeserializationMode,\n\t\tdepth: number,\n\t\tpieceToDatum: Map<string, EShapeEmbeddedDatum | null>,\n\t\tpieceToPromise: Map<string, Promise<EShape[] | null>>\n\t): Promise<EShape[]> {\n\t\tconst serialized = this.toSerialized(serializedOrSimple);\n\t\tconst width = serialized.width;\n\t\tconst height = serialized.height;\n\t\tconst container = new EShapeEmbeddedLayerContainer(width, height);\n\n\t\tpieceToDatum.set(name, new EShapeEmbeddedDatum(name, width, height, container));\n\n\t\tconst pieces = serialized.pieces;\n\t\treturn this.toPieceData_(\n\t\t\tcontroller,\n\t\t\tpieces,\n\t\t\tpieceToDatum,\n\t\t\tpieceToPromise,\n\t\t\tmode,\n\t\t\tdepth\n\t\t).then(() => {\n\t\t\treturn this.newLayer(\n\t\t\t\tserialized,\n\t\t\t\tcontainer,\n\t\t\t\tnew EShapeResourceManagerDeserialization(\n\t\t\t\t\tserialized,\n\t\t\t\t\tpieces,\n\t\t\t\t\tpieceToDatum,\n\t\t\t\t\tmode,\n\t\t\t\t\tdepth\n\t\t\t\t)\n\t\t\t);\n\t\t});\n\t}\n}\n"]}
|
|
@@ -7,11 +7,11 @@ import { UtilGestureModifier } from "./util/util-gesture-modifier";
|
|
|
7
7
|
import { toEnum } from "./util/to-enum";
|
|
8
8
|
import { UtilGesture } from "./util/util-gesture";
|
|
9
9
|
var DViewGestureImpl = /** @class */ (function () {
|
|
10
|
-
function DViewGestureImpl(
|
|
10
|
+
function DViewGestureImpl(owner, toTarget, parent, constraint, theme, options) {
|
|
11
11
|
var _this = this;
|
|
12
12
|
var _a, _b;
|
|
13
|
+
this._owner = owner;
|
|
13
14
|
this._parent = parent;
|
|
14
|
-
this._stopper = stopper;
|
|
15
15
|
this._constraint = constraint;
|
|
16
16
|
var mode = toEnum((_a = options === null || options === void 0 ? void 0 : options.mode) !== null && _a !== void 0 ? _a : theme.getGestureMode(), UtilGestureMode);
|
|
17
17
|
var modifier = toEnum((_b = options === null || options === void 0 ? void 0 : options.modifier) !== null && _b !== void 0 ? _b : theme.getGestureModifier(), UtilGestureModifier);
|
|
@@ -25,24 +25,45 @@ var DViewGestureImpl = /** @class */ (function () {
|
|
|
25
25
|
},
|
|
26
26
|
on: {
|
|
27
27
|
start: function () {
|
|
28
|
-
_this.
|
|
28
|
+
_this.onStart();
|
|
29
29
|
},
|
|
30
30
|
move: function (target, dx, dy, x, y, ds) {
|
|
31
|
-
_this.onGestureMove(toTarget(
|
|
31
|
+
_this.onGestureMove(toTarget(owner), dx, dy, x, y, ds);
|
|
32
|
+
},
|
|
33
|
+
easing: {
|
|
34
|
+
end: function () {
|
|
35
|
+
_this.onEnd();
|
|
36
|
+
}
|
|
37
|
+
},
|
|
38
|
+
stop: function () {
|
|
39
|
+
_this.onStop();
|
|
32
40
|
}
|
|
33
41
|
}
|
|
34
42
|
});
|
|
35
43
|
}
|
|
36
44
|
}
|
|
45
|
+
DViewGestureImpl.prototype.onStart = function () {
|
|
46
|
+
var parent = this._parent;
|
|
47
|
+
parent.stop();
|
|
48
|
+
parent.emit("start", this, parent);
|
|
49
|
+
};
|
|
50
|
+
DViewGestureImpl.prototype.onEnd = function () {
|
|
51
|
+
var parent = this._parent;
|
|
52
|
+
parent.emit("end", this, parent);
|
|
53
|
+
};
|
|
54
|
+
DViewGestureImpl.prototype.onStop = function () {
|
|
55
|
+
var parent = this._parent;
|
|
56
|
+
parent.emit("stop", this, parent);
|
|
57
|
+
};
|
|
37
58
|
DViewGestureImpl.prototype.onGestureMove = function (target, dx, dy, x, y, ds) {
|
|
38
59
|
if (target) {
|
|
39
60
|
// Scale
|
|
40
|
-
var
|
|
61
|
+
var parent_1 = this._parent;
|
|
41
62
|
var oldScale = target.scale;
|
|
42
63
|
var oldScaleX = oldScale.x;
|
|
43
64
|
var oldScaleY = oldScale.y;
|
|
44
|
-
var newScaleX =
|
|
45
|
-
var newScaleY =
|
|
65
|
+
var newScaleX = parent_1.toNormalizedScale(oldScaleX * ds);
|
|
66
|
+
var newScaleY = parent_1.toNormalizedScale(oldScaleY * ds);
|
|
46
67
|
var scaleRatioX = newScaleX / oldScaleX;
|
|
47
68
|
var scaleRatioY = newScaleY / oldScaleY;
|
|
48
69
|
var scaleRatio = ds < 1 ? Math.max(scaleRatioX, scaleRatioY) : Math.min(scaleRatioX, scaleRatioY);
|
|
@@ -60,11 +81,11 @@ var DViewGestureImpl = /** @class */ (function () {
|
|
|
60
81
|
};
|
|
61
82
|
DViewGestureImpl.prototype.stop = function () {
|
|
62
83
|
var _a;
|
|
63
|
-
(_a = this._gestureUtil) === null || _a === void 0 ? void 0 : _a.stop(this.
|
|
84
|
+
(_a = this._gestureUtil) === null || _a === void 0 ? void 0 : _a.stop(this._owner);
|
|
64
85
|
};
|
|
65
86
|
DViewGestureImpl.prototype.onDown = function (e) {
|
|
66
87
|
var _a;
|
|
67
|
-
(_a = this._gestureUtil) === null || _a === void 0 ? void 0 : _a.onDown(this.
|
|
88
|
+
(_a = this._gestureUtil) === null || _a === void 0 ? void 0 : _a.onDown(this._owner, e);
|
|
68
89
|
};
|
|
69
90
|
return DViewGestureImpl;
|
|
70
91
|
}());
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"d-view-gesture-impl.js","sourceRoot":"","sources":["../../../src/main/typescript/wcardinal/ui/d-view-gesture-impl.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAIH,OAAO,EAAE,eAAe,EAAE,MAAM,0BAA0B,CAAC;AAC3D,OAAO,EAAE,mBAAmB,EAAE,MAAM,8BAA8B,CAAC;AAInE,OAAO,EAAE,MAAM,EAAE,MAAM,gBAAgB,CAAC;AACxC,OAAO,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAC;AAGlD;IAMC,0BACC,
|
|
1
|
+
{"version":3,"file":"d-view-gesture-impl.js","sourceRoot":"","sources":["../../../src/main/typescript/wcardinal/ui/d-view-gesture-impl.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAIH,OAAO,EAAE,eAAe,EAAE,MAAM,0BAA0B,CAAC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apache-2.0\n */\n\nimport { interaction } from \"pixi.js\";\nimport { DBase } from \"./d-base\";\nimport { UtilGestureMode } from \"./util/util-gesture-mode\";\nimport { UtilGestureModifier } from \"./util/util-gesture-modifier\";\nimport { DThemeViewGesture, DViewGesture, DViewGestureOptions } from \"./d-view-gesture\";\nimport { DViewParent } from \"./d-view-parent\";\nimport { DViewTarget, DViewToTarget } from \"./d-view-to-target\";\nimport { toEnum } from \"./util/to-enum\";\nimport { UtilGesture } from \"./util/util-gesture\";\nimport { DViewConstraint } from \"./d-view-constraint\";\n\nexport class DViewGestureImpl implements DViewGesture {\n\tprotected _owner: DBase;\n\tprotected _parent: DViewParent;\n\tprotected _constraint: DViewConstraint;\n\tprotected _gestureUtil?: UtilGesture<DBase>;\n\n\tconstructor(\n\t\towner: DBase,\n\t\ttoTarget: DViewToTarget,\n\t\tparent: DViewParent,\n\t\tconstraint: DViewConstraint,\n\t\ttheme: DThemeViewGesture,\n\t\toptions?: DViewGestureOptions\n\t) {\n\t\tthis._owner = owner;\n\t\tthis._parent = parent;\n\t\tthis._constraint = constraint;\n\n\t\tconst mode = toEnum(options?.mode ?? theme.getGestureMode(), UtilGestureMode);\n\t\tconst modifier = toEnum(\n\t\t\toptions?.modifier ?? theme.getGestureModifier(),\n\t\t\tUtilGestureModifier\n\t\t);\n\t\tif (mode === UtilGestureMode.ON || mode === UtilGestureMode.TOUCH) {\n\t\t\tthis._gestureUtil = new UtilGesture<DBase>({\n\t\t\t\ttouch: mode === UtilGestureMode.TOUCH,\n\t\t\t\tmodifier,\n\t\t\t\tchecker: options && options.checker,\n\t\t\t\teasing: {\n\t\t\t\t\tduration: options?.duration\n\t\t\t\t},\n\t\t\t\ton: {\n\t\t\t\t\tstart: (): void => {\n\t\t\t\t\t\tthis.onStart();\n\t\t\t\t\t},\n\t\t\t\t\tmove: (\n\t\t\t\t\t\ttarget: DBase,\n\t\t\t\t\t\tdx: number,\n\t\t\t\t\t\tdy: number,\n\t\t\t\t\t\tx: number,\n\t\t\t\t\t\ty: number,\n\t\t\t\t\t\tds: number\n\t\t\t\t\t): void => {\n\t\t\t\t\t\tthis.onGestureMove(toTarget(owner), dx, dy, x, y, ds);\n\t\t\t\t\t},\n\t\t\t\t\teasing: {\n\t\t\t\t\t\tend: (): void => {\n\t\t\t\t\t\t\tthis.onEnd();\n\t\t\t\t\t\t}\n\t\t\t\t\t},\n\t\t\t\t\tstop: (): void => {\n\t\t\t\t\t\tthis.onStop();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t});\n\t\t}\n\t}\n\n\tprotected onStart(): void {\n\t\tconst parent = this._parent;\n\t\tparent.stop();\n\t\tparent.emit(\"start\", this, parent);\n\t}\n\n\tprotected onEnd(): void {\n\t\tconst parent = this._parent;\n\t\tparent.emit(\"end\", this, parent);\n\t}\n\n\tprotected onStop(): void {\n\t\tconst parent = this._parent;\n\t\tparent.emit(\"stop\", this, parent);\n\t}\n\n\tprotected onGestureMove(\n\t\ttarget: DViewTarget | null,\n\t\tdx: number,\n\t\tdy: number,\n\t\tx: number,\n\t\ty: number,\n\t\tds: number\n\t): void {\n\t\tif (target) {\n\t\t\t// Scale\n\t\t\tconst parent = this._parent;\n\t\t\tconst oldScale = target.scale;\n\t\t\tconst oldScaleX = oldScale.x;\n\t\t\tconst oldScaleY = oldScale.y;\n\t\t\tlet newScaleX = parent.toNormalizedScale(oldScaleX * ds);\n\t\t\tlet newScaleY = parent.toNormalizedScale(oldScaleY * ds);\n\n\t\t\tconst scaleRatioX = newScaleX / oldScaleX;\n\t\t\tconst scaleRatioY = newScaleY / oldScaleY;\n\t\t\tconst scaleRatio =\n\t\t\t\tds < 1 ? Math.max(scaleRatioX, scaleRatioY) : Math.min(scaleRatioX, scaleRatioY);\n\t\t\tnewScaleX = scaleRatio * oldScaleX;\n\t\t\tnewScaleY = scaleRatio * oldScaleY;\n\n\t\t\t// Position\n\t\t\tconst cx = x - dx;\n\t\t\tconst cy = y - dy;\n\t\t\tconst position = target.position;\n\t\t\tconst newX = (position.x - cx) * scaleRatio + x;\n\t\t\tconst newY = (position.y - cy) * scaleRatio + y;\n\n\t\t\t// Update\n\t\t\tthis._constraint(target, newX, newY, newScaleX, newScaleY);\n\t\t}\n\t}\n\n\tstop(): void {\n\t\tthis._gestureUtil?.stop(this._owner);\n\t}\n\n\tonDown(e: interaction.InteractionEvent): void {\n\t\tthis._gestureUtil?.onDown(this._owner, e);\n\t}\n}\n"]}
|
|
@@ -2,7 +2,8 @@
|
|
|
2
2
|
* Copyright (C) 2019 Toshiba Corporation
|
|
3
3
|
* SPDX-License-Identifier: Apache-2.0
|
|
4
4
|
*/
|
|
5
|
-
import {
|
|
5
|
+
import { __extends } from "tslib";
|
|
6
|
+
import { Point, Rectangle, utils } from "pixi.js";
|
|
6
7
|
import { UtilGestureModifier } from "./util/util-gesture-modifier";
|
|
7
8
|
import { UtilGestureModifiers } from "./util/util-gesture-modifiers";
|
|
8
9
|
import { DViewGestureImpl } from "./d-view-gesture-impl";
|
|
@@ -11,45 +12,61 @@ import { DThemes } from "./theme/d-themes";
|
|
|
11
12
|
import { isString } from "./util/is-string";
|
|
12
13
|
import { toEnum } from "./util/to-enum";
|
|
13
14
|
import { UtilPointerEvent } from "./util/util-pointer-event";
|
|
14
|
-
var DViewImpl = /** @class */ (function () {
|
|
15
|
+
var DViewImpl = /** @class */ (function (_super) {
|
|
16
|
+
__extends(DViewImpl, _super);
|
|
15
17
|
function DViewImpl(parent, toTarget, options) {
|
|
18
|
+
var _this = this;
|
|
16
19
|
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s;
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
20
|
+
_this = _super.call(this) || this;
|
|
21
|
+
_this._parent = parent;
|
|
22
|
+
_this._toTarget = toTarget;
|
|
23
|
+
_this._constraint = (options && options.constraint) || DViewImpl.CONSTRAINT;
|
|
24
|
+
_this._workRect = new Rectangle();
|
|
21
25
|
// Theme
|
|
22
|
-
var theme =
|
|
26
|
+
var theme = _this.toTheme(options) || _this.getThemeDefault();
|
|
23
27
|
// Zoom
|
|
24
28
|
var zoom = options === null || options === void 0 ? void 0 : options.zoom;
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
+
_this._zoomPoint = new Point();
|
|
30
|
+
_this._zoomMin = (_a = zoom === null || zoom === void 0 ? void 0 : zoom.min) !== null && _a !== void 0 ? _a : theme.getZoomMin();
|
|
31
|
+
_this._zoomMax = (_b = zoom === null || zoom === void 0 ? void 0 : zoom.max) !== null && _b !== void 0 ? _b : theme.getZoomMax();
|
|
32
|
+
_this._zoomKeepRatio = (_c = zoom === null || zoom === void 0 ? void 0 : zoom.keepRatio) !== null && _c !== void 0 ? _c : theme.getZoomKeepRatio();
|
|
29
33
|
// Zoom: Wheel
|
|
30
34
|
var wheelZoom = zoom === null || zoom === void 0 ? void 0 : zoom.wheel;
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
+
_this._isWheelZoomEnabled = (_d = wheelZoom === null || wheelZoom === void 0 ? void 0 : wheelZoom.enable) !== null && _d !== void 0 ? _d : theme.isWheelZoomEnabled();
|
|
36
|
+
_this._wheelZoomSpeed = (_e = wheelZoom === null || wheelZoom === void 0 ? void 0 : wheelZoom.speed) !== null && _e !== void 0 ? _e : theme.getWheelZoomSpeed();
|
|
37
|
+
_this._wheelZoomModifier = toEnum((_f = wheelZoom === null || wheelZoom === void 0 ? void 0 : wheelZoom.modifier) !== null && _f !== void 0 ? _f : theme.getWheelZoomModifier(), UtilGestureModifier);
|
|
38
|
+
_this._wheelZoomChecker = (_g = wheelZoom === null || wheelZoom === void 0 ? void 0 : wheelZoom.checker) !== null && _g !== void 0 ? _g : UtilGestureModifiers.match;
|
|
35
39
|
// Zoom: Dbl click
|
|
36
40
|
var dblClickZoom = zoom === null || zoom === void 0 ? void 0 : zoom.dblclick;
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
41
|
+
_this._isDblClickZoomEnabled = (_h = dblClickZoom === null || dblClickZoom === void 0 ? void 0 : dblClickZoom.enable) !== null && _h !== void 0 ? _h : theme.isDblClickZoomEnabled();
|
|
42
|
+
_this._dblClickZoomSpeed = (_j = dblClickZoom === null || dblClickZoom === void 0 ? void 0 : dblClickZoom.amount) !== null && _j !== void 0 ? _j : theme.getDblClickZoomSpeed();
|
|
43
|
+
_this._dblClickZoomModifier = toEnum((_k = dblClickZoom === null || dblClickZoom === void 0 ? void 0 : dblClickZoom.modifier) !== null && _k !== void 0 ? _k : theme.getDblClickZoomModifier(), UtilGestureModifier);
|
|
44
|
+
_this._dblClickZoomChecker = (_l = dblClickZoom === null || dblClickZoom === void 0 ? void 0 : dblClickZoom.checker) !== null && _l !== void 0 ? _l : UtilGestureModifiers.match;
|
|
45
|
+
_this._dblclickZoomDuration = (_m = dblClickZoom === null || dblClickZoom === void 0 ? void 0 : dblClickZoom.duration) !== null && _m !== void 0 ? _m : theme.getDblClickZoomDuration();
|
|
42
46
|
// Translation: Wheel
|
|
43
47
|
var wheelTranslation = (_o = options === null || options === void 0 ? void 0 : options.translation) === null || _o === void 0 ? void 0 : _o.wheel;
|
|
44
|
-
|
|
48
|
+
_this._isWheelTranslationEnabled =
|
|
45
49
|
(_p = wheelTranslation === null || wheelTranslation === void 0 ? void 0 : wheelTranslation.enable) !== null && _p !== void 0 ? _p : theme.isWheelTranslationEnabled();
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
50
|
+
_this._wheelTranslationSpeed = (_q = wheelTranslation === null || wheelTranslation === void 0 ? void 0 : wheelTranslation.speed) !== null && _q !== void 0 ? _q : theme.getWheelTranslationSpeed();
|
|
51
|
+
_this._wheelTranslationModifier = toEnum((_r = wheelTranslation === null || wheelTranslation === void 0 ? void 0 : wheelTranslation.modifier) !== null && _r !== void 0 ? _r : theme.getWheelTranslationModifier(), UtilGestureModifier);
|
|
52
|
+
_this._wheelTranslationChecker = (_s = wheelTranslation === null || wheelTranslation === void 0 ? void 0 : wheelTranslation.checker) !== null && _s !== void 0 ? _s : UtilGestureModifiers.match;
|
|
49
53
|
// Gesture
|
|
50
|
-
|
|
54
|
+
_this._gesture = new DViewGestureImpl(parent, toTarget, _this, _this._constraint, theme, options === null || options === void 0 ? void 0 : options.gesture);
|
|
51
55
|
// Transform
|
|
52
|
-
|
|
56
|
+
_this._transform = new DViewTransformImpl(parent, toTarget, _this, _this._constraint, _this._dblclickZoomDuration);
|
|
57
|
+
// Events
|
|
58
|
+
if (options != null) {
|
|
59
|
+
var on = options.on;
|
|
60
|
+
if (on != null) {
|
|
61
|
+
for (var name_1 in on) {
|
|
62
|
+
var handler = on[name_1];
|
|
63
|
+
if (handler) {
|
|
64
|
+
_this.on(name_1, handler);
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
return _this;
|
|
53
70
|
}
|
|
54
71
|
Object.defineProperty(DViewImpl.prototype, "gesture", {
|
|
55
72
|
get: function () {
|
|
@@ -276,6 +293,6 @@ var DViewImpl = /** @class */ (function () {
|
|
|
276
293
|
target.position.set(x, y);
|
|
277
294
|
};
|
|
278
295
|
return DViewImpl;
|
|
279
|
-
}());
|
|
296
|
+
}(utils.EventEmitter));
|
|
280
297
|
export { DViewImpl };
|
|
281
298
|
//# sourceMappingURL=d-view-impl.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"d-view-impl.js","sourceRoot":"","sources":["../../../src/main/typescript/wcardinal/ui/d-view-impl.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAuB,KAAK,EAAE,SAAS,EAAE,MAAM,SAAS,CAAC;AAEhE,OAAO,EAAE,mBAAmB,EAAE,MAAM,8BAA8B,CAAC;AACnE,OAAO,EAAE,oBAAoB,EAAE,MAAM,+BAA+B,CAAC;AAGrE,OAAO,EAAE,gBAAgB,EAAE,MAAM,u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AK,EAAE;YAC7B,IAAM,KAAK,GAAG,OAAO,CAAC,KAAK,CAAC;YAC5B,IAAI,QAAQ,CAAC,KAAK,CAAC,EAAE;gBACpB,OAAO,OAAO,CAAC,WAAW,EAAE,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC;aACxC;iBAAM;gBACN,OAAO,KAAK,CAAC;aACb;SACD;QACD,OAAO,IAAI,CAAC;IACb,CAAC;IAES,mCAAe,GAAzB;QACC,OAAO,OAAO,CAAC,WAAW,EAAE,CAAC,GAAG,CAAC,IAAI,CAAC,OAAO,EAAE,CAAC,CAAC;IAClD,CAAC;IAES,2BAAO,GAAjB;QACC,OAAO,OAAO,CAAC;IAChB,CAAC;IArYgB,oBAAU,GAAoB,UAAC,MAAM,EAAE,CAAC,EAAE,CAAC,EAAE,MAAM,EAAE,MAAM;QAC3E,MAAM,CAAC,KAAK,CAAC,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;QACjC,MAAM,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;IAC3B,CAAC,CAAC;IAmYH,gBAAC;CAAA,AAvYD,IAuYC;SAvYY,SAAS","sourcesContent":["/*\n * Copyright (C) 2019 Toshiba Corporation\n * SPDX-License-Identifier: Apache-2.0\n */\n\nimport { interaction, IPoint, Point, Rectangle } from \"pixi.js\";\nimport { DBase } from \"./d-base\";\nimport { UtilGestureModifier } from \"./util/util-gesture-modifier\";\nimport { UtilGestureModifiers } from \"./util/util-gesture-modifiers\";\nimport { DThemeView, DView, DViewChecker, DViewOptions } from \"./d-view\";\nimport { DViewGesture } from \"./d-view-gesture\";\nimport { DViewGestureImpl } from \"./d-view-gesture-impl\";\nimport { DViewTargetPoint, DViewToTarget } from \"./d-view-to-target\";\nimport { DViewTransformImpl } from \"./d-view-transform-impl\";\nimport { DThemes } from \"./theme/d-themes\";\nimport { isString } from \"./util/is-string\";\nimport { toEnum } from \"./util/to-enum\";\nimport { UtilPointerEvent } from \"./util/util-pointer-event\";\nimport { UtilWheelEventDeltas } from \"./util/util-wheel-event\";\nimport { DViewConstraint } from \"./d-view-constraint\";\n\nexport class DViewImpl implements DView {\n\tprotected static CONSTRAINT: DViewConstraint = (target, x, y, scaleX, scaleY): void => {\n\t\ttarget.scale.set(scaleX, scaleY);\n\t\ttarget.position.set(x, y);\n\t};\n\n\tprotected _parent: DBase;\n\tprotected _toTarget: DViewToTarget;\n\tprotected _constraint: DViewConstraint;\n\n\tprotected _zoomPoint: Point;\n\tprotected _zoomMin: number;\n\tprotected _zoomMax: number;\n\tprotected _zoomKeepRatio: boolean;\n\n\tprotected _isWheelZoomEnabled: boolean;\n\tprotected _wheelZoomSpeed: number;\n\tprotected _wheelZoomModifier: UtilGestureModifier;\n\tprotected _wheelZoomChecker: DViewChecker;\n\n\tprotected _isDblClickZoomEnabled: boolean;\n\tprotected _dblClickZoomSpeed: number;\n\tprotected _dblClickZoomModifier: UtilGestureModifier;\n\tprotected _dblClickZoomChecker: DViewChecker;\n\tprotected _dblclickZoomDuration: number;\n\n\tprotected _isWheelTranslationEnabled: boolean;\n\tprotected _wheelTranslationSpeed: number;\n\tprotected _wheelTranslationModifier: UtilGestureModifier;\n\tprotected _wheelTranslationChecker: DViewChecker;\n\n\tprotected _transform: DViewTransformImpl;\n\tprotected _gesture: DViewGestureImpl;\n\n\tprotected _workRect: Rectangle;\n\n\tconstructor(parent: DBase, toTarget: DViewToTarget, options: DViewOptions | undefined) {\n\t\tthis._parent = parent;\n\t\tthis._toTarget = toTarget;\n\t\tthis._constraint = (options && options.constraint) || DViewImpl.CONSTRAINT;\n\n\t\tthis._workRect = new Rectangle();\n\n\t\t// Theme\n\t\tconst theme = this.toTheme(options) || this.getThemeDefault();\n\n\t\t// Zoom\n\t\tconst zoom = options?.zoom;\n\t\tthis._zoomPoint = new Point();\n\t\tthis._zoomMin = zoom?.min ?? theme.getZoomMin();\n\t\tthis._zoomMax = zoom?.max ?? theme.getZoomMax();\n\t\tthis._zoomKeepRatio = zoom?.keepRatio ?? theme.getZoomKeepRatio();\n\n\t\t// Zoom: Wheel\n\t\tconst wheelZoom = zoom?.wheel;\n\t\tthis._isWheelZoomEnabled = wheelZoom?.enable ?? theme.isWheelZoomEnabled();\n\t\tthis._wheelZoomSpeed = wheelZoom?.speed ?? theme.getWheelZoomSpeed();\n\t\tthis._wheelZoomModifier = toEnum(\n\t\t\twheelZoom?.modifier ?? theme.getWheelZoomModifier(),\n\t\t\tUtilGestureModifier\n\t\t);\n\t\tthis._wheelZoomChecker = wheelZoom?.checker ?? UtilGestureModifiers.match;\n\n\t\t// Zoom: Dbl click\n\t\tconst dblClickZoom = zoom?.dblclick;\n\t\tthis._isDblClickZoomEnabled = dblClickZoom?.enable ?? theme.isDblClickZoomEnabled();\n\t\tthis._dblClickZoomSpeed = dblClickZoom?.amount ?? theme.getDblClickZoomSpeed();\n\t\tthis._dblClickZoomModifier = toEnum(\n\t\t\tdblClickZoom?.modifier ?? theme.getDblClickZoomModifier(),\n\t\t\tUtilGestureModifier\n\t\t);\n\t\tthis._dblClickZoomChecker = dblClickZoom?.checker ?? UtilGestureModifiers.match;\n\t\tthis._dblclickZoomDuration = dblClickZoom?.duration ?? theme.getDblClickZoomDuration();\n\n\t\t// Translation: Wheel\n\t\tconst wheelTranslation = options?.translation?.wheel;\n\t\tthis._isWheelTranslationEnabled =\n\t\t\twheelTranslation?.enable ?? theme.isWheelTranslationEnabled();\n\t\tthis._wheelTranslationSpeed = wheelTranslation?.speed ?? theme.getWheelTranslationSpeed();\n\t\tthis._wheelTranslationModifier = toEnum(\n\t\t\twheelTranslation?.modifier ?? theme.getWheelTranslationModifier(),\n\t\t\tUtilGestureModifier\n\t\t);\n\t\tthis._wheelTranslationChecker = wheelTranslation?.checker ?? UtilGestureModifiers.match;\n\n\t\t// Gesture\n\t\tthis._gesture = new DViewGestureImpl(\n\t\t\tparent,\n\t\t\ttoTarget,\n\t\t\tthis,\n\t\t\tthis._constraint,\n\t\t\ttheme,\n\t\t\toptions?.gesture\n\t\t);\n\n\t\t// Transform\n\t\tthis._transform = new DViewTransformImpl(\n\t\t\tparent,\n\t\t\ttoTarget,\n\t\t\tthis,\n\t\t\tthis._constraint,\n\t\t\tthis._dblclickZoomDuration\n\t\t);\n\t}\n\n\tget gesture(): DViewGesture {\n\t\treturn this._gesture;\n\t}\n\n\tstop(): void {\n\t\tthis._gesture.stop();\n\t\tthis._transform.stop();\n\t}\n\n\treset(duration?: number, stop?: boolean): void {\n\t\tconst parent = this._parent;\n\t\tconst target = this._toTarget(parent);\n\t\tif (target) {\n\t\t\tconst targetRect = target.getLocalBounds(this._workRect);\n\t\t\tconst newTargetX = (parent.width - targetRect.width) * 0.5 - targetRect.x;\n\t\t\tconst newTargetY = (parent.height - targetRect.height) * 0.5 - targetRect.y;\n\t\t\tthis._transform.start(target, newTargetX, newTargetY, 1, 1, duration, stop);\n\t\t}\n\t}\n\n\tfit(duration?: number, stop?: boolean): void {\n\t\tconst parent = this._parent;\n\t\tconst target = this._toTarget(parent) as any;\n\t\tif (target) {\n\t\t\tconst padding = parent.padding;\n\t\t\tconst width = parent.width;\n\t\t\tconst height = parent.height;\n\t\t\tconst targetRect = target.getLocalBounds(this._workRect);\n\t\t\tconst targetX = targetRect.x;\n\t\t\tconst targetY = targetRect.y;\n\t\t\tconst targetWidth = targetRect.width;\n\t\t\tconst targetHeight = targetRect.height;\n\t\t\tlet newTargetScaleX = (width - padding.getLeft() - padding.getRight()) / targetWidth;\n\t\t\tlet newTargetScaleY = (height - padding.getTop() - padding.getBottom()) / targetHeight;\n\t\t\tif (this._zoomKeepRatio) {\n\t\t\t\tconst newTargetScale = this.toNormalizedScale(\n\t\t\t\t\tMath.min(newTargetScaleX, newTargetScaleY)\n\t\t\t\t);\n\t\t\t\tnewTargetScaleX = newTargetScale;\n\t\t\t\tnewTargetScaleY = newTargetScale;\n\t\t\t} else {\n\t\t\t\tnewTargetScaleX = this.toNormalizedScale(newTargetScaleX);\n\t\t\t\tnewTargetScaleY = this.toNormalizedScale(newTargetScaleY);\n\t\t\t}\n\t\t\tconst newTargetWidth = targetWidth * newTargetScaleX;\n\t\t\tconst newTargetHeight = targetHeight * newTargetScaleY;\n\t\t\tconst newTargetX = (width - newTargetWidth) * 0.5 - targetX * newTargetScaleX;\n\t\t\tconst newTargetY = (height - newTargetHeight) * 0.5 - targetY * newTargetScaleY;\n\t\t\tthis._transform.start(\n\t\t\t\ttarget,\n\t\t\t\tnewTargetX,\n\t\t\t\tnewTargetY,\n\t\t\t\tnewTargetScaleX,\n\t\t\t\tnewTargetScaleY,\n\t\t\t\tduration,\n\t\t\t\tstop\n\t\t\t);\n\t\t}\n\t}\n\n\tzoomIn(duration?: number, stop?: boolean): void {\n\t\tconst target = this._toTarget(this._parent);\n\t\tif (target) {\n\t\t\tconst factor = this._dblClickZoomSpeed;\n\t\t\tconst targetScale = target.scale;\n\t\t\tthis.zoom(targetScale.x * factor, targetScale.y * factor, duration, stop);\n\t\t}\n\t}\n\n\tzoomOut(duration?: number, stop?: boolean): void {\n\t\tconst target = this._toTarget(this._parent);\n\t\tif (target) {\n\t\t\tconst factor = 1 / this._dblClickZoomSpeed;\n\t\t\tconst targetScale = target.scale;\n\t\t\tthis.zoom(targetScale.x * factor, targetScale.y * factor, duration, stop);\n\t\t}\n\t}\n\n\tzoomAt(\n\t\tx: number,\n\t\ty: number,\n\t\tscaleX: number,\n\t\tscaleY: number,\n\t\tduration?: number,\n\t\tstop?: boolean\n\t): void {\n\t\tconst target = this._toTarget(this._parent);\n\t\tif (target) {\n\t\t\t// Scale\n\t\t\tconst oldScaleX = target.scale.x;\n\t\t\tconst oldScaleY = target.scale.y;\n\t\t\tconst newScaleX = this.toNormalizedScale(scaleX);\n\t\t\tconst newScaleY = this.toNormalizedScale(scaleY);\n\t\t\tconst scaleRatioX = newScaleX / oldScaleX;\n\t\t\tconst scaleRatioY = newScaleY / oldScaleY;\n\n\t\t\t// Position\n\t\t\tconst newX = (target.position.x - x) * scaleRatioX + x;\n\t\t\tconst newY = (target.position.y - y) * scaleRatioY + y;\n\n\t\t\t// Start\n\t\t\tthis._transform.start(target, newX, newY, newScaleX, newScaleY, duration, stop);\n\t\t}\n\t}\n\n\tzoomAtGlobal(\n\t\tx: number,\n\t\ty: number,\n\t\tscaleX: number,\n\t\tscaleY: number,\n\t\tduration?: number,\n\t\tstop?: boolean\n\t): void {\n\t\tconst local = this._zoomPoint;\n\t\tlocal.set(x, y);\n\t\tthis.toLocal(local, local);\n\t\tthis.zoomAt(local.x, local.y, scaleX, scaleY, duration, stop);\n\t}\n\n\tzoom(scaleX: number, scaleY: number, duration?: number, stop?: boolean): void {\n\t\tconst parent = this._parent;\n\t\tthis.zoomAt(parent.width * 0.5, parent.height * 0.5, scaleX, scaleY, duration, stop);\n\t}\n\n\tget scale(): DViewTargetPoint {\n\t\tconst target = this._toTarget(this._parent);\n\t\tif (target) {\n\t\t\treturn target.scale;\n\t\t}\n\t\treturn new Point(1, 1);\n\t}\n\n\tset scale(scale: DViewTargetPoint) {\n\t\tconst target = this._toTarget(this._parent);\n\t\tif (target) {\n\t\t\tconst newScaleX = this.toNormalizedScale(scale.x);\n\t\t\tconst newScaleY = this.toNormalizedScale(scale.y);\n\t\t\tconst targetPosition = target.position;\n\t\t\tthis._constraint(target, targetPosition.x, targetPosition.y, newScaleX, newScaleY);\n\t\t}\n\t}\n\n\tmoveTo(x: number, y: number, duration?: number, stop?: boolean): void {\n\t\tconst target = this._toTarget(this._parent);\n\t\tif (target) {\n\t\t\tconst targetScale = target.scale;\n\t\t\tthis._transform.start(target, x, y, targetScale.x, targetScale.y, duration, stop);\n\t\t}\n\t}\n\n\tget position(): DViewTargetPoint {\n\t\tconst target = this._toTarget(this._parent);\n\t\tif (target) {\n\t\t\treturn target.position;\n\t\t}\n\t\treturn new Point(0, 0);\n\t}\n\n\tset position(position: DViewTargetPoint) {\n\t\tconst target = this._toTarget(this._parent);\n\t\tif (target) {\n\t\t\tconst targetScale = target.scale;\n\t\t\tthis._constraint(target, position.x, position.y, targetScale.x, targetScale.y);\n\t\t}\n\t}\n\n\ttransform(\n\t\tx: number,\n\t\ty: number,\n\t\tscaleX: number,\n\t\tscaleY: number,\n\t\tduration?: number,\n\t\tstop?: boolean\n\t): void {\n\t\tconst target = this._toTarget(this._parent);\n\t\tif (target) {\n\t\t\tthis._transform.start(target, x, y, scaleX, scaleY, duration, stop);\n\t\t}\n\t}\n\n\ttoLocal(global: IPoint, local: IPoint, skipUpdate?: boolean): IPoint {\n\t\treturn this._parent.toLocal(global, undefined, local, skipUpdate);\n\t}\n\n\ttoGlobal(local: IPoint, global: IPoint, skipUpdate?: boolean): IPoint {\n\t\treturn this._parent.toGlobal(local, global, skipUpdate);\n\t}\n\n\ttoNormalizedScale(scale: number): number {\n\t\treturn Math.min(this._zoomMax, Math.max(this._zoomMin, scale));\n\t}\n\n\tonWheel(e: WheelEvent, deltas: UtilWheelEventDeltas, global: Point): boolean {\n\t\tif (\n\t\t\tthis._isWheelZoomEnabled &&\n\t\t\tthis._wheelZoomChecker(e, this._wheelZoomModifier, this._parent)\n\t\t) {\n\t\t\tif (deltas.deltaY !== 0) {\n\t\t\t\tconst target = this._toTarget(this._parent);\n\t\t\t\tif (target) {\n\t\t\t\t\tconst speed = deltas.lowest * this._wheelZoomSpeed;\n\t\t\t\t\tconst factor = 1 + deltas.deltaY * speed;\n\t\t\t\t\tconst targetScale = target.scale;\n\t\t\t\t\tthis.zoomAtGlobal(\n\t\t\t\t\t\tglobal.x,\n\t\t\t\t\t\tglobal.y,\n\t\t\t\t\t\ttargetScale.x * factor,\n\t\t\t\t\t\ttargetScale.y * factor,\n\t\t\t\t\t\t0\n\t\t\t\t\t);\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tif (\n\t\t\tthis._isWheelTranslationEnabled &&\n\t\t\tthis._wheelTranslationChecker(e, this._wheelTranslationModifier, this._parent)\n\t\t) {\n\t\t\tconst target = this._toTarget(this._parent);\n\t\t\tif (target) {\n\t\t\t\tthis.stop();\n\t\t\t\tconst speed = deltas.lowest * this._wheelTranslationSpeed;\n\t\t\t\tconst targetPosition = target.position;\n\t\t\t\tconst newX = targetPosition.x - deltas.deltaX * speed;\n\t\t\t\tconst newY = targetPosition.y + deltas.deltaY * speed;\n\t\t\t\tconst targetScale = target.scale;\n\t\t\t\tthis._constraint(target, newX, newY, targetScale.x, targetScale.y);\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\n\t\treturn false;\n\t}\n\n\tonDown(e: interaction.InteractionEvent): void {\n\t\tthis._gesture.onDown(e);\n\t}\n\n\tonDblClick(\n\t\te: MouseEvent | TouchEvent,\n\t\tinteractionManager: interaction.InteractionManager\n\t): boolean {\n\t\tif (\n\t\t\tthis._isDblClickZoomEnabled &&\n\t\t\tthis._dblClickZoomChecker(e, this._dblClickZoomModifier, this._parent)\n\t\t) {\n\t\t\tconst target = this._toTarget(this._parent);\n\t\t\tif (target) {\n\t\t\t\tconst global = this._zoomPoint;\n\t\t\t\tUtilPointerEvent.toGlobal(e, interactionManager, global);\n\t\t\t\tconst factor = this._dblClickZoomSpeed;\n\t\t\t\tconst targetScale = target.scale;\n\t\t\t\tthis.zoomAtGlobal(\n\t\t\t\t\tglobal.x,\n\t\t\t\t\tglobal.y,\n\t\t\t\t\ttargetScale.x * factor,\n\t\t\t\t\ttargetScale.y * factor,\n\t\t\t\t\tthis._dblclickZoomDuration\n\t\t\t\t);\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\n\t\treturn false;\n\t}\n\n\tprotected toTheme(options?: DViewOptions): DThemeView | null {\n\t\tif (options && options.theme) {\n\t\t\tconst theme = options.theme;\n\t\t\tif (isString(theme)) {\n\t\t\t\treturn DThemes.getInstance().get(theme);\n\t\t\t} else {\n\t\t\t\treturn theme;\n\t\t\t}\n\t\t}\n\t\treturn null;\n\t}\n\n\tprotected getThemeDefault(): DThemeView {\n\t\treturn DThemes.getInstance().get(this.getType());\n\t}\n\n\tprotected get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E,CAAC,EAAE,CAAC,EAAE,MAAM,EAAE,MAAM;QAC3E,MAAM,CAAC,KAAK,CAAC,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;QACjC,MAAM,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;IAC3B,CAAC,CAAC;IAiZH,gBAAC;CAAA,AArZD,CAA+B,KAAK,CAAC,YAAY,GAqZhD;SArZY,SAAS","sourcesContent":["/*\n * Copyright (C) 2019 Toshiba Corporation\n * SPDX-License-Identifier: Apache-2.0\n */\n\nimport { interaction, IPoint, Point, Rectangle, utils } from \"pixi.js\";\nimport { DBase } from \"./d-base\";\nimport { UtilGestureModifier } from \"./util/util-gesture-modifier\";\nimport { UtilGestureModifiers } from \"./util/util-gesture-modifiers\";\nimport { DThemeView, DView, DViewChecker, DViewOptions } from \"./d-view\";\nimport { DViewGesture } from \"./d-view-gesture\";\nimport { DViewGestureImpl } from \"./d-view-gesture-impl\";\nimport { DViewTargetPoint, DViewToTarget } from \"./d-view-to-target\";\nimport { DViewTransformImpl } from \"./d-view-transform-impl\";\nimport { DThemes } from \"./theme/d-themes\";\nimport { isString } from \"./util/is-string\";\nimport { toEnum } from \"./util/to-enum\";\nimport { UtilPointerEvent } from \"./util/util-pointer-event\";\nimport { UtilWheelEventDeltas } from \"./util/util-wheel-event\";\nimport { DViewConstraint } from \"./d-view-constraint\";\n\nexport class DViewImpl extends utils.EventEmitter implements DView {\n\tprotected static CONSTRAINT: DViewConstraint = (target, x, y, scaleX, scaleY): void => {\n\t\ttarget.scale.set(scaleX, scaleY);\n\t\ttarget.position.set(x, y);\n\t};\n\n\tprotected _parent: DBase;\n\tprotected _toTarget: DViewToTarget;\n\tprotected _constraint: DViewConstraint;\n\n\tprotected _zoomPoint: Point;\n\tprotected _zoomMin: number;\n\tprotected _zoomMax: number;\n\tprotected _zoomKeepRatio: boolean;\n\n\tprotected _isWheelZoomEnabled: boolean;\n\tprotected _wheelZoomSpeed: number;\n\tprotected _wheelZoomModifier: UtilGestureModifier;\n\tprotected _wheelZoomChecker: DViewChecker;\n\n\tprotected _isDblClickZoomEnabled: boolean;\n\tprotected _dblClickZoomSpeed: number;\n\tprotected _dblClickZoomModifier: UtilGestureModifier;\n\tprotected _dblClickZoomChecker: DViewChecker;\n\tprotected _dblclickZoomDuration: number;\n\n\tprotected _isWheelTranslationEnabled: boolean;\n\tprotected _wheelTranslationSpeed: number;\n\tprotected _wheelTranslationModifier: UtilGestureModifier;\n\tprotected _wheelTranslationChecker: DViewChecker;\n\n\tprotected _transform: DViewTransformImpl;\n\tprotected _gesture: DViewGestureImpl;\n\n\tprotected _workRect: Rectangle;\n\n\tconstructor(parent: DBase, toTarget: DViewToTarget, options: DViewOptions | undefined) {\n\t\tsuper();\n\t\tthis._parent = parent;\n\t\tthis._toTarget = toTarget;\n\t\tthis._constraint = (options && options.constraint) || DViewImpl.CONSTRAINT;\n\n\t\tthis._workRect = new Rectangle();\n\n\t\t// Theme\n\t\tconst theme = this.toTheme(options) || this.getThemeDefault();\n\n\t\t// Zoom\n\t\tconst zoom = options?.zoom;\n\t\tthis._zoomPoint = new Point();\n\t\tthis._zoomMin = zoom?.min ?? theme.getZoomMin();\n\t\tthis._zoomMax = zoom?.max ?? theme.getZoomMax();\n\t\tthis._zoomKeepRatio = zoom?.keepRatio ?? theme.getZoomKeepRatio();\n\n\t\t// Zoom: Wheel\n\t\tconst wheelZoom = zoom?.wheel;\n\t\tthis._isWheelZoomEnabled = wheelZoom?.enable ?? theme.isWheelZoomEnabled();\n\t\tthis._wheelZoomSpeed = wheelZoom?.speed ?? theme.getWheelZoomSpeed();\n\t\tthis._wheelZoomModifier = toEnum(\n\t\t\twheelZoom?.modifier ?? theme.getWheelZoomModifier(),\n\t\t\tUtilGestureModifier\n\t\t);\n\t\tthis._wheelZoomChecker = wheelZoom?.checker ?? UtilGestureModifiers.match;\n\n\t\t// Zoom: Dbl click\n\t\tconst dblClickZoom = zoom?.dblclick;\n\t\tthis._isDblClickZoomEnabled = dblClickZoom?.enable ?? theme.isDblClickZoomEnabled();\n\t\tthis._dblClickZoomSpeed = dblClickZoom?.amount ?? theme.getDblClickZoomSpeed();\n\t\tthis._dblClickZoomModifier = toEnum(\n\t\t\tdblClickZoom?.modifier ?? theme.getDblClickZoomModifier(),\n\t\t\tUtilGestureModifier\n\t\t);\n\t\tthis._dblClickZoomChecker = dblClickZoom?.checker ?? UtilGestureModifiers.match;\n\t\tthis._dblclickZoomDuration = dblClickZoom?.duration ?? theme.getDblClickZoomDuration();\n\n\t\t// Translation: Wheel\n\t\tconst wheelTranslation = options?.translation?.wheel;\n\t\tthis._isWheelTranslationEnabled =\n\t\t\twheelTranslation?.enable ?? theme.isWheelTranslationEnabled();\n\t\tthis._wheelTranslationSpeed = wheelTranslation?.speed ?? theme.getWheelTranslationSpeed();\n\t\tthis._wheelTranslationModifier = toEnum(\n\t\t\twheelTranslation?.modifier ?? theme.getWheelTranslationModifier(),\n\t\t\tUtilGestureModifier\n\t\t);\n\t\tthis._wheelTranslationChecker = wheelTranslation?.checker ?? UtilGestureModifiers.match;\n\n\t\t// Gesture\n\t\tthis._gesture = new DViewGestureImpl(\n\t\t\tparent,\n\t\t\ttoTarget,\n\t\t\tthis,\n\t\t\tthis._constraint,\n\t\t\ttheme,\n\t\t\toptions?.gesture\n\t\t);\n\n\t\t// Transform\n\t\tthis._transform = new DViewTransformImpl(\n\t\t\tparent,\n\t\t\ttoTarget,\n\t\t\tthis,\n\t\t\tthis._constraint,\n\t\t\tthis._dblclickZoomDuration\n\t\t);\n\n\t\t// Events\n\t\tif (options != null) {\n\t\t\tconst on = options.on;\n\t\t\tif (on != null) {\n\t\t\t\tfor (const name in on) {\n\t\t\t\t\tconst handler = on[name];\n\t\t\t\t\tif (handler) {\n\t\t\t\t\t\tthis.on(name, handler);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\tget gesture(): DViewGesture {\n\t\treturn this._gesture;\n\t}\n\n\tstop(): void {\n\t\tthis._gesture.stop();\n\t\tthis._transform.stop();\n\t}\n\n\treset(duration?: number, stop?: boolean): void {\n\t\tconst parent = this._parent;\n\t\tconst target = this._toTarget(parent);\n\t\tif (target) {\n\t\t\tconst targetRect = target.getLocalBounds(this._workRect);\n\t\t\tconst newTargetX = (parent.width - targetRect.width) * 0.5 - targetRect.x;\n\t\t\tconst newTargetY = (parent.height - targetRect.height) * 0.5 - targetRect.y;\n\t\t\tthis._transform.start(target, newTargetX, newTargetY, 1, 1, duration, stop);\n\t\t}\n\t}\n\n\tfit(duration?: number, stop?: boolean): void {\n\t\tconst parent = this._parent;\n\t\tconst target = this._toTarget(parent) as any;\n\t\tif (target) {\n\t\t\tconst padding = parent.padding;\n\t\t\tconst width = parent.width;\n\t\t\tconst height = parent.height;\n\t\t\tconst targetRect = target.getLocalBounds(this._workRect);\n\t\t\tconst targetX = targetRect.x;\n\t\t\tconst targetY = targetRect.y;\n\t\t\tconst targetWidth = targetRect.width;\n\t\t\tconst targetHeight = targetRect.height;\n\t\t\tlet newTargetScaleX = (width - padding.getLeft() - padding.getRight()) / targetWidth;\n\t\t\tlet newTargetScaleY = (height - padding.getTop() - padding.getBottom()) / targetHeight;\n\t\t\tif (this._zoomKeepRatio) {\n\t\t\t\tconst newTargetScale = this.toNormalizedScale(\n\t\t\t\t\tMath.min(newTargetScaleX, newTargetScaleY)\n\t\t\t\t);\n\t\t\t\tnewTargetScaleX = newTargetScale;\n\t\t\t\tnewTargetScaleY = newTargetScale;\n\t\t\t} else {\n\t\t\t\tnewTargetScaleX = this.toNormalizedScale(newTargetScaleX);\n\t\t\t\tnewTargetScaleY = this.toNormalizedScale(newTargetScaleY);\n\t\t\t}\n\t\t\tconst newTargetWidth = targetWidth * newTargetScaleX;\n\t\t\tconst newTargetHeight = targetHeight * newTargetScaleY;\n\t\t\tconst newTargetX = (width - newTargetWidth) * 0.5 - targetX * newTargetScaleX;\n\t\t\tconst newTargetY = (height - newTargetHeight) * 0.5 - targetY * newTargetScaleY;\n\t\t\tthis._transform.start(\n\t\t\t\ttarget,\n\t\t\t\tnewTargetX,\n\t\t\t\tnewTargetY,\n\t\t\t\tnewTargetScaleX,\n\t\t\t\tnewTargetScaleY,\n\t\t\t\tduration,\n\t\t\t\tstop\n\t\t\t);\n\t\t}\n\t}\n\n\tzoomIn(duration?: number, stop?: boolean): void {\n\t\tconst target = this._toTarget(this._parent);\n\t\tif (target) {\n\t\t\tconst factor = this._dblClickZoomSpeed;\n\t\t\tconst targetScale = target.scale;\n\t\t\tthis.zoom(targetScale.x * factor, targetScale.y * factor, duration, stop);\n\t\t}\n\t}\n\n\tzoomOut(duration?: number, stop?: boolean): void {\n\t\tconst target = this._toTarget(this._parent);\n\t\tif (target) {\n\t\t\tconst factor = 1 / this._dblClickZoomSpeed;\n\t\t\tconst targetScale = target.scale;\n\t\t\tthis.zoom(targetScale.x * factor, targetScale.y * factor, duration, stop);\n\t\t}\n\t}\n\n\tzoomAt(\n\t\tx: number,\n\t\ty: number,\n\t\tscaleX: number,\n\t\tscaleY: number,\n\t\tduration?: number,\n\t\tstop?: boolean\n\t): void {\n\t\tconst target = this._toTarget(this._parent);\n\t\tif (target) {\n\t\t\t// Scale\n\t\t\tconst oldScaleX = target.scale.x;\n\t\t\tconst oldScaleY = target.scale.y;\n\t\t\tconst newScaleX = this.toNormalizedScale(scaleX);\n\t\t\tconst newScaleY = this.toNormalizedScale(scaleY);\n\t\t\tconst scaleRatioX = newScaleX / oldScaleX;\n\t\t\tconst scaleRatioY = newScaleY / oldScaleY;\n\n\t\t\t// Position\n\t\t\tconst newX = (target.position.x - x) * scaleRatioX + x;\n\t\t\tconst newY = (target.position.y - y) * scaleRatioY + y;\n\n\t\t\t// Start\n\t\t\tthis._transform.start(target, newX, newY, newScaleX, newScaleY, duration, stop);\n\t\t}\n\t}\n\n\tzoomAtGlobal(\n\t\tx: number,\n\t\ty: number,\n\t\tscaleX: number,\n\t\tscaleY: number,\n\t\tduration?: number,\n\t\tstop?: boolean\n\t): void {\n\t\tconst local = this._zoomPoint;\n\t\tlocal.set(x, y);\n\t\tthis.toLocal(local, local);\n\t\tthis.zoomAt(local.x, local.y, scaleX, scaleY, duration, stop);\n\t}\n\n\tzoom(scaleX: number, scaleY: number, duration?: number, stop?: boolean): void {\n\t\tconst parent = this._parent;\n\t\tthis.zoomAt(parent.width * 0.5, parent.height * 0.5, scaleX, scaleY, duration, stop);\n\t}\n\n\tget scale(): DViewTargetPoint {\n\t\tconst target = this._toTarget(this._parent);\n\t\tif (target) {\n\t\t\treturn target.scale;\n\t\t}\n\t\treturn new Point(1, 1);\n\t}\n\n\tset scale(scale: DViewTargetPoint) {\n\t\tconst target = this._toTarget(this._parent);\n\t\tif (target) {\n\t\t\tconst newScaleX = this.toNormalizedScale(scale.x);\n\t\t\tconst newScaleY = this.toNormalizedScale(scale.y);\n\t\t\tconst targetPosition = target.position;\n\t\t\tthis._constraint(target, targetPosition.x, targetPosition.y, newScaleX, newScaleY);\n\t\t}\n\t}\n\n\tmoveTo(x: number, y: number, duration?: number, stop?: boolean): void {\n\t\tconst target = this._toTarget(this._parent);\n\t\tif (target) {\n\t\t\tconst targetScale = target.scale;\n\t\t\tthis._transform.start(target, x, y, targetScale.x, targetScale.y, duration, stop);\n\t\t}\n\t}\n\n\tget position(): DViewTargetPoint {\n\t\tconst target = this._toTarget(this._parent);\n\t\tif (target) {\n\t\t\treturn target.position;\n\t\t}\n\t\treturn new Point(0, 0);\n\t}\n\n\tset position(position: DViewTargetPoint) {\n\t\tconst target = this._toTarget(this._parent);\n\t\tif (target) {\n\t\t\tconst targetScale = target.scale;\n\t\t\tthis._constraint(target, position.x, position.y, targetScale.x, targetScale.y);\n\t\t}\n\t}\n\n\ttransform(\n\t\tx: number,\n\t\ty: number,\n\t\tscaleX: number,\n\t\tscaleY: number,\n\t\tduration?: number,\n\t\tstop?: boolean\n\t): void {\n\t\tconst target = this._toTarget(this._parent);\n\t\tif (target) {\n\t\t\tthis._transform.start(target, x, y, scaleX, scaleY, duration, stop);\n\t\t}\n\t}\n\n\ttoLocal(global: IPoint, local: IPoint, skipUpdate?: boolean): IPoint {\n\t\treturn this._parent.toLocal(global, undefined, local, skipUpdate);\n\t}\n\n\ttoGlobal(local: IPoint, global: IPoint, skipUpdate?: boolean): IPoint {\n\t\treturn this._parent.toGlobal(local, global, skipUpdate);\n\t}\n\n\ttoNormalizedScale(scale: number): number {\n\t\treturn Math.min(this._zoomMax, Math.max(this._zoomMin, scale));\n\t}\n\n\tonWheel(e: WheelEvent, deltas: UtilWheelEventDeltas, global: Point): boolean {\n\t\tif (\n\t\t\tthis._isWheelZoomEnabled &&\n\t\t\tthis._wheelZoomChecker(e, this._wheelZoomModifier, this._parent)\n\t\t) {\n\t\t\tif (deltas.deltaY !== 0) {\n\t\t\t\tconst target = this._toTarget(this._parent);\n\t\t\t\tif (target) {\n\t\t\t\t\tconst speed = deltas.lowest * this._wheelZoomSpeed;\n\t\t\t\t\tconst factor = 1 + deltas.deltaY * speed;\n\t\t\t\t\tconst targetScale = target.scale;\n\t\t\t\t\tthis.zoomAtGlobal(\n\t\t\t\t\t\tglobal.x,\n\t\t\t\t\t\tglobal.y,\n\t\t\t\t\t\ttargetScale.x * factor,\n\t\t\t\t\t\ttargetScale.y * factor,\n\t\t\t\t\t\t0\n\t\t\t\t\t);\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tif (\n\t\t\tthis._isWheelTranslationEnabled &&\n\t\t\tthis._wheelTranslationChecker(e, this._wheelTranslationModifier, this._parent)\n\t\t) {\n\t\t\tconst target = this._toTarget(this._parent);\n\t\t\tif (target) {\n\t\t\t\tthis.stop();\n\t\t\t\tconst speed = deltas.lowest * this._wheelTranslationSpeed;\n\t\t\t\tconst targetPosition = target.position;\n\t\t\t\tconst newX = targetPosition.x - deltas.deltaX * speed;\n\t\t\t\tconst newY = targetPosition.y + deltas.deltaY * speed;\n\t\t\t\tconst targetScale = target.scale;\n\t\t\t\tthis._constraint(target, newX, newY, targetScale.x, targetScale.y);\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\n\t\treturn false;\n\t}\n\n\tonDown(e: interaction.InteractionEvent): void {\n\t\tthis._gesture.onDown(e);\n\t}\n\n\tonDblClick(\n\t\te: MouseEvent | TouchEvent,\n\t\tinteractionManager: interaction.InteractionManager\n\t): boolean {\n\t\tif (\n\t\t\tthis._isDblClickZoomEnabled &&\n\t\t\tthis._dblClickZoomChecker(e, this._dblClickZoomModifier, this._parent)\n\t\t) {\n\t\t\tconst target = this._toTarget(this._parent);\n\t\t\tif (target) {\n\t\t\t\tconst global = this._zoomPoint;\n\t\t\t\tUtilPointerEvent.toGlobal(e, interactionManager, global);\n\t\t\t\tconst factor = this._dblClickZoomSpeed;\n\t\t\t\tconst targetScale = target.scale;\n\t\t\t\tthis.zoomAtGlobal(\n\t\t\t\t\tglobal.x,\n\t\t\t\t\tglobal.y,\n\t\t\t\t\ttargetScale.x * factor,\n\t\t\t\t\ttargetScale.y * factor,\n\t\t\t\t\tthis._dblclickZoomDuration\n\t\t\t\t);\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\n\t\treturn false;\n\t}\n\n\tprotected toTheme(options?: DViewOptions): DThemeView | null {\n\t\tif (options && options.theme) {\n\t\t\tconst theme = options.theme;\n\t\t\tif (isString(theme)) {\n\t\t\t\treturn DThemes.getInstance().get(theme);\n\t\t\t} else {\n\t\t\t\treturn theme;\n\t\t\t}\n\t\t}\n\t\treturn null;\n\t}\n\n\tprotected getThemeDefault(): DThemeView {\n\t\treturn DThemes.getInstance().get(this.getType());\n\t}\n\n\tprotected getType(): string {\n\t\treturn \"DView\";\n\t}\n}\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"d-view-parent.js","sourceRoot":"","sources":["../../../src/main/typescript/wcardinal/ui/d-view-parent.ts"],"names":[],"mappings":"AAAA;;;GAGG","sourcesContent":["/*\n * Copyright (C) 2019 Toshiba Corporation\n * SPDX-License-Identifier: Apache-2.0\n */\n\nimport { utils } from \"pixi.js\";\n\nexport interface DViewParent extends utils.EventEmitter {\n\tstop(): void;\n\ttoNormalizedScale(scale: number): number;\n}\n"]}
|