@wcardinal/wcardinal-ui 0.420.0 → 0.423.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.
@@ -154,6 +154,8 @@ var DApplicationLayer = /** @class */ (function (_super) {
154
154
  var newWidth = options.isWidthFixed() ? options.getWidth() : bbox.width;
155
155
  var newHeight = options.isHeightFixed() ? options.getHeight() : bbox.height;
156
156
  this.renderer.resize(newWidth, newHeight);
157
+ var wasLocked = this._isLocked;
158
+ this._isLocked = true;
157
159
  var padding = this._padding;
158
160
  var children = this.stage.children;
159
161
  for (var i = 0, imax = children.length; i < imax; ++i) {
@@ -162,7 +164,10 @@ var DApplicationLayer = /** @class */ (function (_super) {
162
164
  child.onParentResize(newWidth, newHeight, padding);
163
165
  }
164
166
  }
165
- this.update();
167
+ this._isLocked = wasLocked;
168
+ if (!this._isLocked && this._renderId == null) {
169
+ this.render();
170
+ }
166
171
  };
167
172
  DApplicationLayer.prototype.initWheelHandling = function () {
168
173
  var global = new Point();
@@ -1 +1 @@
1
- {"version":3,"file":"d-application-layer.js","sourceRoot":"","sources":["../../../src/main/typescript/wcardinal/ui/d-application-layer.ts"],"names":[],"mappings":"AAAA;;;GAGG;;AAEH,OAAO,EAAE,WAAW,EAAwC,KAAK,EAAE,MAAM,SAAS,CAAC;AAInF,OAAO,EAAE,KAAK,EAAE,MAAM,UAAU,CAAC;AAEjC,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAE/C,OAAO,EAAE,kBAAkB,EAAE,MAAM,6BAA6B,CAAC;AACjE,OAAO,EAAE,gBAAgB,EAAE,MAAM,2BAA2B,CAAC;AAC7D,OAAO,EAAE,cAAc,EAAwB,MAAM,yBAAyB,CAAC;AAM/E,IAAM,cAAc,GAAG,UAAC,MAAW;IAClC,OAAO,MAAM,IAAI,IAAI,IAAI,MAAM,CAAC,UAAU,IAAI,IAAI,CAAC;AACpD,CAAC,CAAC;AAMF,IAAM,WAAW,GAA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Ac,GAAd;QACC,OAAO,IAAI,CAAC,YAAY,CAAC;IAC1B,CAAC;IAED,+CAAmB,GAAnB;QACC,OAAO,IAAI,CAAC,iBAAiB,CAAC;IAC/B,CAAC;IAED,iDAAqB,GAArB;QACC,IAAI,IAAI,CAAC,mBAAmB,IAAI,IAAI,EAAE;YACrC,IAAI,CAAC,mBAAmB,GAAG,IAAI,kBAAkB,CAAC,IAAI,CAAC,CAAC;SACxD;QACD,OAAO,IAAI,CAAC,mBAAmB,CAAC;IACjC,CAAC;IACF,wBAAC;AAAD,CAAC,AAnUD,CAAuC,WAAW,GAmUjD","sourcesContent":["/*\n * Copyright (C) 2019 Toshiba Corporation\n * SPDX-License-Identifier: Apache-2.0\n */\n\nimport { Application, InteractionEvent, InteractionManager, Point } from \"pixi.js\";\nimport { DApplicationLayerLike } from \"./d-application-layer-like\";\nimport { DApplicationLayerOptions } from \"./d-application-layer-options\";\nimport { DApplicationLike } from \"./d-application-like\";\nimport { DBase } from \"./d-base\";\nimport { DControllerFocus, DFocusable, DFocusableContainer } from \"./d-controller-focus\";\nimport { DControllers } from \"./d-controllers\";\nimport { DPadding } from \"./d-padding\";\nimport { DynamicFontAtlases } from \"./util/dynamic-font-atlases\";\nimport { UtilPointerEvent } from \"./util/util-pointer-event\";\nimport { UtilWheelEvent, UtilWheelEventDeltas } from \"./util/util-wheel-event\";\n\ninterface DblClickable {\n\tonDblClick(e: MouseEvent | TouchEvent, interactionManager: InteractionManager): boolean;\n}\n\nconst isDblClickable = (target: any): target is DblClickable => {\n\treturn target != null && target.onDblClick != null;\n};\n\ninterface Wheelable {\n\tonWheel(e: WheelEvent, deltas: UtilWheelEventDeltas, global: Point): boolean;\n}\n\nconst isWheelable = (target: any): target is Wheelable => {\n\treturn target != null && target.onWheel != null;\n};\n\nexport class DApplicationLayer extends Application implements DApplicationLayerLike {\n\tprotected _options: DApplicationLayerOptions;\n\tprotected _renderId: number | null = null;\n\tprotected _renderBound: () => void;\n\tprotected _isLocked: boolean;\n\tprotected _isOverlay: boolean;\n\tprotected _reflowLimit: number;\n\tprotected _rootElement: HTMLElement;\n\tprotected _elementContainer: HTMLElement;\n\tprotected _padding: DPadding;\n\tprotected _dynamicFontAtlases: DynamicFontAtlases | null = null;\n\tprotected _isVisible: boolean;\n\n\treadonly application: DApplicationLike;\n\n\tconstructor(application: DApplicationLike, options: DApplicationLayerOptions) {\n\t\tsuper(options.getPixiApplicationOptions());\n\n\t\tthis._options = options;\n\t\tthis._isLocked = false;\n\t\tthis._isVisible = true;\n\t\tthis._isOverlay = options.isOverlay();\n\t\tthis._padding = options.getPadding();\n\t\tthis._rootElement = options.getRootElement();\n\t\tthis._reflowLimit = 5;\n\t\tthis._elementContainer = this.newElementContainer();\n\n\t\tthis.application = application;\n\n\t\tthis._renderBound = (): void => {\n\t\t\tif (this._renderId != null) {\n\t\t\t\tthis.render();\n\t\t\t}\n\t\t};\n\n\t\tthis.initStage();\n\t\tthis.initView();\n\t\tthis.initRootElement();\n\t\tthis.initFocusHandling();\n\t\tthis.initResizeHandling();\n\t\tthis.initWheelHandling();\n\t\tthis.initDoubleClickHandling();\n\t}\n\n\tprotected newElementContainer(): HTMLElement {\n\t\tconst result = document.createElement(\"div\");\n\t\tresult.setAttribute(\n\t\t\t\"style\",\n\t\t\t\"position: absolute; top: 0; left: 0; width: 0; height: 0;\" +\n\t\t\t\t\"margin: 0; padding: 0; outline: none;\"\n\t\t);\n\t\treturn result;\n\t}\n\n\tprotected initStage(): void {\n\t\tconst stage = this.stage;\n\t\t(stage as any).layer = this;\n\t\t(stage as any).application = this.application;\n\t\tstage.interactive = true;\n\t}\n\n\tprotected initView(): void {\n\t\tconst view = this.view;\n\t\tconst style = view.style;\n\t\tstyle.position = \"absolute\";\n\t\tstyle.top = \"0\";\n\t\tstyle.left = \"0\";\n\t\tstyle.width = \"100%\";\n\t\tstyle.height = \"100%\";\n\t\tstyle.display = \"block\";\n\t\tstyle.outline = \"none\";\n\t\t(style as any).webkitTapHighlightColor = \"rgba(255,255,255,0)\";\n\t\tstyle.webkitUserSelect = \"none\";\n\t\tstyle.setProperty(\"-khtml-user-select\", \"none\");\n\t\tstyle.setProperty(\"-moz-user-select\", \"none\");\n\t\tstyle.setProperty(\"-ms-user-select\", \"none\");\n\t\tstyle.userSelect = \"none\";\n\t}\n\n\tprotected initRootElement(): void {\n\t\tconst view = this.view;\n\t\tconst isOverlay = this._isOverlay;\n\t\tconst rootElement = this._rootElement;\n\t\tconst elementContainer = this._elementContainer;\n\n\t\t// Insert elements\n\t\tconst insertionPosition = isOverlay ? 2 : 0;\n\t\tconst children = rootElement.children;\n\t\tif (insertionPosition < children.length) {\n\t\t\tconst child = children[insertionPosition];\n\t\t\trootElement.insertBefore(view, child);\n\t\t\trootElement.insertBefore(elementContainer, child);\n\t\t} else {\n\t\t\trootElement.appendChild(view);\n\t\t\trootElement.appendChild(elementContainer);\n\t\t}\n\n\t\tif (isOverlay) {\n\t\t\tconst stage = this.stage;\n\t\t\tconst oldOnChildrenChange = (stage as any).onChildrenChange;\n\t\t\t(stage as any).onChildrenChange = (): void => {\n\t\t\t\tthis.onStageDirty();\n\t\t\t\toldOnChildrenChange.call(stage);\n\t\t\t};\n\t\t}\n\n\t\t// Init styles\n\t\tconst rootElementStyle = rootElement.style;\n\t\tif (rootElement !== document.body) {\n\t\t\tconst rootElementStylePosition = window.getComputedStyle(rootElement).position;\n\t\t\tif (rootElementStylePosition === \"static\") {\n\t\t\t\trootElementStyle.position = \"relative\";\n\t\t\t}\n\t\t}\n\t\trootElementStyle.margin = \"0\";\n\t\trootElementStyle.padding = \"0\";\n\t\trootElementStyle.overflow = \"hidden\";\n\t}\n\n\tprotected initFocusHandling(): void {\n\t\tconst view = this.view;\n\t\tconst stage = this.stage;\n\t\tconst focusController = this.getFocusController();\n\n\t\tview.setAttribute(\"tabindex\", \"0\");\n\n\t\tDControllers.getKeyboardController().init(view, stage, focusController);\n\n\t\tconst interactionManager = this.renderer.plugins.interaction;\n\t\tinteractionManager.on(UtilPointerEvent.down, (e: InteractionEvent): void => {\n\t\t\tif (e.target == null || e.target === stage) {\n\t\t\t\tfocusController.clear();\n\t\t\t}\n\t\t});\n\t}\n\n\tprotected initResizeHandling(): void {\n\t\tconst options = this._options;\n\t\tconst isWidthFixed = options.isWidthFixed();\n\t\tconst isHeightFixed = options.isHeightFixed();\n\t\tif (!isWidthFixed || !isHeightFixed) {\n\t\t\tconst onResizeBound = (): void => {\n\t\t\t\tthis.onResize();\n\t\t\t};\n\t\t\tif (window.ResizeObserver != null) {\n\t\t\t\tnew ResizeObserver(onResizeBound).observe(this._rootElement);\n\t\t\t} else {\n\t\t\t\twindow.addEventListener(\"resize\", onResizeBound);\n\t\t\t\twindow.addEventListener(\"orientationchange\", onResizeBound);\n\t\t\t}\n\t\t}\n\t}\n\n\tprotected onResize(): void {\n\t\tconst options = this._options;\n\t\tconst bboxes = this._rootElement.getClientRects();\n\t\tif (bboxes.length <= 0) {\n\t\t\t// The root element size is (0, 0) and not visible.\n\t\t\t// In this case, skip the resizing.\n\t\t\treturn;\n\t\t}\n\t\tconst bbox = bboxes[0];\n\t\tconst newWidth = options.isWidthFixed() ? options.getWidth() : bbox.width;\n\t\tconst newHeight = options.isHeightFixed() ? options.getHeight() : bbox.height;\n\t\tthis.renderer.resize(newWidth, newHeight);\n\n\t\tconst padding = this._padding;\n\t\tconst children = this.stage.children;\n\t\tfor (let i = 0, imax = children.length; i < imax; ++i) {\n\t\t\tconst child = children[i];\n\t\t\tif (child instanceof DBase) {\n\t\t\t\tchild.onParentResize(newWidth, newHeight, padding);\n\t\t\t}\n\t\t}\n\n\t\tthis.update();\n\t}\n\n\tprotected initWheelHandling(): void {\n\t\tconst global = new Point();\n\t\tconst util = UtilWheelEvent.getInstance();\n\t\tconst interactionManager = this.renderer.plugins.interaction;\n\t\tutil.on(this.view, (e: WheelEvent | Event): void => {\n\t\t\tconst wheelEvent = e as WheelEvent;\n\t\t\tUtilPointerEvent.toGlobal(wheelEvent, interactionManager, global);\n\t\t\tlet current = interactionManager.hitTest(global);\n\t\t\tconst deltas = util.normalize(e);\n\t\t\tif (deltas != null) {\n\t\t\t\twhile (current != null) {\n\t\t\t\t\tif (isWheelable(current)) {\n\t\t\t\t\t\tif (current.onWheel(wheelEvent, deltas, global)) {\n\t\t\t\t\t\t\twheelEvent.preventDefault();\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tcurrent = current.parent;\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t}\n\n\tprotected initDoubleClickHandling(): void {\n\t\tconst focusController = this.getFocusController();\n\t\tconst interactionManager = this.renderer.plugins.interaction;\n\t\tUtilPointerEvent.onDblClick(this.view, (e: MouseEvent | TouchEvent): void => {\n\t\t\tconst focused = focusController.get();\n\t\t\tif (focused != null) {\n\t\t\t\tlet current: DFocusable | DFocusableContainer | null = focused;\n\t\t\t\twhile (current != null) {\n\t\t\t\t\tif (isDblClickable(current)) {\n\t\t\t\t\t\tif (current.onDblClick(e, interactionManager)) {\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tcurrent = current.parent;\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t}\n\n\tlock(): void {\n\t\tthis._isLocked = true;\n\t}\n\n\tunlock(): void {\n\t\tthis._isLocked = false;\n\t}\n\n\tupdate(): void {\n\t\tif (!this._isLocked && this._renderId == null) {\n\t\t\tthis._renderId = requestAnimationFrame(this._renderBound);\n\t\t}\n\t}\n\n\tprotected onStageDirty(): void {\n\t\t// Update the visibility if this is a overlay layer.\n\t\tif (this._isOverlay) {\n\t\t\tif (0 < this.stage.children.length) {\n\t\t\t\t// There are more than one children,\n\t\t\t\t// therefore must be visible.\n\t\t\t\tif (!this._isVisible) {\n\t\t\t\t\tthis._isVisible = true;\n\t\t\t\t\tthis.view.style.display = \"block\";\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t// There is no child,\n\t\t\t\t// therefore must not be visible.\n\t\t\t\tif (this._isVisible) {\n\t\t\t\t\tthis._isVisible = false;\n\t\t\t\t\tthis.view.style.display = \"none\";\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\trender(): void {\n\t\tthis.reflow();\n\n\t\t// Please note why the following line is here.\n\t\t//\n\t\t// Before this line, the update method does not enque a rendering task\n\t\t// because `this._renderId` is not null. As a result, this prevents\n\t\t// an unintentional rendering loop caused by the refit or the reflow.\n\t\t//\n\t\t// After this line, the update method enques a rendering task.\n\t\t// Namely, in the DisplayObject#render(Renderer) method, allowed to enque\n\t\t// a rendering task. For instance, please refer to the DDiagramShape#update().\n\t\tthis._renderId = null;\n\n\t\t// Render\n\t\tsuper.render();\n\t}\n\n\tget width(): number {\n\t\treturn this.screen.width;\n\t}\n\n\tget height(): number {\n\t\treturn this.screen.height;\n\t}\n\n\tget padding(): DPadding {\n\t\treturn this._padding;\n\t}\n\n\treflow(): void {\n\t\tconst children = this.stage.children;\n\t\tfor (let ilimit = 0, limit = this._reflowLimit; ilimit < limit; ++ilimit) {\n\t\t\tlet isDirty = false;\n\t\t\tfor (let i = 0, imax = children.length; i < imax; ++i) {\n\t\t\t\tconst child = children[i];\n\t\t\t\tif (child instanceof DBase) {\n\t\t\t\t\tchild.reflow();\n\t\t\t\t\tisDirty =\n\t\t\t\t\t\tisDirty || child.isDirty() || child.hasDirty() || child.isHierarchyDirty();\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// If DBases are changed during the `reflow` process, need to reflow again.\n\t\t\tif (!isDirty) {\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t}\n\n\tgetFocusController(): DControllerFocus {\n\t\treturn this.application.getFocusController();\n\t}\n\n\tgetRootElement(): HTMLElement {\n\t\treturn this._rootElement;\n\t}\n\n\tgetElementContainer(): HTMLElement {\n\t\treturn this._elementContainer;\n\t}\n\n\tgetDynamicFontAtlases(): DynamicFontAtlases {\n\t\tif (this._dynamicFontAtlases == null) {\n\t\t\tthis._dynamicFontAtlases = new DynamicFontAtlases(this);\n\t\t}\n\t\treturn this._dynamicFontAtlases;\n\t}\n}\n"]}
1
+ {"version":3,"file":"d-application-layer.js","sourceRoot":"","sources":["../../../src/main/typescript/wcardinal/ui/d-application-layer.ts"],"names":[],"mappings":"AAAA;;;GAGG;;AAEH,OAAO,EAAE,WAAW,EAAwC,KAAK,EAAE,MAAM,SAAS,CAAC;AAInF,OAAO,EAAE,KAAK,EAAE,MAAM,UAAU,CAAC;AAEjC,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAE/C,OAAO,EAAE,kBAAkB,EAAE,MAAM,6BAA6B,CAAC;AACjE,OAAO,EAAE,gBAAgB,EAAE,MAAM,2BAA2B,CAAC;AAC7D,OAAO,EAAE,cAAc,EAAwB,MAAM,yBAAyB,CAAC;AAM/E,IAAM,cAAc,GAAG,UAAC,MAAW;IAClC,OAAO,MAAM,IAAI,IAAI,IAAI,MAAM,CAAC,UAAU,IAAI,IAAI,CAAC;AACpD,CAAC,CAAC;AAMF,IAAM,WAAW,GAAG,UAAC,MAAW;IAC/B,OAAO,MAAM,IAAI,IAAI,IAAI,MAAM,CAAC,OAAO,IAAI,IAAI,CAAC;AACjD,CAAC,CAAC;AAEF;IAAuC,qCAAW;IAejD,2BAAY,WAA6B,EAAE,OAAiC;QAA5E,YACC,kBAAM,OAAO,CAAC,yBAAyB,EAAE,CAAC,SA0B1C;QAxCS,eAAS,GAAkB,IAAI,CAAC;QAQhC,yBAAmB,GAA8B,IAAI,CAAC;QAQ/D,KAAI,CAAC,QAAQ,GAAG,OAAO,CAAC;QACxB,KAAI,CAAC,SAAS,GAAG,KAAK,CAAC;QACvB,KAAI,CAAC,UAAU,GAAG,IAAI,CAAC;QACvB,KAAI,CAAC,UAAU,GAAG,OAAO,CAAC,SAAS,EAAE,CAAC;QACtC,KAAI,CAAC,QAAQ,GAAG,OAAO,CAAC,UAAU,EAAE,CAAC;QACrC,KAAI,CAAC,YAAY,GAAG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AzUD,CAAuC,WAAW,GAyUjD","sourcesContent":["/*\n * Copyright (C) 2019 Toshiba Corporation\n * SPDX-License-Identifier: Apache-2.0\n */\n\nimport { Application, InteractionEvent, InteractionManager, Point } from \"pixi.js\";\nimport { DApplicationLayerLike } from \"./d-application-layer-like\";\nimport { DApplicationLayerOptions } from \"./d-application-layer-options\";\nimport { DApplicationLike } from \"./d-application-like\";\nimport { DBase } from \"./d-base\";\nimport { DControllerFocus, DFocusable, DFocusableContainer } from \"./d-controller-focus\";\nimport { DControllers } from \"./d-controllers\";\nimport { DPadding } from \"./d-padding\";\nimport { DynamicFontAtlases } from \"./util/dynamic-font-atlases\";\nimport { UtilPointerEvent } from \"./util/util-pointer-event\";\nimport { UtilWheelEvent, UtilWheelEventDeltas } from \"./util/util-wheel-event\";\n\ninterface DblClickable {\n\tonDblClick(e: MouseEvent | TouchEvent, interactionManager: InteractionManager): boolean;\n}\n\nconst isDblClickable = (target: any): target is DblClickable => {\n\treturn target != null && target.onDblClick != null;\n};\n\ninterface Wheelable {\n\tonWheel(e: WheelEvent, deltas: UtilWheelEventDeltas, global: Point): boolean;\n}\n\nconst isWheelable = (target: any): target is Wheelable => {\n\treturn target != null && target.onWheel != null;\n};\n\nexport class DApplicationLayer extends Application implements DApplicationLayerLike {\n\tprotected _options: DApplicationLayerOptions;\n\tprotected _renderId: number | null = null;\n\tprotected _renderBound: () => void;\n\tprotected _isLocked: boolean;\n\tprotected _isOverlay: boolean;\n\tprotected _reflowLimit: number;\n\tprotected _rootElement: HTMLElement;\n\tprotected _elementContainer: HTMLElement;\n\tprotected _padding: DPadding;\n\tprotected _dynamicFontAtlases: DynamicFontAtlases | null = null;\n\tprotected _isVisible: boolean;\n\n\treadonly application: DApplicationLike;\n\n\tconstructor(application: DApplicationLike, options: DApplicationLayerOptions) {\n\t\tsuper(options.getPixiApplicationOptions());\n\n\t\tthis._options = options;\n\t\tthis._isLocked = false;\n\t\tthis._isVisible = true;\n\t\tthis._isOverlay = options.isOverlay();\n\t\tthis._padding = options.getPadding();\n\t\tthis._rootElement = options.getRootElement();\n\t\tthis._reflowLimit = 5;\n\t\tthis._elementContainer = this.newElementContainer();\n\n\t\tthis.application = application;\n\n\t\tthis._renderBound = (): void => {\n\t\t\tif (this._renderId != null) {\n\t\t\t\tthis.render();\n\t\t\t}\n\t\t};\n\n\t\tthis.initStage();\n\t\tthis.initView();\n\t\tthis.initRootElement();\n\t\tthis.initFocusHandling();\n\t\tthis.initResizeHandling();\n\t\tthis.initWheelHandling();\n\t\tthis.initDoubleClickHandling();\n\t}\n\n\tprotected newElementContainer(): HTMLElement {\n\t\tconst result = document.createElement(\"div\");\n\t\tresult.setAttribute(\n\t\t\t\"style\",\n\t\t\t\"position: absolute; top: 0; left: 0; width: 0; height: 0;\" +\n\t\t\t\t\"margin: 0; padding: 0; outline: none;\"\n\t\t);\n\t\treturn result;\n\t}\n\n\tprotected initStage(): void {\n\t\tconst stage = this.stage;\n\t\t(stage as any).layer = this;\n\t\t(stage as any).application = this.application;\n\t\tstage.interactive = true;\n\t}\n\n\tprotected initView(): void {\n\t\tconst view = this.view;\n\t\tconst style = view.style;\n\t\tstyle.position = \"absolute\";\n\t\tstyle.top = \"0\";\n\t\tstyle.left = \"0\";\n\t\tstyle.width = \"100%\";\n\t\tstyle.height = \"100%\";\n\t\tstyle.display = \"block\";\n\t\tstyle.outline = \"none\";\n\t\t(style as any).webkitTapHighlightColor = \"rgba(255,255,255,0)\";\n\t\tstyle.webkitUserSelect = \"none\";\n\t\tstyle.setProperty(\"-khtml-user-select\", \"none\");\n\t\tstyle.setProperty(\"-moz-user-select\", \"none\");\n\t\tstyle.setProperty(\"-ms-user-select\", \"none\");\n\t\tstyle.userSelect = \"none\";\n\t}\n\n\tprotected initRootElement(): void {\n\t\tconst view = this.view;\n\t\tconst isOverlay = this._isOverlay;\n\t\tconst rootElement = this._rootElement;\n\t\tconst elementContainer = this._elementContainer;\n\n\t\t// Insert elements\n\t\tconst insertionPosition = isOverlay ? 2 : 0;\n\t\tconst children = rootElement.children;\n\t\tif (insertionPosition < children.length) {\n\t\t\tconst child = children[insertionPosition];\n\t\t\trootElement.insertBefore(view, child);\n\t\t\trootElement.insertBefore(elementContainer, child);\n\t\t} else {\n\t\t\trootElement.appendChild(view);\n\t\t\trootElement.appendChild(elementContainer);\n\t\t}\n\n\t\tif (isOverlay) {\n\t\t\tconst stage = this.stage;\n\t\t\tconst oldOnChildrenChange = (stage as any).onChildrenChange;\n\t\t\t(stage as any).onChildrenChange = (): void => {\n\t\t\t\tthis.onStageDirty();\n\t\t\t\toldOnChildrenChange.call(stage);\n\t\t\t};\n\t\t}\n\n\t\t// Init styles\n\t\tconst rootElementStyle = rootElement.style;\n\t\tif (rootElement !== document.body) {\n\t\t\tconst rootElementStylePosition = window.getComputedStyle(rootElement).position;\n\t\t\tif (rootElementStylePosition === \"static\") {\n\t\t\t\trootElementStyle.position = \"relative\";\n\t\t\t}\n\t\t}\n\t\trootElementStyle.margin = \"0\";\n\t\trootElementStyle.padding = \"0\";\n\t\trootElementStyle.overflow = \"hidden\";\n\t}\n\n\tprotected initFocusHandling(): void {\n\t\tconst view = this.view;\n\t\tconst stage = this.stage;\n\t\tconst focusController = this.getFocusController();\n\n\t\tview.setAttribute(\"tabindex\", \"0\");\n\n\t\tDControllers.getKeyboardController().init(view, stage, focusController);\n\n\t\tconst interactionManager = this.renderer.plugins.interaction;\n\t\tinteractionManager.on(UtilPointerEvent.down, (e: InteractionEvent): void => {\n\t\t\tif (e.target == null || e.target === stage) {\n\t\t\t\tfocusController.clear();\n\t\t\t}\n\t\t});\n\t}\n\n\tprotected initResizeHandling(): void {\n\t\tconst options = this._options;\n\t\tconst isWidthFixed = options.isWidthFixed();\n\t\tconst isHeightFixed = options.isHeightFixed();\n\t\tif (!isWidthFixed || !isHeightFixed) {\n\t\t\tconst onResizeBound = (): void => {\n\t\t\t\tthis.onResize();\n\t\t\t};\n\t\t\tif (window.ResizeObserver != null) {\n\t\t\t\tnew ResizeObserver(onResizeBound).observe(this._rootElement);\n\t\t\t} else {\n\t\t\t\twindow.addEventListener(\"resize\", onResizeBound);\n\t\t\t\twindow.addEventListener(\"orientationchange\", onResizeBound);\n\t\t\t}\n\t\t}\n\t}\n\n\tprotected onResize(): void {\n\t\tconst options = this._options;\n\t\tconst bboxes = this._rootElement.getClientRects();\n\t\tif (bboxes.length <= 0) {\n\t\t\t// The root element size is (0, 0) and not visible.\n\t\t\t// In this case, skip the resizing.\n\t\t\treturn;\n\t\t}\n\t\tconst bbox = bboxes[0];\n\t\tconst newWidth = options.isWidthFixed() ? options.getWidth() : bbox.width;\n\t\tconst newHeight = options.isHeightFixed() ? options.getHeight() : bbox.height;\n\t\tthis.renderer.resize(newWidth, newHeight);\n\n\t\tconst wasLocked = this._isLocked;\n\t\tthis._isLocked = true;\n\n\t\tconst padding = this._padding;\n\t\tconst children = this.stage.children;\n\t\tfor (let i = 0, imax = children.length; i < imax; ++i) {\n\t\t\tconst child = children[i];\n\t\t\tif (child instanceof DBase) {\n\t\t\t\tchild.onParentResize(newWidth, newHeight, padding);\n\t\t\t}\n\t\t}\n\n\t\tthis._isLocked = wasLocked;\n\t\tif (!this._isLocked && this._renderId == null) {\n\t\t\tthis.render();\n\t\t}\n\t}\n\n\tprotected initWheelHandling(): void {\n\t\tconst global = new Point();\n\t\tconst util = UtilWheelEvent.getInstance();\n\t\tconst interactionManager = this.renderer.plugins.interaction;\n\t\tutil.on(this.view, (e: WheelEvent | Event): void => {\n\t\t\tconst wheelEvent = e as WheelEvent;\n\t\t\tUtilPointerEvent.toGlobal(wheelEvent, interactionManager, global);\n\t\t\tlet current = interactionManager.hitTest(global);\n\t\t\tconst deltas = util.normalize(e);\n\t\t\tif (deltas != null) {\n\t\t\t\twhile (current != null) {\n\t\t\t\t\tif (isWheelable(current)) {\n\t\t\t\t\t\tif (current.onWheel(wheelEvent, deltas, global)) {\n\t\t\t\t\t\t\twheelEvent.preventDefault();\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tcurrent = current.parent;\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t}\n\n\tprotected initDoubleClickHandling(): void {\n\t\tconst focusController = this.getFocusController();\n\t\tconst interactionManager = this.renderer.plugins.interaction;\n\t\tUtilPointerEvent.onDblClick(this.view, (e: MouseEvent | TouchEvent): void => {\n\t\t\tconst focused = focusController.get();\n\t\t\tif (focused != null) {\n\t\t\t\tlet current: DFocusable | DFocusableContainer | null = focused;\n\t\t\t\twhile (current != null) {\n\t\t\t\t\tif (isDblClickable(current)) {\n\t\t\t\t\t\tif (current.onDblClick(e, interactionManager)) {\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tcurrent = current.parent;\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t}\n\n\tlock(): void {\n\t\tthis._isLocked = true;\n\t}\n\n\tunlock(): void {\n\t\tthis._isLocked = false;\n\t}\n\n\tupdate(): void {\n\t\tif (!this._isLocked && this._renderId == null) {\n\t\t\tthis._renderId = requestAnimationFrame(this._renderBound);\n\t\t}\n\t}\n\n\tprotected onStageDirty(): void {\n\t\t// Update the visibility if this is a overlay layer.\n\t\tif (this._isOverlay) {\n\t\t\tif (0 < this.stage.children.length) {\n\t\t\t\t// There are more than one children,\n\t\t\t\t// therefore must be visible.\n\t\t\t\tif (!this._isVisible) {\n\t\t\t\t\tthis._isVisible = true;\n\t\t\t\t\tthis.view.style.display = \"block\";\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t// There is no child,\n\t\t\t\t// therefore must not be visible.\n\t\t\t\tif (this._isVisible) {\n\t\t\t\t\tthis._isVisible = false;\n\t\t\t\t\tthis.view.style.display = \"none\";\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\trender(): void {\n\t\tthis.reflow();\n\n\t\t// Please note why the following line is here.\n\t\t//\n\t\t// Before this line, the update method does not enque a rendering task\n\t\t// because `this._renderId` is not null. As a result, this prevents\n\t\t// an unintentional rendering loop caused by the refit or the reflow.\n\t\t//\n\t\t// After this line, the update method enques a rendering task.\n\t\t// Namely, in the DisplayObject#render(Renderer) method, allowed to enque\n\t\t// a rendering task. For instance, please refer to the DDiagramShape#update().\n\t\tthis._renderId = null;\n\n\t\t// Render\n\t\tsuper.render();\n\t}\n\n\tget width(): number {\n\t\treturn this.screen.width;\n\t}\n\n\tget height(): number {\n\t\treturn this.screen.height;\n\t}\n\n\tget padding(): DPadding {\n\t\treturn this._padding;\n\t}\n\n\treflow(): void {\n\t\tconst children = this.stage.children;\n\t\tfor (let ilimit = 0, limit = this._reflowLimit; ilimit < limit; ++ilimit) {\n\t\t\tlet isDirty = false;\n\t\t\tfor (let i = 0, imax = children.length; i < imax; ++i) {\n\t\t\t\tconst child = children[i];\n\t\t\t\tif (child instanceof DBase) {\n\t\t\t\t\tchild.reflow();\n\t\t\t\t\tisDirty =\n\t\t\t\t\t\tisDirty || child.isDirty() || child.hasDirty() || child.isHierarchyDirty();\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// If DBases are changed during the `reflow` process, need to reflow again.\n\t\t\tif (!isDirty) {\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t}\n\n\tgetFocusController(): DControllerFocus {\n\t\treturn this.application.getFocusController();\n\t}\n\n\tgetRootElement(): HTMLElement {\n\t\treturn this._rootElement;\n\t}\n\n\tgetElementContainer(): HTMLElement {\n\t\treturn this._elementContainer;\n\t}\n\n\tgetDynamicFontAtlases(): DynamicFontAtlases {\n\t\tif (this._dynamicFontAtlases == null) {\n\t\t\tthis._dynamicFontAtlases = new DynamicFontAtlases(this);\n\t\t}\n\t\treturn this._dynamicFontAtlases;\n\t}\n}\n"]}
@@ -44,18 +44,19 @@ var DChartPlotAreaTwofoldCoorinateContainerSub = /** @class */ (function () {
44
44
  var secondary = this._secondary;
45
45
  var secondarySize = secondary.size();
46
46
  if (primarySize <= index && index < primarySize + secondarySize) {
47
- secondary.get(index - primarySize);
47
+ return secondary.get(index - primarySize);
48
48
  }
49
49
  return null;
50
50
  };
51
51
  DChartPlotAreaTwofoldCoorinateContainerSub.prototype.indexOf = function (coordinate) {
52
- var result = this._primary.indexOf(coordinate);
52
+ var primary = this._primary;
53
+ var result = primary.indexOf(coordinate);
53
54
  if (0 <= result) {
54
55
  return result;
55
56
  }
56
57
  result = this._secondary.indexOf(coordinate);
57
58
  if (0 <= result) {
58
- return this._primary.size() + result;
59
+ return primary.size() + result;
59
60
  }
60
61
  return -1;
61
62
  };
@@ -70,7 +71,7 @@ var DChartPlotAreaTwofoldCoorinateContainerSub = /** @class */ (function () {
70
71
  var secondary = this._secondary;
71
72
  var secondarySize = secondary.size();
72
73
  if (primarySize <= index && index < primarySize + secondarySize) {
73
- secondary.remove(index - primarySize);
74
+ return secondary.remove(index - primarySize);
74
75
  }
75
76
  }
76
77
  else {
@@ -1 +1 @@
1
- {"version":3,"file":"d-chart-plot-area-twofold-coordinate-container-sub.js","sourceRoot":"","sources":["../../../src/main/typescript/wcardinal/ui/d-chart-plot-area-twofold-coordinate-container-sub.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAMH,OAAO,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAE5C;IAOC,oDACC,SAA2C,EAC3C,OAA4C,EAC5C,SAA8C;QAE9C,IAAI,CAAC,UAAU,GAAG,SAAS,CAAC;QAC5B,IAAI,CAAC,QAAQ,GAAG,OAAO,CAAC;QACxB,IAAI,CAAC,UAAU,GAAG,SAAS,CAAC;IAC7B,CAAC;IAED,sBAAI,iEAAS;aAAb;YACC,OAAO,IAAI,CAAC,UAAU,CAAC;QACxB,CAAC;;;OAAA;IAED,wDAAG,GAAH,UAAI,UAAmC,EAAE,KAAc;QACtD,IAAI,KAAK,IAAI,IAAI,EAAE;YAClB,IAAM,OAAO,GAAG,IAAI,CAAC,QAAQ,CAAC;YAC9B,IAAM,WAAW,GAAG,OAAO,CAAC,IAAI,EAAE,CAAC;YACn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AAC;IACrB,CAAC;IAED,yDAAI,GAAJ;QACC,OAAO,IAAI,CAAC,QAAQ,CAAC,IAAI,EAAE,GAAG,IAAI,CAAC,UAAU,CAAC,IAAI,EAAE,CAAC;IACtD,CAAC;IAED,wDAAG,GAAH,UAAI,IAAa,EAAE,EAAW;QAC7B,IAAI,CAAC,QAAQ,CAAC,GAAG,CAAC,IAAI,EAAE,EAAE,CAAC,CAAC;QAC5B,IAAI,CAAC,UAAU,CAAC,GAAG,CAAC,IAAI,EAAE,EAAE,CAAC,CAAC;QAC9B,OAAO,IAAI,CAAC;IACb,CAAC;IAED,yDAAI,GAAJ,UAAK,IAAa,EAAE,EAAW;QAC9B,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,IAAI,EAAE,EAAE,CAAC,CAAC;QAC7B,IAAI,CAAC,UAAU,CAAC,IAAI,CAAC,IAAI,EAAE,EAAE,CAAC,CAAC;QAC/B,OAAO,IAAI,CAAC;IACb,CAAC;IAED,0DAAK,GAAL,UAAM,KAAa;QAClB,IAAI,CAAC,QAAQ,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC;QAC3B,IAAI,CAAC,UAAU,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC;QAC7B,OAAO,IAAI,CAAC;IACb,CAAC;IACF,iDAAC;AAAD,CAAC,AA7HD,IA6HC","sourcesContent":["/*\n * Copyright (C) 2019 Toshiba Corporation\n * SPDX-License-Identifier: Apache-2.0\n */\n\nimport { DBase } from \"./d-base\";\nimport { DChartCoordinate } from \"./d-chart-coordinate\";\nimport { DChartCoordinateContainer } from \"./d-chart-coordinate-container\";\nimport { DChartCoordinateContainerSub } from \"./d-chart-coordinate-container-sub\";\nimport { isNumber } from \"./util/is-number\";\n\nexport class DChartPlotAreaTwofoldCoorinateContainerSub<CHART extends DBase = DBase>\n\timplements DChartCoordinateContainerSub<CHART>\n{\n\tprotected _container: DChartCoordinateContainer<CHART>;\n\tprotected _primary: DChartCoordinateContainerSub<CHART>;\n\tprotected _secondary: DChartCoordinateContainerSub<CHART>;\n\n\tconstructor(\n\t\tcontainer: DChartCoordinateContainer<CHART>,\n\t\tprimary: DChartCoordinateContainerSub<CHART>,\n\t\tsecondary: DChartCoordinateContainerSub<CHART>\n\t) {\n\t\tthis._container = container;\n\t\tthis._primary = primary;\n\t\tthis._secondary = secondary;\n\t}\n\n\tget container(): DChartCoordinateContainer<CHART> {\n\t\treturn this._container;\n\t}\n\n\tadd(coordinate: DChartCoordinate<CHART>, index?: number): this {\n\t\tif (index != null) {\n\t\t\tconst primary = this._primary;\n\t\t\tconst primarySize = primary.size();\n\t\t\tif (index < primarySize) {\n\t\t\t\tif (0 <= index) {\n\t\t\t\t\tprimary.add(coordinate, index);\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tthis._secondary.add(coordinate, index - primarySize);\n\t\t\t}\n\t\t\treturn this;\n\t\t} else {\n\t\t\tthis._secondary.add(coordinate);\n\t\t}\n\t\treturn this;\n\t}\n\n\tget(index: number): DChartCoordinate<CHART> | null {\n\t\tconst primary = this._primary;\n\t\tconst primarySize = primary.size();\n\t\tif (0 <= index && index < primarySize) {\n\t\t\treturn primary.get(index);\n\t\t}\n\t\tconst secondary = this._secondary;\n\t\tconst secondarySize = secondary.size();\n\t\tif (primarySize <= index && index < primarySize + secondarySize) {\n\t\t\tsecondary.get(index - primarySize);\n\t\t}\n\t\treturn null;\n\t}\n\n\tindexOf(coordinate: DChartCoordinate<CHART>): number {\n\t\tlet result = this._primary.indexOf(coordinate);\n\t\tif (0 <= result) {\n\t\t\treturn result;\n\t\t}\n\t\tresult = this._secondary.indexOf(coordinate);\n\t\tif (0 <= result) {\n\t\t\treturn this._primary.size() + result;\n\t\t}\n\t\treturn -1;\n\t}\n\n\tremove(coordinate: DChartCoordinate<CHART>): DChartCoordinate<CHART> | null;\n\tremove(index: number): DChartCoordinate<CHART> | null;\n\tremove(coordinateOrIndex: DChartCoordinate<CHART> | number): DChartCoordinate<CHART> | null {\n\t\tif (isNumber(coordinateOrIndex)) {\n\t\t\tconst index = coordinateOrIndex;\n\t\t\tconst primary = this._primary;\n\t\t\tconst primarySize = primary.size();\n\t\t\tif (0 <= index && index < primarySize) {\n\t\t\t\treturn primary.remove(index);\n\t\t\t}\n\t\t\tconst secondary = this._secondary;\n\t\t\tconst secondarySize = secondary.size();\n\t\t\tif (primarySize <= index && index < primarySize + secondarySize) {\n\t\t\t\tsecondary.remove(index - primarySize);\n\t\t\t}\n\t\t} else {\n\t\t\tconst coordinate = coordinateOrIndex;\n\t\t\tlet result = this._primary.remove(coordinate);\n\t\t\tif (result != null) {\n\t\t\t\treturn result;\n\t\t\t}\n\t\t\tresult = this._secondary.remove(coordinate);\n\t\t\tif (result != null) {\n\t\t\t\treturn result;\n\t\t\t}\n\t\t}\n\t\treturn null;\n\t}\n\n\tclear(): this {\n\t\tthis._primary.clear();\n\t\tthis._secondary.clear();\n\t\treturn this;\n\t}\n\n\tdestroy(): this {\n\t\treturn this.clear();\n\t}\n\n\tsize(): number {\n\t\treturn this._primary.size() + this._secondary.size();\n\t}\n\n\tfit(from?: number, to?: number): this {\n\t\tthis._primary.fit(from, to);\n\t\tthis._secondary.fit(from, to);\n\t\treturn this;\n\t}\n\n\tmark(from?: number, to?: number): this {\n\t\tthis._primary.mark(from, to);\n\t\tthis._secondary.mark(from, to);\n\t\treturn this;\n\t}\n\n\tblend(ratio: number): this {\n\t\tthis._primary.blend(ratio);\n\t\tthis._secondary.blend(ratio);\n\t\treturn this;\n\t}\n}\n"]}
1
+ {"version":3,"file":"d-chart-plot-area-twofold-coordinate-container-sub.js","sourceRoot":"","sources":["../../../src/main/typescript/wcardinal/ui/d-chart-plot-area-twofold-coordinate-container-sub.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAMH,OAAO,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAE5C;IAOC,oDACC,SAA2C,EAC3C,OAA4C,EAC5C,SAA8C;QAE9C,IAAI,CAAC,UAAU,GAAG,SAAS,CAAC;Q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ourcesContent":["/*\n * Copyright (C) 2019 Toshiba Corporation\n * SPDX-License-Identifier: Apache-2.0\n */\n\nimport { DBase } from \"./d-base\";\nimport { DChartCoordinate } from \"./d-chart-coordinate\";\nimport { DChartCoordinateContainer } from \"./d-chart-coordinate-container\";\nimport { DChartCoordinateContainerSub } from \"./d-chart-coordinate-container-sub\";\nimport { isNumber } from \"./util/is-number\";\n\nexport class DChartPlotAreaTwofoldCoorinateContainerSub<CHART extends DBase = DBase>\n\timplements DChartCoordinateContainerSub<CHART>\n{\n\tprotected _container: DChartCoordinateContainer<CHART>;\n\tprotected _primary: DChartCoordinateContainerSub<CHART>;\n\tprotected _secondary: DChartCoordinateContainerSub<CHART>;\n\n\tconstructor(\n\t\tcontainer: DChartCoordinateContainer<CHART>,\n\t\tprimary: DChartCoordinateContainerSub<CHART>,\n\t\tsecondary: DChartCoordinateContainerSub<CHART>\n\t) {\n\t\tthis._container = container;\n\t\tthis._primary = primary;\n\t\tthis._secondary = secondary;\n\t}\n\n\tget container(): DChartCoordinateContainer<CHART> {\n\t\treturn this._container;\n\t}\n\n\tadd(coordinate: DChartCoordinate<CHART>, index?: number): this {\n\t\tif (index != null) {\n\t\t\tconst primary = this._primary;\n\t\t\tconst primarySize = primary.size();\n\t\t\tif (index < primarySize) {\n\t\t\t\tif (0 <= index) {\n\t\t\t\t\tprimary.add(coordinate, index);\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tthis._secondary.add(coordinate, index - primarySize);\n\t\t\t}\n\t\t\treturn this;\n\t\t} else {\n\t\t\tthis._secondary.add(coordinate);\n\t\t}\n\t\treturn this;\n\t}\n\n\tget(index: number): DChartCoordinate<CHART> | null {\n\t\tconst primary = this._primary;\n\t\tconst primarySize = primary.size();\n\t\tif (0 <= index && index < primarySize) {\n\t\t\treturn primary.get(index);\n\t\t}\n\t\tconst secondary = this._secondary;\n\t\tconst secondarySize = secondary.size();\n\t\tif (primarySize <= index && index < primarySize + secondarySize) {\n\t\t\treturn secondary.get(index - primarySize);\n\t\t}\n\t\treturn null;\n\t}\n\n\tindexOf(coordinate: DChartCoordinate<CHART>): number {\n\t\tconst primary = this._primary;\n\t\tlet result = primary.indexOf(coordinate);\n\t\tif (0 <= result) {\n\t\t\treturn result;\n\t\t}\n\t\tresult = this._secondary.indexOf(coordinate);\n\t\tif (0 <= result) {\n\t\t\treturn primary.size() + result;\n\t\t}\n\t\treturn -1;\n\t}\n\n\tremove(coordinate: DChartCoordinate<CHART>): DChartCoordinate<CHART> | null;\n\tremove(index: number): DChartCoordinate<CHART> | null;\n\tremove(coordinateOrIndex: DChartCoordinate<CHART> | number): DChartCoordinate<CHART> | null {\n\t\tif (isNumber(coordinateOrIndex)) {\n\t\t\tconst index = coordinateOrIndex;\n\t\t\tconst primary = this._primary;\n\t\t\tconst primarySize = primary.size();\n\t\t\tif (0 <= index && index < primarySize) {\n\t\t\t\treturn primary.remove(index);\n\t\t\t}\n\t\t\tconst secondary = this._secondary;\n\t\t\tconst secondarySize = secondary.size();\n\t\t\tif (primarySize <= index && index < primarySize + secondarySize) {\n\t\t\t\treturn secondary.remove(index - primarySize);\n\t\t\t}\n\t\t} else {\n\t\t\tconst coordinate = coordinateOrIndex;\n\t\t\tlet result = this._primary.remove(coordinate);\n\t\t\tif (result != null) {\n\t\t\t\treturn result;\n\t\t\t}\n\t\t\tresult = this._secondary.remove(coordinate);\n\t\t\tif (result != null) {\n\t\t\t\treturn result;\n\t\t\t}\n\t\t}\n\t\treturn null;\n\t}\n\n\tclear(): this {\n\t\tthis._primary.clear();\n\t\tthis._secondary.clear();\n\t\treturn this;\n\t}\n\n\tdestroy(): this {\n\t\treturn this.clear();\n\t}\n\n\tsize(): number {\n\t\treturn this._primary.size() + this._secondary.size();\n\t}\n\n\tfit(from?: number, to?: number): this {\n\t\tthis._primary.fit(from, to);\n\t\tthis._secondary.fit(from, to);\n\t\treturn this;\n\t}\n\n\tmark(from?: number, to?: number): this {\n\t\tthis._primary.mark(from, to);\n\t\tthis._secondary.mark(from, to);\n\t\treturn this;\n\t}\n\n\tblend(ratio: number): this {\n\t\tthis._primary.blend(ratio);\n\t\tthis._secondary.blend(ratio);\n\t\treturn this;\n\t}\n}\n"]}
@@ -1,5 +1,5 @@
1
1
  /*
2
- Winter Cardinal UI v0.420.0
2
+ Winter Cardinal UI v0.423.0
3
3
  Copyright (C) 2019 Toshiba Corporation
4
4
  SPDX-License-Identifier: Apache-2.0
5
5
 
@@ -1,5 +1,5 @@
1
1
  /*
2
- Winter Cardinal UI v0.420.0
2
+ Winter Cardinal UI v0.423.0
3
3
  Copyright (C) 2019 Toshiba Corporation
4
4
  SPDX-License-Identifier: Apache-2.0
5
5
 
@@ -1,5 +1,5 @@
1
1
  /*
2
- Winter Cardinal UI v0.420.0
2
+ Winter Cardinal UI v0.423.0
3
3
  Copyright (C) 2019 Toshiba Corporation
4
4
  SPDX-License-Identifier: Apache-2.0
5
5
 
@@ -1,5 +1,5 @@
1
1
  /*
2
- Winter Cardinal UI v0.420.0
2
+ Winter Cardinal UI v0.423.0
3
3
  Copyright (C) 2019 Toshiba Corporation
4
4
  SPDX-License-Identifier: Apache-2.0
5
5
 
@@ -1,5 +1,5 @@
1
1
  /*
2
- Winter Cardinal UI v0.420.0
2
+ Winter Cardinal UI v0.423.0
3
3
  Copyright (C) 2019 Toshiba Corporation
4
4
  SPDX-License-Identifier: Apache-2.0
5
5
 
@@ -1,5 +1,5 @@
1
1
  /*
2
- Winter Cardinal UI v0.420.0
2
+ Winter Cardinal UI v0.423.0
3
3
  Copyright (C) 2019 Toshiba Corporation
4
4
  SPDX-License-Identifier: Apache-2.0
5
5
 
@@ -1,5 +1,5 @@
1
1
  /*
2
- Winter Cardinal UI v0.420.0
2
+ Winter Cardinal UI v0.423.0
3
3
  Copyright (C) 2019 Toshiba Corporation
4
4
  SPDX-License-Identifier: Apache-2.0
5
5
 
@@ -1,5 +1,5 @@
1
1
  /*
2
- Winter Cardinal UI v0.420.0
2
+ Winter Cardinal UI v0.423.0
3
3
  Copyright (C) 2019 Toshiba Corporation
4
4
  SPDX-License-Identifier: Apache-2.0
5
5
 
@@ -1,5 +1,5 @@
1
1
  /*
2
- Winter Cardinal UI v0.420.0
2
+ Winter Cardinal UI v0.423.0
3
3
  Copyright (C) 2019 Toshiba Corporation
4
4
  SPDX-License-Identifier: Apache-2.0
5
5
 
@@ -1,5 +1,5 @@
1
1
  /*
2
- Winter Cardinal UI v0.420.0
2
+ Winter Cardinal UI v0.423.0
3
3
  Copyright (C) 2019 Toshiba Corporation
4
4
  SPDX-License-Identifier: Apache-2.0
5
5
 
@@ -1,5 +1,5 @@
1
1
  /*
2
- Winter Cardinal UI v0.420.0
2
+ Winter Cardinal UI v0.423.0
3
3
  Copyright (C) 2019 Toshiba Corporation
4
4
  SPDX-License-Identifier: Apache-2.0
5
5
 
@@ -1,5 +1,5 @@
1
1
  /*
2
- Winter Cardinal UI v0.420.0
2
+ Winter Cardinal UI v0.423.0
3
3
  Copyright (C) 2019 Toshiba Corporation
4
4
  SPDX-License-Identifier: Apache-2.0
5
5
 
@@ -1,5 +1,5 @@
1
1
  /*
2
- Winter Cardinal UI v0.420.0
2
+ Winter Cardinal UI v0.423.0
3
3
  Copyright (C) 2019 Toshiba Corporation
4
4
  SPDX-License-Identifier: Apache-2.0
5
5
 
@@ -72251,6 +72251,8 @@ var DApplicationLayer = /** @class */ (function (_super) {
72251
72251
  var newWidth = options.isWidthFixed() ? options.getWidth() : bbox.width;
72252
72252
  var newHeight = options.isHeightFixed() ? options.getHeight() : bbox.height;
72253
72253
  this.renderer.resize(newWidth, newHeight);
72254
+ var wasLocked = this._isLocked;
72255
+ this._isLocked = true;
72254
72256
  var padding = this._padding;
72255
72257
  var children = this.stage.children;
72256
72258
  for (var i = 0, imax = children.length; i < imax; ++i) {
@@ -72259,7 +72261,10 @@ var DApplicationLayer = /** @class */ (function (_super) {
72259
72261
  child.onParentResize(newWidth, newHeight, padding);
72260
72262
  }
72261
72263
  }
72262
- this.update();
72264
+ this._isLocked = wasLocked;
72265
+ if (!this._isLocked && this._renderId == null) {
72266
+ this.render();
72267
+ }
72263
72268
  };
72264
72269
  DApplicationLayer.prototype.initWheelHandling = function () {
72265
72270
  var global = new pixi_js.Point();
@@ -82440,18 +82445,19 @@ var DChartPlotAreaTwofoldCoorinateContainerSub = /** @class */ (function () {
82440
82445
  var secondary = this._secondary;
82441
82446
  var secondarySize = secondary.size();
82442
82447
  if (primarySize <= index && index < primarySize + secondarySize) {
82443
- secondary.get(index - primarySize);
82448
+ return secondary.get(index - primarySize);
82444
82449
  }
82445
82450
  return null;
82446
82451
  };
82447
82452
  DChartPlotAreaTwofoldCoorinateContainerSub.prototype.indexOf = function (coordinate) {
82448
- var result = this._primary.indexOf(coordinate);
82453
+ var primary = this._primary;
82454
+ var result = primary.indexOf(coordinate);
82449
82455
  if (0 <= result) {
82450
82456
  return result;
82451
82457
  }
82452
82458
  result = this._secondary.indexOf(coordinate);
82453
82459
  if (0 <= result) {
82454
- return this._primary.size() + result;
82460
+ return primary.size() + result;
82455
82461
  }
82456
82462
  return -1;
82457
82463
  };
@@ -82466,7 +82472,7 @@ var DChartPlotAreaTwofoldCoorinateContainerSub = /** @class */ (function () {
82466
82472
  var secondary = this._secondary;
82467
82473
  var secondarySize = secondary.size();
82468
82474
  if (primarySize <= index && index < primarySize + secondarySize) {
82469
- secondary.remove(index - primarySize);
82475
+ return secondary.remove(index - primarySize);
82470
82476
  }
82471
82477
  }
82472
82478
  else {
@@ -1,5 +1,5 @@
1
1
  /*
2
- Winter Cardinal UI v0.420.0
2
+ Winter Cardinal UI v0.423.0
3
3
  Copyright (C) 2019 Toshiba Corporation
4
4
  SPDX-License-Identifier: Apache-2.0
5
5
 
@@ -50672,6 +50672,8 @@
50672
50672
  var newWidth = options.isWidthFixed() ? options.getWidth() : bbox.width;
50673
50673
  var newHeight = options.isHeightFixed() ? options.getHeight() : bbox.height;
50674
50674
  this.renderer.resize(newWidth, newHeight);
50675
+ var wasLocked = this._isLocked;
50676
+ this._isLocked = true;
50675
50677
  var padding = this._padding;
50676
50678
  var children = this.stage.children;
50677
50679
  for (var i = 0, imax = children.length; i < imax; ++i) {
@@ -50680,7 +50682,10 @@
50680
50682
  child.onParentResize(newWidth, newHeight, padding);
50681
50683
  }
50682
50684
  }
50683
- this.update();
50685
+ this._isLocked = wasLocked;
50686
+ if (!this._isLocked && this._renderId == null) {
50687
+ this.render();
50688
+ }
50684
50689
  };
50685
50690
  DApplicationLayer.prototype.initWheelHandling = function () {
50686
50691
  var global = new pixi_js.Point();
@@ -61279,18 +61284,19 @@
61279
61284
  var secondary = this._secondary;
61280
61285
  var secondarySize = secondary.size();
61281
61286
  if (primarySize <= index && index < primarySize + secondarySize) {
61282
- secondary.get(index - primarySize);
61287
+ return secondary.get(index - primarySize);
61283
61288
  }
61284
61289
  return null;
61285
61290
  };
61286
61291
  DChartPlotAreaTwofoldCoorinateContainerSub.prototype.indexOf = function (coordinate) {
61287
- var result = this._primary.indexOf(coordinate);
61292
+ var primary = this._primary;
61293
+ var result = primary.indexOf(coordinate);
61288
61294
  if (0 <= result) {
61289
61295
  return result;
61290
61296
  }
61291
61297
  result = this._secondary.indexOf(coordinate);
61292
61298
  if (0 <= result) {
61293
- return this._primary.size() + result;
61299
+ return primary.size() + result;
61294
61300
  }
61295
61301
  return -1;
61296
61302
  };
@@ -61305,7 +61311,7 @@
61305
61311
  var secondary = this._secondary;
61306
61312
  var secondarySize = secondary.size();
61307
61313
  if (primarySize <= index && index < primarySize + secondarySize) {
61308
- secondary.remove(index - primarySize);
61314
+ return secondary.remove(index - primarySize);
61309
61315
  }
61310
61316
  }
61311
61317
  else {