@wcardinal/wcardinal-ui 0.421.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.
- package/dist/wcardinal/ui/d-application-layer.js +6 -1
- package/dist/wcardinal/ui/d-application-layer.js.map +1 -1
- package/dist/wcardinal-ui-theme-dark-en-us.js +1 -1
- package/dist/wcardinal-ui-theme-dark-en-us.min.js +1 -1
- package/dist/wcardinal-ui-theme-dark-ja-jp.js +1 -1
- package/dist/wcardinal-ui-theme-dark-ja-jp.min.js +1 -1
- package/dist/wcardinal-ui-theme-dark.js +1 -1
- package/dist/wcardinal-ui-theme-dark.min.js +1 -1
- package/dist/wcardinal-ui-theme-white-en-us.js +1 -1
- package/dist/wcardinal-ui-theme-white-en-us.min.js +1 -1
- package/dist/wcardinal-ui-theme-white-ja-jp.js +1 -1
- package/dist/wcardinal-ui-theme-white-ja-jp.min.js +1 -1
- package/dist/wcardinal-ui-theme-white.js +1 -1
- package/dist/wcardinal-ui-theme-white.min.js +1 -1
- package/dist/wcardinal-ui.cjs.js +7 -2
- package/dist/wcardinal-ui.js +7 -2
- package/dist/wcardinal-ui.min.js +2 -2
- package/dist/wcardinal-ui.min.js.map +1 -1
- package/package.json +1 -1
|
@@ -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.
|
|
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,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;Q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* 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;AAC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I,EAAE,EAAE,CAAC,EAAE;gBACtD,IAAM,KAAK,GAAG,QAAQ,CAAC,CAAC,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,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"]}
|
package/dist/wcardinal-ui.cjs.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*
|
|
2
|
-
Winter Cardinal UI v0.
|
|
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.
|
|
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();
|
package/dist/wcardinal-ui.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*
|
|
2
|
-
Winter Cardinal UI v0.
|
|
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.
|
|
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();
|