@wcardinal/wcardinal-ui 0.421.0 → 0.424.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.
@@ -29,6 +29,7 @@ export declare class DChartPlotAreaTwofold<CHART extends DBase = DBase, THEME ex
29
29
  protected _series: DChartPlotAreaTwofoldSeriesContainer<CHART>;
30
30
  protected _axis: DChartPlotAreaTwofoldAxisContainer<CHART>;
31
31
  constructor(chart: CHART, options?: OPTIONS);
32
+ onResize(newWidth: number, newHeight: number, oldWidth: number, oldHeight: number): void;
32
33
  protected addSeries(series: DChartSeriesContainer<CHART>, list?: DChartSeries<CHART>[]): void;
33
34
  protected addAxes(axis: DChartAxisContainer<CHART>, list?: DChartAxis<CHART>[]): void;
34
35
  get primary(): DChartPlotAreaTwofoldSubPrimary<CHART>;
@@ -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,O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,CAAC,CAAC;gBAC1B,IAAI,KAAK,YAAY,KAAK,EAAE;oBAC3B,KAAK,CAAC,MAAM,EAAE,CAAC;oBACf,OAAO;wBACN,OAAO,IAAI,KAAK,CAAC,OAAO,EAAE,IAAI,KAAK,CAAC,QAAQ,EAAE,IAAI,KAAK,CAAC,gBAAgB,EAAE,CAAC;iBAC5E;aACD;YAED,2EAA2E;YAC3E,IAAI,CAAC,OAAO,EAAE;gBACb,MAAM;aACN;SACD;IACF,CAAC;IAED,8CAAkB,GAAlB;QACC,OAAO,IAAI,CAAC,WAAW,CAAC,kBAAkB,EAAE,CAAC;IAC9C,CAAC;IAED,0CAAc,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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AAW,CAAC,kBAAkB,EAAE,CAAC;IAC9C,CAAC;IAED,0CAAc,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,AAzUD,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"]}
@@ -1 +1 @@
1
- {"version":3,"file":"d-chart-plot-area-base.js","sourceRoot":"","sources":["../../../src/main/typescript/wcardinal/ui/d-chart-plot-area-base.ts"],"names":[],"mappings":"AAAA;;;GAGG;;AAEH,OAAO,EAAwC,KAAK,EAAE,SAAS,EAAY,MAAM,SAAS,CAAC;AAC3F,OAAO,EAAE,KAAK,EAAE,MAAM,UAAU,CAAC;AAajC;IAKS,sCAAqB;IAoB7B,4BAAY,KAAY,EAAE,OAAiB;QAA3C,YACC,kBAAM,OAAO,CAAC,SAmBd;QAjBA,KAAI,CAAC,uBAAuB,GAAG,IAAI,CAAC;QACpC,KAAI,CAAC,gBAAgB,GAAG,IAAI,SAAS,EAAE,CAAC;QACxC,KAAI,CAAC,UAAU,GAAG,IAAI,KAAK,EAAE,CAAC;QAE9B,KAAI,CAAC,YAAY,GAAG,IAAI,SAAS,EAAE,CAAC;QAEpC,KAAI,CAAC,MAAM,GAAG,KAAK,CAAC;QAEpB,KAAI,CAAC,eAAe,GAAG,CAAC,CAAC;QACzB,KAAI,CAAC,cAAc,GAAG,IAAI,CAAC;QAC3B,KAAI,CAAC,aAAa,GAAG,IAAI,CAAC;QAC1B,KAAI,CAAC,aAAa,GAAG;YACpB,KAAI,CAAC,OAAO,EAAE,CAAC;QAChB,CAAC,CAAC;QAEF,KAAI,CAAC,YAAY,GAAG,IAAI,CAAC;QACzB,KAAI,CAAC,KAAK,GAAG,KAAI,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC;;IACpC,CAAC;IAED,qCAAQ,GAAR,UAAS,QAAgB,EAAE,SAAiB,E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C,SAAS,CAAC,eAAe,EAAE,CAAC;YAC5B,IAAM,SAAS,GAAG,SAAS,CAAC,SAAS,CAAC,cAAc,CAAC;YAErD,IAAM,IAAI,GAAG,IAAI,CAAC,UAAU,CAAC;YAE7B,IAAI,CAAC,GAAG,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;YACf,SAAS,CAAC,YAAY,CAAC,IAAI,EAAE,IAAI,CAAC,CAAC;YACnC,MAAM,CAAC,CAAC,GAAG,IAAI,CAAC,CAAC,CAAC;YAClB,MAAM,CAAC,CAAC,GAAG,IAAI,CAAC,CAAC,CAAC;YAElB,IAAI,CAAC,GAAG,CAAC,IAAI,CAAC,KAAK,EAAE,IAAI,CAAC,MAAM,CAAC,CAAC;YAClC,SAAS,CAAC,YAAY,CAAC,IAAI,EAAE,IAAI,CAAC,CAAC;YACnC,MAAM,CAAC,KAAK,GAAG,IAAI,CAAC,CAAC,GAAG,MAAM,CAAC,CAAC,CAAC;YACjC,MAAM,CAAC,MAAM,GAAG,IAAI,CAAC,CAAC,GAAG,MAAM,CAAC,CAAC,CAAC;SAClC;QACD,OAAO,MAAM,CAAC;IACf,CAAC;IAYS,oCAAO,GAAjB;QACC,OAAO,gBAAgB,CAAC;IACzB,CAAC;IACF,yBAAC;AAAD,CAAC,AA3KD,CAKS,KAAK,GAsKb","sourcesContent":["/*\n * Copyright (C) 2019 Toshiba Corporation\n * SPDX-License-Identifier: Apache-2.0\n */\n\nimport { InteractionEvent, InteractionManager, Point, Rectangle, Renderer } from \"pixi.js\";\nimport { DBase } from \"./d-base\";\nimport { DBaseOverflowMask } from \"./d-base-overflow-mask\";\nimport { DChartAxisContainer } from \"./d-chart-axis-container\";\nimport { DChartCoordinateContainer } from \"./d-chart-coordinate-container\";\nimport { DChartPlotArea, DThemeChartPlotArea, DChartPlotAreaOptions } from \"./d-chart-plot-area\";\nimport { DChartPlotAreaContainer } from \"./d-chart-plot-area-container\";\nimport { DChartSeriesContainer } from \"./d-chart-series-container\";\nimport { DView } from \"./d-view\";\nimport { DViewImpl } from \"./d-view-impl\";\nimport { UtilWheelEventDeltas } from \"./util/util-wheel-event\";\nimport { DChartRegion } from \"./d-chart-region\";\nimport { DChartAxisPosition } from \"./d-chart-axis-position\";\n\nexport abstract class DChartPlotAreaBase<\n\t\tCHART extends DBase = DBase,\n\t\tTHEME extends DThemeChartPlotArea = DThemeChartPlotArea,\n\t\tOPTIONS extends DChartPlotAreaOptions<CHART, THEME> = DChartPlotAreaOptions<CHART, THEME>\n\t>\n\textends DBase<THEME, OPTIONS>\n\timplements DChartPlotArea<CHART>\n{\n\tprotected _isContainerBoundsDirty: boolean;\n\tprotected _containerBounds: Rectangle;\n\tprotected _workPoint: Point;\n\n\tprotected _pixelBounds: Rectangle;\n\n\tprotected _chart: CHART;\n\n\tprotected _view: DViewImpl;\n\tprotected _isViewDirty: boolean;\n\tprotected _overflowMask?: DBaseOverflowMask | null;\n\n\tprotected _blendStartTime: number;\n\tprotected _blendDuration: number;\n\tprotected _blendTimeout: number | null;\n\tprotected _onBlendBound: () => void;\n\n\tconstructor(chart: CHART, options?: OPTIONS) {\n\t\tsuper(options);\n\n\t\tthis._isContainerBoundsDirty = true;\n\t\tthis._containerBounds = new Rectangle();\n\t\tthis._workPoint = new Point();\n\n\t\tthis._pixelBounds = new Rectangle();\n\n\t\tthis._chart = chart;\n\n\t\tthis._blendStartTime = 0;\n\t\tthis._blendDuration = 1000;\n\t\tthis._blendTimeout = null;\n\t\tthis._onBlendBound = () => {\n\t\t\tthis.onBlend();\n\t\t};\n\n\t\tthis._isViewDirty = true;\n\t\tthis._view = this.newView(options);\n\t}\n\n\tonResize(newWidth: number, newHeight: number, oldWidth: number, oldHeight: number): void {\n\t\tthis._isViewDirty = true;\n\t\tthis._isContainerBoundsDirty = true;\n\t\tsuper.onResize(newWidth, newHeight, oldWidth, oldHeight);\n\t}\n\n\tget chart(): CHART {\n\t\treturn this._chart;\n\t}\n\n\tabstract get coordinate(): DChartCoordinateContainer<CHART>;\n\n\tabstract get series(): DChartSeriesContainer<CHART>;\n\n\tabstract get container(): DChartPlotAreaContainer;\n\n\tabstract get axis(): DChartAxisContainer<CHART>;\n\n\tget view(): DView {\n\t\treturn this._view;\n\t}\n\n\tabstract newView(options?: OPTIONS): DViewImpl;\n\n\tprotected onWheel(e: WheelEvent, deltas: UtilWheelEventDeltas, global: Point): boolean {\n\t\tconst vresult = this._view.onWheel(e, deltas, global);\n\t\tconst sresult = super.onWheel(e, deltas, global);\n\t\treturn vresult || sresult;\n\t}\n\n\tprotected onDblClick(\n\t\te: MouseEvent | TouchEvent,\n\t\tinteractionManager: InteractionManager\n\t): boolean {\n\t\tconst vresult = this._view.onDblClick(e, interactionManager);\n\t\tconst sresult = super.onDblClick(e, interactionManager);\n\t\treturn vresult || sresult;\n\t}\n\n\tprotected onDown(e: InteractionEvent): void {\n\t\tthis._view.onDown(e);\n\t\tsuper.onDown(e);\n\t}\n\n\trender(renderer: Renderer): void {\n\t\tif (this._isViewDirty) {\n\t\t\tthis._isViewDirty = false;\n\t\t\tthis.onViewDirty();\n\t\t}\n\t\tsuper.render(renderer);\n\t}\n\n\tprotected abstract onViewDirty(): void;\n\n\tabstract destroy(): void;\n\n\tgetPixelDomain(result: DChartRegion): DChartRegion {\n\t\tconst padding = this.padding;\n\t\treturn result.set(padding.getLeft(), this.width - padding.getRight());\n\t}\n\n\tgetPixelRange(result: DChartRegion): DChartRegion {\n\t\tconst padding = this.padding;\n\t\treturn result.set(this.height - padding.getBottom(), padding.getTop());\n\t}\n\n\tgetPixelBounds(): Rectangle {\n\t\tconst result = this._pixelBounds;\n\t\tresult.x = 0;\n\t\tresult.y = 0;\n\t\tresult.width = this.width;\n\t\tresult.height = this.height;\n\t\treturn result;\n\t}\n\n\tgetAxisBounds(position: DChartAxisPosition): Rectangle {\n\t\treturn this.getPixelBounds();\n\t}\n\n\tgetSelectionBoundsX(): Rectangle {\n\t\treturn this.getPixelBounds();\n\t}\n\n\tgetSelectionBoundsY(): Rectangle {\n\t\treturn this.getPixelBounds();\n\t}\n\n\tgetContainerBounds(): Rectangle {\n\t\tconst result = this._containerBounds;\n\t\tif (this._isContainerBoundsDirty) {\n\t\t\tthis._isContainerBoundsDirty = false;\n\n\t\t\tconst container = this.container;\n\t\t\tcontainer.updateTransform();\n\t\t\tconst transform = container.transform.localTransform;\n\n\t\t\tconst work = this._workPoint;\n\n\t\t\twork.set(0, 0);\n\t\t\ttransform.applyInverse(work, work);\n\t\t\tresult.x = work.x;\n\t\t\tresult.y = work.y;\n\n\t\t\twork.set(this.width, this.height);\n\t\t\ttransform.applyInverse(work, work);\n\t\t\tresult.width = work.x - result.x;\n\t\t\tresult.height = work.y - result.y;\n\t\t}\n\t\treturn result;\n\t}\n\n\tabstract fit(\n\t\tduration?: number,\n\t\tdomainFrom?: number,\n\t\tdomainTo?: number,\n\t\trangeFrom?: number,\n\t\trangeTo?: number\n\t): this;\n\n\tprotected abstract onBlend(): void;\n\n\tprotected getType(): string {\n\t\treturn \"DChartPlotArea\";\n\t}\n}\n"]}
1
+ {"version":3,"file":"d-chart-plot-area-base.js","sourceRoot":"","sources":["../../../src/main/typescript/wcardinal/ui/d-chart-plot-area-base.ts"],"names":[],"mappings":"AAAA;;;GAGG;;AAEH,OAAO,EAAwC,KAAK,EAAE,SAAS,EAAY,MAAM,SAAS,CAAC;AAC3F,OAAO,EAAE,KAAK,EAAE,MAAM,UAAU,CAAC;AAajC;IAKS,sCAAqB;IAoB7B,4BAAY,KAAY,EAAE,OAAiB;QAA3C,YACC,kBAAM,OAAO,CAAC,SAmBd;QAjBA,KAAI,CAAC,uBAAuB,GAAG,IAAI,CAAC;QACpC,KAAI,CAAC,gBAAgB,GAAG,IAAI,SAAS,EAAE,CAAC;QACxC,KAAI,CAAC,UAAU,GAAG,IAAI,KAAK,EAAE,CAAC;QAE9B,KAAI,CAAC,YAAY,GAAG,IAAI,SAAS,EAAE,CAAC;QAEpC,KAAI,CAAC,MAAM,GAAG,KAAK,CAAC;QAEpB,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019 Toshiba Corporation\n * SPDX-License-Identifier: Apache-2.0\n */\n\nimport { InteractionEvent, InteractionManager, Point, Rectangle, Renderer } from \"pixi.js\";\nimport { DBase } from \"./d-base\";\nimport { DBaseOverflowMask } from \"./d-base-overflow-mask\";\nimport { DChartAxisContainer } from \"./d-chart-axis-container\";\nimport { DChartCoordinateContainer } from \"./d-chart-coordinate-container\";\nimport { DChartPlotArea, DThemeChartPlotArea, DChartPlotAreaOptions } from \"./d-chart-plot-area\";\nimport { DChartPlotAreaContainer } from \"./d-chart-plot-area-container\";\nimport { DChartSeriesContainer } from \"./d-chart-series-container\";\nimport { DView } from \"./d-view\";\nimport { DViewImpl } from \"./d-view-impl\";\nimport { UtilWheelEventDeltas } from \"./util/util-wheel-event\";\nimport { DChartRegion } from \"./d-chart-region\";\nimport { DChartAxisPosition } from \"./d-chart-axis-position\";\n\nexport abstract class DChartPlotAreaBase<\n\t\tCHART extends DBase = DBase,\n\t\tTHEME extends DThemeChartPlotArea = DThemeChartPlotArea,\n\t\tOPTIONS extends DChartPlotAreaOptions<CHART, THEME> = DChartPlotAreaOptions<CHART, THEME>\n\t>\n\textends DBase<THEME, OPTIONS>\n\timplements DChartPlotArea<CHART>\n{\n\tprotected _isContainerBoundsDirty: boolean;\n\tprotected _containerBounds: Rectangle;\n\tprotected _workPoint: Point;\n\n\tprotected _pixelBounds: Rectangle;\n\n\tprotected _chart: CHART;\n\n\tprotected _view: DViewImpl;\n\tprotected _isViewDirty: boolean;\n\tprotected _overflowMask?: DBaseOverflowMask | null;\n\n\tprotected _blendStartTime: number;\n\tprotected _blendDuration: number;\n\tprotected _blendTimeout: number | null;\n\tprotected _onBlendBound: () => void;\n\n\tconstructor(chart: CHART, options?: OPTIONS) {\n\t\tsuper(options);\n\n\t\tthis._isContainerBoundsDirty = true;\n\t\tthis._containerBounds = new Rectangle();\n\t\tthis._workPoint = new Point();\n\n\t\tthis._pixelBounds = new Rectangle();\n\n\t\tthis._chart = chart;\n\n\t\tthis._blendStartTime = 0;\n\t\tthis._blendDuration = 1000;\n\t\tthis._blendTimeout = null;\n\t\tthis._onBlendBound = () => {\n\t\t\tthis.onBlend();\n\t\t};\n\n\t\tthis._isViewDirty = true;\n\t\tthis._view = this.newView(options);\n\t}\n\n\toverride onResize(\n\t\tnewWidth: number,\n\t\tnewHeight: number,\n\t\toldWidth: number,\n\t\toldHeight: number\n\t): void {\n\t\tthis._isViewDirty = true;\n\t\tthis._isContainerBoundsDirty = true;\n\t\tsuper.onResize(newWidth, newHeight, oldWidth, oldHeight);\n\t}\n\n\tget chart(): CHART {\n\t\treturn this._chart;\n\t}\n\n\tabstract get coordinate(): DChartCoordinateContainer<CHART>;\n\n\tabstract get series(): DChartSeriesContainer<CHART>;\n\n\tabstract get container(): DChartPlotAreaContainer;\n\n\tabstract get axis(): DChartAxisContainer<CHART>;\n\n\tget view(): DView {\n\t\treturn this._view;\n\t}\n\n\tabstract newView(options?: OPTIONS): DViewImpl;\n\n\tprotected onWheel(e: WheelEvent, deltas: UtilWheelEventDeltas, global: Point): boolean {\n\t\tconst vresult = this._view.onWheel(e, deltas, global);\n\t\tconst sresult = super.onWheel(e, deltas, global);\n\t\treturn vresult || sresult;\n\t}\n\n\tprotected onDblClick(\n\t\te: MouseEvent | TouchEvent,\n\t\tinteractionManager: InteractionManager\n\t): boolean {\n\t\tconst vresult = this._view.onDblClick(e, interactionManager);\n\t\tconst sresult = super.onDblClick(e, interactionManager);\n\t\treturn vresult || sresult;\n\t}\n\n\tprotected onDown(e: InteractionEvent): void {\n\t\tthis._view.onDown(e);\n\t\tsuper.onDown(e);\n\t}\n\n\trender(renderer: Renderer): void {\n\t\tif (this._isViewDirty) {\n\t\t\tthis._isViewDirty = false;\n\t\t\tthis.onViewDirty();\n\t\t}\n\t\tsuper.render(renderer);\n\t}\n\n\tprotected abstract onViewDirty(): void;\n\n\tabstract destroy(): void;\n\n\tgetPixelDomain(result: DChartRegion): DChartRegion {\n\t\tconst padding = this.padding;\n\t\treturn result.set(padding.getLeft(), this.width - padding.getRight());\n\t}\n\n\tgetPixelRange(result: DChartRegion): DChartRegion {\n\t\tconst padding = this.padding;\n\t\treturn result.set(this.height - padding.getBottom(), padding.getTop());\n\t}\n\n\tgetPixelBounds(): Rectangle {\n\t\tconst result = this._pixelBounds;\n\t\tresult.x = 0;\n\t\tresult.y = 0;\n\t\tresult.width = this.width;\n\t\tresult.height = this.height;\n\t\treturn result;\n\t}\n\n\tgetAxisBounds(position: DChartAxisPosition): Rectangle {\n\t\treturn this.getPixelBounds();\n\t}\n\n\tgetSelectionBoundsX(): Rectangle {\n\t\treturn this.getPixelBounds();\n\t}\n\n\tgetSelectionBoundsY(): Rectangle {\n\t\treturn this.getPixelBounds();\n\t}\n\n\tgetContainerBounds(): Rectangle {\n\t\tconst result = this._containerBounds;\n\t\tif (this._isContainerBoundsDirty) {\n\t\t\tthis._isContainerBoundsDirty = false;\n\n\t\t\tconst container = this.container;\n\t\t\tcontainer.updateTransform();\n\t\t\tconst transform = container.transform.localTransform;\n\n\t\t\tconst work = this._workPoint;\n\n\t\t\twork.set(0, 0);\n\t\t\ttransform.applyInverse(work, work);\n\t\t\tresult.x = work.x;\n\t\t\tresult.y = work.y;\n\n\t\t\twork.set(this.width, this.height);\n\t\t\ttransform.applyInverse(work, work);\n\t\t\tresult.width = work.x - result.x;\n\t\t\tresult.height = work.y - result.y;\n\t\t}\n\t\treturn result;\n\t}\n\n\tabstract fit(\n\t\tduration?: number,\n\t\tdomainFrom?: number,\n\t\tdomainTo?: number,\n\t\trangeFrom?: number,\n\t\trangeTo?: number\n\t): this;\n\n\tprotected abstract onBlend(): void;\n\n\tprotected getType(): string {\n\t\treturn \"DChartPlotArea\";\n\t}\n}\n"]}
@@ -68,6 +68,11 @@ var DChartPlotAreaTwofold = /** @class */ (function (_super) {
68
68
  }
69
69
  return _this;
70
70
  }
71
+ DChartPlotAreaTwofold.prototype.onResize = function (newWidth, newHeight, oldWidth, oldHeight) {
72
+ this._primary.toBoundsDirty();
73
+ this._secondary.toBoundsDirty();
74
+ _super.prototype.onResize.call(this, newWidth, newHeight, oldWidth, oldHeight);
75
+ };
71
76
  DChartPlotAreaTwofold.prototype.addSeries = function (series, list) {
72
77
  if (list != null) {
73
78
  var listLength = list.length;
@@ -1 +1 @@
1
- {"version":3,"file":"d-chart-plot-area-twofold.js","sourceRoot":"","sources":["../../../src/main/typescript/wcardinal/ui/d-chart-plot-area-twofold.ts"],"names":[],"mappings":"AAAA;;;GAGG;;AAEH,OAAO,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AAIjD,OAAO,EAAE,kBAAkB,EAAE,MAAM,0BAA0B,CAAC;AAI9D,OAAO,EAAE,iBAAiB,EAAE,MAAM,uBAAuB,CAAC;AAC1D,OAAO,EAAE,uCAAuC,EAAE,MAAM,kDAAkD,CAAC;AAC3G,OAAO,EAAE,oCAAoC,EAAE,MAAM,8CAA8C,CAAC;AACpG,OAAO,EAAE,kCAAkC,EAAE,MAAM,4CAA4C,CAAC;AAGhG,OAAO,EAAE,+BAA+B,EAAE,MAAM,yCAAyC,CAAC;AAC1F,OAAO,EAAE,iCAAiC,EAAE,MAAM,2CAA2C,CAAC;AAG9F,OAAO,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AAC1C,OAAO,EAAE,+BAA+B,EAAE,MAAM,yCAAyC,CAAC;AAC1F,OAAO,EAAE,eAAe,EAAE,MAAM,SAAS,CAAC;AAa1C;IAOU,yCAAyC;IASlD,+BAAY,KAAY,EAAE,OAAiB;;QAA3C,YACC,kBAAM,KAAK,EAAE,OAAO,CAAC,SAqFrB;QAnFA,SAAS;QACT,IAAM,KAAK,GAAG,KAAI,CAAC,KAAK,CAAC;QACzB,IAAM,MAAM,GAAG,MAAA,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,MAAM,mCAAI,KAAK,CAAC,SAAS,EAAE,CAAC;QACpD,KAAI,CAAC,OAAO,GAAG,MAAM,CAAC;QAEtB,UAAU;QACV,IAAM,kBAAk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QAED,IAAM,CAAC,GAAG,iBAAiB,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC;QAC3C,IAAM,OAAO,GAAG,IAAI,CAAC,OAAO,CAAC;QAC7B,OAAO,CAAC,UAAU,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC;QAC5B,OAAO,CAAC,IAAI,CAAC,MAAM,EAAE,CAAC;QACtB,OAAO,CAAC,MAAM,CAAC,MAAM,EAAE,CAAC;QAExB,IAAM,SAAS,GAAG,IAAI,CAAC,SAAS,CAAC;QACjC,SAAS,CAAC,UAAU,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC;QAC9B,SAAS,CAAC,IAAI,CAAC,MAAM,EAAE,CAAC;QACxB,SAAS,CAAC,MAAM,CAAC,MAAM,EAAE,CAAC;IAC3B,CAAC;IAEQ,uCAAO,GAAhB;;QACC,MAAA,IAAI,CAAC,QAAQ,0CAAE,OAAO,EAAE,CAAC;QACzB,MAAA,IAAI,CAAC,UAAU,0CAAE,OAAO,EAAE,CAAC;QAC3B,IAAI,CAAC,KAAK,CAAC,OAAO,EAAE,CAAC;IACtB,CAAC;IACF,4BAAC;AAAD,CAAC,AAvOD,CAOU,kBAAkB,GAgO3B","sourcesContent":["/*\n * Copyright (C) 2019 Toshiba Corporation\n * SPDX-License-Identifier: Apache-2.0\n */\n\nimport { DApplications } from \"./d-applications\";\nimport { DBase } from \"./d-base\";\nimport { DThemeChartPlotArea, DChartPlotAreaOptions } from \"./d-chart-plot-area\";\nimport { DChartPlotAreaContainer } from \"./d-chart-plot-area-container\";\nimport { DChartPlotAreaBase } from \"./d-chart-plot-area-base\";\nimport { DChartSeriesContainer } from \"./d-chart-series-container\";\nimport { DChartCoordinateContainer } from \"./d-chart-coordinate-container\";\nimport { DChartAxisContainer, DChartAxisContainerOptions } from \"./d-chart-axis-container\";\nimport { DAnimationTimings } from \"./d-animation-timings\";\nimport { DChartPlotAreaTwofoldCoorinateContainer } from \"./d-chart-plot-area-twofold-coordinate-container\";\nimport { DChartPlotAreaTwofoldSeriesContainer } from \"./d-chart-plot-area-twofold-series-container\";\nimport { DChartPlotAreaTwofoldAxisContainer } from \"./d-chart-plot-area-twofold-axis-container\";\nimport { DChartSelection } from \"./d-chart-selection\";\nimport { DChartPlotAreaTwofoldSubOptions } from \"./d-chart-plot-area-twofold-sub\";\nimport { DChartPlotAreaTwofoldSubPrimary } from \"./d-chart-plot-area-twofold-sub-primary\";\nimport { DChartPlotAreaTwofoldSubSecondary } from \"./d-chart-plot-area-twofold-sub-secondary\";\nimport { DChartSeries } from \"./d-chart-series\";\nimport { DChartAxis } from \"./d-chart-axis\";\nimport { DViewImpl } from \"./d-view-impl\";\nimport { DChartPlotAreaTwofoldViewTarget } from \"./d-chart-plot-area-twofold-view-target\";\nimport { EShapeContainer } from \"./shape\";\n\nexport interface DChartPlotAreaTwofoldOptions<\n\tCHART extends DBase = DBase,\n\tTHEME extends DThemeChartPlotArea = DThemeChartPlotArea\n> extends DChartPlotAreaOptions<CHART, THEME> {\n\tprimary?: DChartPlotAreaTwofoldSubOptions<CHART>;\n\tsecondary?: DChartPlotAreaTwofoldSubOptions<CHART>;\n\tselection?: DChartSelection<CHART>;\n\taxis?: DChartAxisContainerOptions<CHART>;\n\tmargin?: number;\n}\n\nexport class DChartPlotAreaTwofold<\n\tCHART extends DBase = DBase,\n\tTHEME extends DThemeChartPlotArea = DThemeChartPlotArea,\n\tOPTIONS extends DChartPlotAreaTwofoldOptions<CHART, THEME> = DChartPlotAreaTwofoldOptions<\n\t\tCHART,\n\t\tTHEME\n\t>\n> extends DChartPlotAreaBase<CHART, THEME, OPTIONS> {\n\tprotected _primary: DChartPlotAreaTwofoldSubPrimary<CHART>;\n\tprotected _secondary: DChartPlotAreaTwofoldSubSecondary<CHART>;\n\tprotected _margin: number;\n\n\tprotected _coordinate: DChartCoordinateContainer<CHART>;\n\tprotected _series: DChartPlotAreaTwofoldSeriesContainer<CHART>;\n\tprotected _axis: DChartPlotAreaTwofoldAxisContainer<CHART>;\n\n\tconstructor(chart: CHART, options?: OPTIONS) {\n\t\tsuper(chart, options);\n\n\t\t// Margin\n\t\tconst theme = this.theme;\n\t\tconst margin = options?.margin ?? theme.getMargin();\n\t\tthis._margin = margin;\n\n\t\t// Primary\n\t\tconst axisShapeContainer = new EShapeContainer();\n\t\tconst onContainerChangeBound = (): void => {\n\t\t\tthis.onContainerChange();\n\t\t};\n\t\tconst mask = options?.mask ?? theme.isOverflowMaskEnabled();\n\t\tconst primaryOptions = options?.primary;\n\t\tconst primary = new DChartPlotAreaTwofoldSubPrimary<CHART>(\n\t\t\tthis,\n\t\t\tonContainerChangeBound,\n\t\t\tmask,\n\t\t\tmargin,\n\t\t\taxisShapeContainer,\n\t\t\tprimaryOptions\n\t\t);\n\t\tthis._primary = primary;\n\n\t\t// Secondary\n\t\tconst secondaryOptions = options?.secondary;\n\t\tconst secondary = new DChartPlotAreaTwofoldSubSecondary<CHART>(\n\t\t\tthis,\n\t\t\tonContainerChangeBound,\n\t\t\tmask,\n\t\t\tmargin,\n\t\t\taxisShapeContainer,\n\t\t\tsecondaryOptions\n\t\t);\n\t\tthis._secondary = secondary;\n\n\t\t// Container\n\t\tthis.addChild(primary.container);\n\t\tthis.addChild(secondary.container);\n\n\t\t// Coordinate\n\t\tthis._coordinate = new DChartPlotAreaTwofoldCoorinateContainer<CHART>(\n\t\t\tthis,\n\t\t\tprimary.coordinate,\n\t\t\tsecondary.coordinate\n\t\t);\n\n\t\t// Series\n\t\tconst primarySeries = primary.series;\n\t\tconst secondarySeries = secondary.series;\n\t\tconst series = new DChartPlotAreaTwofoldSeriesContainer<CHART>(\n\t\t\tthis,\n\t\t\tprimarySeries,\n\t\t\tsecondarySeries\n\t\t);\n\t\tthis._series = series;\n\n\t\t// Axis\n\t\tconst primaryAxis = primary.axis;\n\t\tconst secondaryAxis = secondary.axis;\n\t\tthis.addChild(axisShapeContainer);\n\t\tconst axis = new DChartPlotAreaTwofoldAxisContainer<CHART>(\n\t\t\tthis,\n\t\t\taxisShapeContainer,\n\t\t\tprimaryAxis,\n\t\t\tsecondaryAxis\n\t\t);\n\t\tthis._axis = axis;\n\n\t\t// Add Series\n\t\tthis.addSeries(primarySeries, primaryOptions?.series?.list);\n\t\tthis.addSeries(secondarySeries, secondaryOptions?.series?.list);\n\n\t\t// Add Axes\n\t\tthis.addAxes(primaryAxis, primaryOptions?.axis?.list);\n\t\tthis.addAxes(secondaryAxis, secondaryOptions?.axis?.list);\n\t\tthis.addAxes(axis, options?.axis?.list);\n\n\t\t// Selection\n\t\tconst selection = options?.selection;\n\t\tif (selection != null) {\n\t\t\tprimarySeries.selection = selection;\n\t\t\tsecondarySeries.selection = selection;\n\t\t\tselection.bind(series);\n\t\t}\n\t}\n\n\tprotected addSeries(series: DChartSeriesContainer<CHART>, list?: DChartSeries<CHART>[]): void {\n\t\tif (list != null) {\n\t\t\tconst listLength = list.length;\n\t\t\tif (0 < listLength) {\n\t\t\t\tfor (let i = 0; i < listLength; ++i) {\n\t\t\t\t\tseries.add(list[i]);\n\t\t\t\t}\n\t\t\t\tseries.update();\n\t\t\t}\n\t\t}\n\t}\n\n\tprotected addAxes(axis: DChartAxisContainer<CHART>, list?: DChartAxis<CHART>[]): void {\n\t\tif (list != null) {\n\t\t\tfor (let i = 0, imax = list.length; i < imax; ++i) {\n\t\t\t\taxis.add(list[i]);\n\t\t\t}\n\t\t}\n\t}\n\n\tget primary(): DChartPlotAreaTwofoldSubPrimary<CHART> {\n\t\treturn this._primary;\n\t}\n\n\tget secondary(): DChartPlotAreaTwofoldSubSecondary<CHART> {\n\t\treturn this._secondary;\n\t}\n\n\toverride get container(): DChartPlotAreaContainer {\n\t\treturn this.secondary.container;\n\t}\n\n\tprotected onContainerChange(): void {\n\t\tthis._isViewDirty = true;\n\t\tthis._isContainerBoundsDirty = true;\n\t\tthis._primary.toBoundsDirty();\n\t\tthis._secondary.toBoundsDirty();\n\t\tDApplications.update(this);\n\t}\n\n\toverride get coordinate(): DChartCoordinateContainer<CHART> {\n\t\treturn this._coordinate;\n\t}\n\n\toverride get series(): DChartSeriesContainer<CHART> {\n\t\treturn this._series;\n\t}\n\n\toverride get axis(): DChartAxisContainer<CHART> {\n\t\treturn this._axis;\n\t}\n\n\toverride newView(options?: OPTIONS): DViewImpl {\n\t\tlet viewTarget: DChartPlotAreaTwofoldViewTarget<CHART> | undefined;\n\t\tconst toViewTarget = () => {\n\t\t\treturn (viewTarget ??= new DChartPlotAreaTwofoldViewTarget<CHART>(\n\t\t\t\tthis._primary.container,\n\t\t\t\tthis._secondary.container\n\t\t\t));\n\t\t};\n\t\treturn new DViewImpl(this, toViewTarget, options?.view);\n\t}\n\n\tprotected override onViewDirty(): void {\n\t\tthis._coordinate.fit();\n\t\tthis._axis.onRender();\n\t\tthis._series.onRender();\n\t}\n\n\toverride fit(\n\t\tduration?: number,\n\t\tdomainFrom?: number,\n\t\tdomainTo?: number,\n\t\trangeFrom?: number,\n\t\trangeTo?: number\n\t): this {\n\t\tif (duration != null && duration <= 0) {\n\t\t\tconst primary = this.primary;\n\t\t\tprimary.coordinate.fit(domainFrom, domainTo, rangeFrom, rangeTo);\n\t\t\tprimary.axis.update();\n\t\t\tprimary.series.update();\n\n\t\t\tconst secondary = this.secondary;\n\t\t\tsecondary.coordinate.fit(domainFrom, domainTo, rangeFrom, rangeTo);\n\t\t\tsecondary.axis.update();\n\t\t\tsecondary.series.update();\n\t\t} else {\n\t\t\tthis._blendDuration = duration != null ? duration : 200;\n\t\t\tthis._blendStartTime = Date.now();\n\t\t\tthis.primary.coordinate.mark(domainFrom, domainTo, rangeFrom, rangeTo);\n\t\t\tthis.secondary.coordinate.mark(domainFrom, domainTo, rangeFrom, rangeTo);\n\t\t\tconst blendTimeout = this._blendTimeout;\n\t\t\tif (blendTimeout != null) {\n\t\t\t\twindow.clearTimeout(blendTimeout);\n\t\t\t}\n\t\t\tthis._blendTimeout = window.setTimeout(this._onBlendBound, 0);\n\t\t}\n\t\treturn this;\n\t}\n\n\tprotected onBlend(): void {\n\t\tconst now = Date.now();\n\t\tlet ratio = (now - this._blendStartTime) / this._blendDuration;\n\t\tif (ratio < 1) {\n\t\t\tthis._blendTimeout = window.setTimeout(this._onBlendBound, 0);\n\t\t} else {\n\t\t\tthis._blendTimeout = null;\n\t\t\tratio = 1;\n\t\t}\n\n\t\tconst t = DAnimationTimings.ELASTIC(ratio);\n\t\tconst primary = this.primary;\n\t\tprimary.coordinate.blend(t);\n\t\tprimary.axis.update();\n\t\tprimary.series.update();\n\n\t\tconst secondary = this.secondary;\n\t\tsecondary.coordinate.blend(t);\n\t\tsecondary.axis.update();\n\t\tsecondary.series.update();\n\t}\n\n\toverride destroy(): void {\n\t\tthis._primary?.destroy();\n\t\tthis._secondary?.destroy();\n\t\tthis._axis.destroy();\n\t}\n}\n"]}
1
+ {"version":3,"file":"d-chart-plot-area-twofold.js","sourceRoot":"","sources":["../../../src/main/typescript/wcardinal/ui/d-chart-plot-area-twofold.ts"],"names":[],"mappings":"AAAA;;;GAGG;;AAEH,OAAO,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AAIjD,OAAO,EAAE,kBAAkB,EAAE,MAAM,0BAA0B,CAAC;AAI9D,OAAO,EAAE,iBAAiB,EAAE,MAAM,uBAAuB,CAAC;AAC1D,OAAO,EAAE,uCAAuC,EAAE,MAAM,kDAAkD,CAAC;AAC3G,OAAO,EAAE,oCAAoC,EAAE,MAAM,8CAA8C,CAAC;AACpG,OAAO,EAAE,kCAAkC,EAAE,MAAM,4CAA4C,CAAC;AAGhG,OAAO,EAAE,+BAA+B,EAAE,MAAM,yCAAyC,CAAC;AAC1F,OAAO,EAAE,iCAAiC,EAAE,MAAM,2CAA2C,CAAC;AAG9F,OAAO,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AAC1C,OAAO,EAAE,+BAA+B,EAAE,MAAM,yCAAyC,CAAC;AAC1F,OAAO,EAAE,eAAe,EAAE,MAAM,SAAS,CAAC;AAa1C;IAOU,yCAAyC;IASlD,+BAAY,K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KAAK,CAAC,OAAO,EAAE,CAAC;IACtB,CAAC;IACF,4BAAC;AAAD,CAAC,AAlPD,CAOU,kBAAkB,GA2O3B","sourcesContent":["/*\n * Copyright (C) 2019 Toshiba Corporation\n * SPDX-License-Identifier: Apache-2.0\n */\n\nimport { DApplications } from \"./d-applications\";\nimport { DBase } from \"./d-base\";\nimport { DThemeChartPlotArea, DChartPlotAreaOptions } from \"./d-chart-plot-area\";\nimport { DChartPlotAreaContainer } from \"./d-chart-plot-area-container\";\nimport { DChartPlotAreaBase } from \"./d-chart-plot-area-base\";\nimport { DChartSeriesContainer } from \"./d-chart-series-container\";\nimport { DChartCoordinateContainer } from \"./d-chart-coordinate-container\";\nimport { DChartAxisContainer, DChartAxisContainerOptions } from \"./d-chart-axis-container\";\nimport { DAnimationTimings } from \"./d-animation-timings\";\nimport { DChartPlotAreaTwofoldCoorinateContainer } from \"./d-chart-plot-area-twofold-coordinate-container\";\nimport { DChartPlotAreaTwofoldSeriesContainer } from \"./d-chart-plot-area-twofold-series-container\";\nimport { DChartPlotAreaTwofoldAxisContainer } from \"./d-chart-plot-area-twofold-axis-container\";\nimport { DChartSelection } from \"./d-chart-selection\";\nimport { DChartPlotAreaTwofoldSubOptions } from \"./d-chart-plot-area-twofold-sub\";\nimport { DChartPlotAreaTwofoldSubPrimary } from \"./d-chart-plot-area-twofold-sub-primary\";\nimport { DChartPlotAreaTwofoldSubSecondary } from \"./d-chart-plot-area-twofold-sub-secondary\";\nimport { DChartSeries } from \"./d-chart-series\";\nimport { DChartAxis } from \"./d-chart-axis\";\nimport { DViewImpl } from \"./d-view-impl\";\nimport { DChartPlotAreaTwofoldViewTarget } from \"./d-chart-plot-area-twofold-view-target\";\nimport { EShapeContainer } from \"./shape\";\n\nexport interface DChartPlotAreaTwofoldOptions<\n\tCHART extends DBase = DBase,\n\tTHEME extends DThemeChartPlotArea = DThemeChartPlotArea\n> extends DChartPlotAreaOptions<CHART, THEME> {\n\tprimary?: DChartPlotAreaTwofoldSubOptions<CHART>;\n\tsecondary?: DChartPlotAreaTwofoldSubOptions<CHART>;\n\tselection?: DChartSelection<CHART>;\n\taxis?: DChartAxisContainerOptions<CHART>;\n\tmargin?: number;\n}\n\nexport class DChartPlotAreaTwofold<\n\tCHART extends DBase = DBase,\n\tTHEME extends DThemeChartPlotArea = DThemeChartPlotArea,\n\tOPTIONS extends DChartPlotAreaTwofoldOptions<CHART, THEME> = DChartPlotAreaTwofoldOptions<\n\t\tCHART,\n\t\tTHEME\n\t>\n> extends DChartPlotAreaBase<CHART, THEME, OPTIONS> {\n\tprotected _primary: DChartPlotAreaTwofoldSubPrimary<CHART>;\n\tprotected _secondary: DChartPlotAreaTwofoldSubSecondary<CHART>;\n\tprotected _margin: number;\n\n\tprotected _coordinate: DChartCoordinateContainer<CHART>;\n\tprotected _series: DChartPlotAreaTwofoldSeriesContainer<CHART>;\n\tprotected _axis: DChartPlotAreaTwofoldAxisContainer<CHART>;\n\n\tconstructor(chart: CHART, options?: OPTIONS) {\n\t\tsuper(chart, options);\n\n\t\t// Margin\n\t\tconst theme = this.theme;\n\t\tconst margin = options?.margin ?? theme.getMargin();\n\t\tthis._margin = margin;\n\n\t\t// Primary\n\t\tconst axisShapeContainer = new EShapeContainer();\n\t\tconst onContainerChangeBound = (): void => {\n\t\t\tthis.onContainerChange();\n\t\t};\n\t\tconst mask = options?.mask ?? theme.isOverflowMaskEnabled();\n\t\tconst primaryOptions = options?.primary;\n\t\tconst primary = new DChartPlotAreaTwofoldSubPrimary<CHART>(\n\t\t\tthis,\n\t\t\tonContainerChangeBound,\n\t\t\tmask,\n\t\t\tmargin,\n\t\t\taxisShapeContainer,\n\t\t\tprimaryOptions\n\t\t);\n\t\tthis._primary = primary;\n\n\t\t// Secondary\n\t\tconst secondaryOptions = options?.secondary;\n\t\tconst secondary = new DChartPlotAreaTwofoldSubSecondary<CHART>(\n\t\t\tthis,\n\t\t\tonContainerChangeBound,\n\t\t\tmask,\n\t\t\tmargin,\n\t\t\taxisShapeContainer,\n\t\t\tsecondaryOptions\n\t\t);\n\t\tthis._secondary = secondary;\n\n\t\t// Container\n\t\tthis.addChild(primary.container);\n\t\tthis.addChild(secondary.container);\n\n\t\t// Coordinate\n\t\tthis._coordinate = new DChartPlotAreaTwofoldCoorinateContainer<CHART>(\n\t\t\tthis,\n\t\t\tprimary.coordinate,\n\t\t\tsecondary.coordinate\n\t\t);\n\n\t\t// Series\n\t\tconst primarySeries = primary.series;\n\t\tconst secondarySeries = secondary.series;\n\t\tconst series = new DChartPlotAreaTwofoldSeriesContainer<CHART>(\n\t\t\tthis,\n\t\t\tprimarySeries,\n\t\t\tsecondarySeries\n\t\t);\n\t\tthis._series = series;\n\n\t\t// Axis\n\t\tconst primaryAxis = primary.axis;\n\t\tconst secondaryAxis = secondary.axis;\n\t\tthis.addChild(axisShapeContainer);\n\t\tconst axis = new DChartPlotAreaTwofoldAxisContainer<CHART>(\n\t\t\tthis,\n\t\t\taxisShapeContainer,\n\t\t\tprimaryAxis,\n\t\t\tsecondaryAxis\n\t\t);\n\t\tthis._axis = axis;\n\n\t\t// Add Series\n\t\tthis.addSeries(primarySeries, primaryOptions?.series?.list);\n\t\tthis.addSeries(secondarySeries, secondaryOptions?.series?.list);\n\n\t\t// Add Axes\n\t\tthis.addAxes(primaryAxis, primaryOptions?.axis?.list);\n\t\tthis.addAxes(secondaryAxis, secondaryOptions?.axis?.list);\n\t\tthis.addAxes(axis, options?.axis?.list);\n\n\t\t// Selection\n\t\tconst selection = options?.selection;\n\t\tif (selection != null) {\n\t\t\tprimarySeries.selection = selection;\n\t\t\tsecondarySeries.selection = selection;\n\t\t\tselection.bind(series);\n\t\t}\n\t}\n\n\toverride onResize(\n\t\tnewWidth: number,\n\t\tnewHeight: number,\n\t\toldWidth: number,\n\t\toldHeight: number\n\t): void {\n\t\tthis._primary.toBoundsDirty();\n\t\tthis._secondary.toBoundsDirty();\n\t\tsuper.onResize(newWidth, newHeight, oldWidth, oldHeight);\n\t}\n\n\tprotected addSeries(series: DChartSeriesContainer<CHART>, list?: DChartSeries<CHART>[]): void {\n\t\tif (list != null) {\n\t\t\tconst listLength = list.length;\n\t\t\tif (0 < listLength) {\n\t\t\t\tfor (let i = 0; i < listLength; ++i) {\n\t\t\t\t\tseries.add(list[i]);\n\t\t\t\t}\n\t\t\t\tseries.update();\n\t\t\t}\n\t\t}\n\t}\n\n\tprotected addAxes(axis: DChartAxisContainer<CHART>, list?: DChartAxis<CHART>[]): void {\n\t\tif (list != null) {\n\t\t\tfor (let i = 0, imax = list.length; i < imax; ++i) {\n\t\t\t\taxis.add(list[i]);\n\t\t\t}\n\t\t}\n\t}\n\n\tget primary(): DChartPlotAreaTwofoldSubPrimary<CHART> {\n\t\treturn this._primary;\n\t}\n\n\tget secondary(): DChartPlotAreaTwofoldSubSecondary<CHART> {\n\t\treturn this._secondary;\n\t}\n\n\toverride get container(): DChartPlotAreaContainer {\n\t\treturn this.secondary.container;\n\t}\n\n\tprotected onContainerChange(): void {\n\t\tthis._isViewDirty = true;\n\t\tthis._isContainerBoundsDirty = true;\n\t\tthis._primary.toBoundsDirty();\n\t\tthis._secondary.toBoundsDirty();\n\t\tDApplications.update(this);\n\t}\n\n\toverride get coordinate(): DChartCoordinateContainer<CHART> {\n\t\treturn this._coordinate;\n\t}\n\n\toverride get series(): DChartSeriesContainer<CHART> {\n\t\treturn this._series;\n\t}\n\n\toverride get axis(): DChartAxisContainer<CHART> {\n\t\treturn this._axis;\n\t}\n\n\toverride newView(options?: OPTIONS): DViewImpl {\n\t\tlet viewTarget: DChartPlotAreaTwofoldViewTarget<CHART> | undefined;\n\t\tconst toViewTarget = () => {\n\t\t\treturn (viewTarget ??= new DChartPlotAreaTwofoldViewTarget<CHART>(\n\t\t\t\tthis._primary.container,\n\t\t\t\tthis._secondary.container\n\t\t\t));\n\t\t};\n\t\treturn new DViewImpl(this, toViewTarget, options?.view);\n\t}\n\n\tprotected override onViewDirty(): void {\n\t\tthis._coordinate.fit();\n\t\tthis._axis.onRender();\n\t\tthis._series.onRender();\n\t}\n\n\toverride fit(\n\t\tduration?: number,\n\t\tdomainFrom?: number,\n\t\tdomainTo?: number,\n\t\trangeFrom?: number,\n\t\trangeTo?: number\n\t): this {\n\t\tif (duration != null && duration <= 0) {\n\t\t\tconst primary = this.primary;\n\t\t\tprimary.coordinate.fit(domainFrom, domainTo, rangeFrom, rangeTo);\n\t\t\tprimary.axis.update();\n\t\t\tprimary.series.update();\n\n\t\t\tconst secondary = this.secondary;\n\t\t\tsecondary.coordinate.fit(domainFrom, domainTo, rangeFrom, rangeTo);\n\t\t\tsecondary.axis.update();\n\t\t\tsecondary.series.update();\n\t\t} else {\n\t\t\tthis._blendDuration = duration != null ? duration : 200;\n\t\t\tthis._blendStartTime = Date.now();\n\t\t\tthis.primary.coordinate.mark(domainFrom, domainTo, rangeFrom, rangeTo);\n\t\t\tthis.secondary.coordinate.mark(domainFrom, domainTo, rangeFrom, rangeTo);\n\t\t\tconst blendTimeout = this._blendTimeout;\n\t\t\tif (blendTimeout != null) {\n\t\t\t\twindow.clearTimeout(blendTimeout);\n\t\t\t}\n\t\t\tthis._blendTimeout = window.setTimeout(this._onBlendBound, 0);\n\t\t}\n\t\treturn this;\n\t}\n\n\tprotected onBlend(): void {\n\t\tconst now = Date.now();\n\t\tlet ratio = (now - this._blendStartTime) / this._blendDuration;\n\t\tif (ratio < 1) {\n\t\t\tthis._blendTimeout = window.setTimeout(this._onBlendBound, 0);\n\t\t} else {\n\t\t\tthis._blendTimeout = null;\n\t\t\tratio = 1;\n\t\t}\n\n\t\tconst t = DAnimationTimings.ELASTIC(ratio);\n\t\tconst primary = this.primary;\n\t\tprimary.coordinate.blend(t);\n\t\tprimary.axis.update();\n\t\tprimary.series.update();\n\n\t\tconst secondary = this.secondary;\n\t\tsecondary.coordinate.blend(t);\n\t\tsecondary.axis.update();\n\t\tsecondary.series.update();\n\t}\n\n\toverride destroy(): void {\n\t\tthis._primary?.destroy();\n\t\tthis._secondary?.destroy();\n\t\tthis._axis.destroy();\n\t}\n}\n"]}
@@ -1,5 +1,5 @@
1
1
  /*
2
- Winter Cardinal UI v0.421.0
2
+ Winter Cardinal UI v0.424.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.421.0
2
+ Winter Cardinal UI v0.424.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.421.0
2
+ Winter Cardinal UI v0.424.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.421.0
2
+ Winter Cardinal UI v0.424.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.421.0
2
+ Winter Cardinal UI v0.424.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.421.0
2
+ Winter Cardinal UI v0.424.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.421.0
2
+ Winter Cardinal UI v0.424.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.421.0
2
+ Winter Cardinal UI v0.424.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.421.0
2
+ Winter Cardinal UI v0.424.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.421.0
2
+ Winter Cardinal UI v0.424.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.421.0
2
+ Winter Cardinal UI v0.424.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.421.0
2
+ Winter Cardinal UI v0.424.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.421.0
2
+ Winter Cardinal UI v0.424.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();
@@ -83127,6 +83132,11 @@ var DChartPlotAreaTwofold = /** @class */ (function (_super) {
83127
83132
  }
83128
83133
  return _this;
83129
83134
  }
83135
+ DChartPlotAreaTwofold.prototype.onResize = function (newWidth, newHeight, oldWidth, oldHeight) {
83136
+ this._primary.toBoundsDirty();
83137
+ this._secondary.toBoundsDirty();
83138
+ _super.prototype.onResize.call(this, newWidth, newHeight, oldWidth, oldHeight);
83139
+ };
83130
83140
  DChartPlotAreaTwofold.prototype.addSeries = function (series, list) {
83131
83141
  if (list != null) {
83132
83142
  var listLength = list.length;
@@ -1,5 +1,5 @@
1
1
  /*
2
- Winter Cardinal UI v0.421.0
2
+ Winter Cardinal UI v0.424.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();
@@ -61966,6 +61971,11 @@
61966
61971
  }
61967
61972
  return _this;
61968
61973
  }
61974
+ DChartPlotAreaTwofold.prototype.onResize = function (newWidth, newHeight, oldWidth, oldHeight) {
61975
+ this._primary.toBoundsDirty();
61976
+ this._secondary.toBoundsDirty();
61977
+ _super.prototype.onResize.call(this, newWidth, newHeight, oldWidth, oldHeight);
61978
+ };
61969
61979
  DChartPlotAreaTwofold.prototype.addSeries = function (series, list) {
61970
61980
  if (list != null) {
61971
61981
  var listLength = list.length;