@wcardinal/wcardinal-ui 0.247.0 → 0.249.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 DPaneScrollBar<PARENT extends DPaneScrollBarParent = DPaneS
29
29
  lock(): void;
30
30
  unlock(callIfNeeded: boolean): void;
31
31
  update(silently?: boolean): void;
32
+ touch(silently?: boolean): void;
32
33
  protected getOffsetHorizontalStart(size: number): number;
33
34
  protected getOffsetHorizontalEnd(size: number): number;
34
35
  protected getOffsetVerticalStart(size: number): number;
@@ -1,4 +1,4 @@
1
- import { Point, Rectangle } from "pixi.js";
1
+ import { interaction, Point, Rectangle } from "pixi.js";
2
2
  import { DBase, DBaseOptions, DThemeBase } from "./d-base";
3
3
  import { DBaseOverflowMask } from "./d-base-overflow-mask";
4
4
  import { DContentOptions } from "./d-content";
@@ -53,6 +53,7 @@ export declare class DPane<THEME extends DThemePane = DThemePane, CONTENT_OPTION
53
53
  protected initScrollBar(scrollbar: DPaneScrollBar): void;
54
54
  protected onScrollBarMoveX(start: number): void;
55
55
  protected onScrollBarMoveY(start: number): void;
56
+ protected onOver(e: interaction.InteractionEvent): void;
56
57
  protected getType(): string;
57
58
  get content(): DBase;
58
59
  protected toContent(options?: OPTIONS): DBase;
@@ -27,6 +27,7 @@ export declare abstract class DScrollBar<THEME extends DThemeScrollBar = DThemeS
27
27
  get end(): number;
28
28
  set(start: number, end: number, size: number, silently?: boolean): void;
29
29
  protected onChange(silently?: boolean): void;
30
+ touch(silently?: boolean): void;
30
31
  isRegionVisible(): boolean;
31
32
  render(renderer: PIXI.Renderer): void;
32
33
  onResize(newWidth: number, newHeight: number, oldWidth: number, oldHeight: number): void;
@@ -56,6 +56,10 @@ var DPaneScrollBar = /** @class */ (function () {
56
56
  horizontal.width = width - horizontalOffsetStart - horizontalOffsetEnd;
57
57
  this._onUpdate(vertical.isRegionVisible() || horizontal.isRegionVisible());
58
58
  };
59
+ DPaneScrollBar.prototype.touch = function (silently) {
60
+ this.vertical.touch(silently);
61
+ this.horizontal.touch(silently);
62
+ };
59
63
  DPaneScrollBar.prototype.getOffsetHorizontalStart = function (size) {
60
64
  return size * 0.5;
61
65
  };
@@ -1 +1 @@
1
- {"version":3,"file":"d-pane-scrollbar.js","sourceRoot":"","sources":["../../../src/main/typescript/wcardinal/ui/d-pane-scrollbar.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,oBAAoB,EAAE,MAAM,2BAA2B,CAAC;AACjE,OAAO,EAAE,kBAAkB,EAAE,MAAM,yBAAyB,CAAC;AAoB7D;IAUC,wBACC,MAAc,EACd,OAA0C,EAC1C,QAA4C;QAE5C,IAAI,CAAC,OAAO,GAAG,MAAM,CAAC;QACtB,IAAI,CAAC,SAAS,GAAG,QAAQ,CAAC;QAC1B,IAAI,CAAC,SAAS,GAAG,CAAC,CAAC;QACnB,IAAI,CAAC,SAAS,GAAG,KAAK,CAAC;QACvB,IAAI,CAAC,QAAQ,GAAG,IAAI,kBAAkB,CAAC,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,QAAQ,CAAC,CAAC;QAC1D,IAAI,CAAC,UAAU,GAAG,IAAI,oBAAoB,CAAC,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,UAAU,CAAC,CAAC;IACjE,CAAC;IAED,6BAAI,GAAJ;QACC,IAAI,CAAC,SAAS,IAAI,CAAC,CAAC;QACpB,IAAI,IAAI,CAAC,SAAS,KAAK,CAAC,EAAE;YACzB,IAAI,CAAC,SAAS,GAAG,KAAK,CAAC;YACvB,IAAI,CAAC,iBAAiB,GAAG,SAAS,CAAC;SACnC;IACF,CAAC;IAED,+BAAM,GAAN,UAAO,YAAqB;QAC3B,IAAI,CAAC,SAAS,IAAI,CAAC,CAAC;QACpB,IAAI,IAAI,CAAC,SAAS,KAAK,CAAC,EAAE;YACzB,IAAI,YAAY,IAAI,IAAI,CAAC,SAAS,EAAE;gBACnC,IAAI,CAAC,MAAM,C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,UAAU,GAAG,IAAI,CAAC,UAAU,CAAC;QACnC,IAAM,gBAAgB,GAAG,UAAU,CAAC,MAAM,CAAC;QAC3C,IAAM,qBAAqB,GAAG,IAAI,CAAC,wBAAwB,CAAC,gBAAgB,CAAC,CAAC;QAC9E,IAAM,mBAAmB,GAAG,IAAI,CAAC,sBAAsB,CAAC,gBAAgB,CAAC,CAAC;QAC1E,UAAU,CAAC,GAAG,CAAC,CAAC,EAAE,CAAC,GAAG,KAAK,EAAE,OAAO,CAAC,KAAK,EAAE,QAAQ,CAAC,CAAC;QACtD,UAAU,CAAC,QAAQ,CAAC,GAAG,CAAC,qBAAqB,EAAE,MAAM,GAAG,gBAAgB,CAAC,CAAC;QAC1E,UAAU,CAAC,KAAK,GAAG,KAAK,GAAG,qBAAqB,GAAG,mBAAmB,CAAC;QAEvE,IAAI,CAAC,SAAS,CAAC,QAAQ,CAAC,eAAe,EAAE,IAAI,UAAU,CAAC,eAAe,EAAE,CAAC,CAAC;IAC5E,CAAC;IAES,iDAAwB,GAAlC,UAAmC,IAAY;QAC9C,OAAO,IAAI,GAAG,GAAG,CAAC;IACnB,CAAC;IAES,+CAAsB,GAAhC,UAAiC,IAAY;QAC5C,OAAO,IAAI,GAAG,GAAG,CAAC;IACnB,CAAC;IAES,+CAAsB,GAAhC,UAAiC,IAAY;QAC5C,OAAO,IAAI,GAAG,GAAG,CAAC;IACnB,CAAC;IAES,6CAAoB,GAA9B,UAA+B,IAAY;QAC1C,OAAO,IAAI,GAAG,GAAG,CAAC;IACnB,CAAC;IACF,qBAAC;AAAD,CAAC,AA5FD,IA4FC","sourcesContent":["import { DApplicationTarget } from \"./d-application-like\";\nimport { DScrollBarOptions } from \"./d-scroll-bar\";\nimport { DScrollBarHorizontal } from \"./d-scroll-bar-horizontal\";\nimport { DScrollBarVertical } from \"./d-scroll-bar-vertical\";\n\nexport interface DPaneScrollBarOptions {\n\tvertical?: DScrollBarOptions;\n\thorizontal?: DScrollBarOptions;\n}\n\nexport interface DPaneScrollBarParent extends DApplicationTarget {\n\twidth: number;\n\theight: number;\n\tcontent: DPaneScrollBarContent;\n}\n\nexport interface DPaneScrollBarContent {\n\tx: number;\n\ty: number;\n\twidth: number;\n\theight: number;\n}\n\nexport class DPaneScrollBar<PARENT extends DPaneScrollBarParent = DPaneScrollBarParent> {\n\tprotected _parent: PARENT;\n\tprotected _onUpdate: (isRegionVisible: boolean) => void;\n\treadonly vertical: DScrollBarVertical;\n\treadonly horizontal: DScrollBarHorizontal;\n\n\tprotected _isLocked: number;\n\tprotected _isCalled: boolean;\n\tprotected _isCalledSilently?: boolean;\n\n\tconstructor(\n\t\tparent: PARENT,\n\t\toptions: DPaneScrollBarOptions | undefined,\n\t\tonUpdate: (isRegionVisible: boolean) => void\n\t) {\n\t\tthis._parent = parent;\n\t\tthis._onUpdate = onUpdate;\n\t\tthis._isLocked = 0;\n\t\tthis._isCalled = false;\n\t\tthis.vertical = new DScrollBarVertical(options?.vertical);\n\t\tthis.horizontal = new DScrollBarHorizontal(options?.horizontal);\n\t}\n\n\tlock(): void {\n\t\tthis._isLocked += 1;\n\t\tif (this._isLocked === 1) {\n\t\t\tthis._isCalled = false;\n\t\t\tthis._isCalledSilently = undefined;\n\t\t}\n\t}\n\n\tunlock(callIfNeeded: boolean): void {\n\t\tthis._isLocked -= 1;\n\t\tif (this._isLocked === 0) {\n\t\t\tif (callIfNeeded && this._isCalled) {\n\t\t\t\tthis.update(this._isCalledSilently);\n\t\t\t}\n\t\t\tthis._isCalled = false;\n\t\t\tthis._isCalledSilently = undefined;\n\t\t}\n\t}\n\n\tupdate(silently?: boolean): void {\n\t\tif (0 < this._isLocked) {\n\t\t\tthis._isCalled = true;\n\t\t\tif (silently != null) {\n\t\t\t\tthis._isCalledSilently ||= silently;\n\t\t\t}\n\t\t\treturn;\n\t\t}\n\n\t\tconst parent = this._parent;\n\t\tconst width = parent.width;\n\t\tconst height = parent.height;\n\t\tconst content = parent.content;\n\t\tconst x = -content.x;\n\t\tconst y = -content.y;\n\n\t\tconst vertical = this.vertical;\n\t\tconst verticalWidth = vertical.width;\n\t\tconst verticalOffsetStart = this.getOffsetVerticalStart(verticalWidth);\n\t\tconst verticalOffsetEnd = this.getOffsetVerticalEnd(verticalWidth);\n\t\tvertical.set(y, y + height, content.height, silently);\n\t\tvertical.position.set(width - verticalWidth, verticalOffsetStart);\n\t\tvertical.height = height - verticalOffsetStart - verticalOffsetEnd;\n\n\t\tconst horizontal = this.horizontal;\n\t\tconst horizontalHeight = horizontal.height;\n\t\tconst horizontalOffsetStart = this.getOffsetHorizontalStart(horizontalHeight);\n\t\tconst horizontalOffsetEnd = this.getOffsetHorizontalEnd(horizontalHeight);\n\t\thorizontal.set(x, x + width, content.width, silently);\n\t\thorizontal.position.set(horizontalOffsetStart, height - horizontalHeight);\n\t\thorizontal.width = width - horizontalOffsetStart - horizontalOffsetEnd;\n\n\t\tthis._onUpdate(vertical.isRegionVisible() || horizontal.isRegionVisible());\n\t}\n\n\tprotected getOffsetHorizontalStart(size: number): number {\n\t\treturn size * 0.5;\n\t}\n\n\tprotected getOffsetHorizontalEnd(size: number): number {\n\t\treturn size * 0.5;\n\t}\n\n\tprotected getOffsetVerticalStart(size: number): number {\n\t\treturn size * 0.5;\n\t}\n\n\tprotected getOffsetVerticalEnd(size: number): number {\n\t\treturn size * 0.5;\n\t}\n}\n"]}
1
+ {"version":3,"file":"d-pane-scrollbar.js","sourceRoot":"","sources":["../../../src/main/typescript/wcardinal/ui/d-pane-scrollbar.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,oBAAoB,EAAE,MAAM,2BAA2B,CAAC;AACjE,OAAO,EAAE,kBAAkB,EAAE,MAAM,yBAAyB,CAAC;AAoB7D;IAUC,wBACC,MAAc,EACd,OAA0C,EAC1C,QAA4C;QAE5C,IAAI,CAAC,OAAO,GAAG,MAAM,CAAC;QACtB,IAAI,CAAC,SAAS,GAAG,QAAQ,CAAC;QAC1B,IAAI,CAAC,SAAS,GAAG,CAAC,CAA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AC,eAAe,EAAE,IAAI,UAAU,CAAC,eAAe,EAAE,CAAC,CAAC;IAC5E,CAAC;IAED,8BAAK,GAAL,UAAM,QAAkB;QACvB,IAAI,CAAC,QAAQ,CAAC,KAAK,CAAC,QAAQ,CAAC,CAAC;QAC9B,IAAI,CAAC,UAAU,CAAC,KAAK,CAAC,QAAQ,CAAC,CAAC;IACjC,CAAC;IAES,iDAAwB,GAAlC,UAAmC,IAAY;QAC9C,OAAO,IAAI,GAAG,GAAG,CAAC;IACnB,CAAC;IAES,+CAAsB,GAAhC,UAAiC,IAAY;QAC5C,OAAO,IAAI,GAAG,GAAG,CAAC;IACnB,CAAC;IAES,+CAAsB,GAAhC,UAAiC,IAAY;QAC5C,OAAO,IAAI,GAAG,GAAG,CAAC;IACnB,CAAC;IAES,6CAAoB,GAA9B,UAA+B,IAAY;QAC1C,OAAO,IAAI,GAAG,GAAG,CAAC;IACnB,CAAC;IACF,qBAAC;AAAD,CAAC,AAjGD,IAiGC","sourcesContent":["import { DApplicationTarget } from \"./d-application-like\";\nimport { DScrollBarOptions } from \"./d-scroll-bar\";\nimport { DScrollBarHorizontal } from \"./d-scroll-bar-horizontal\";\nimport { DScrollBarVertical } from \"./d-scroll-bar-vertical\";\n\nexport interface DPaneScrollBarOptions {\n\tvertical?: DScrollBarOptions;\n\thorizontal?: DScrollBarOptions;\n}\n\nexport interface DPaneScrollBarParent extends DApplicationTarget {\n\twidth: number;\n\theight: number;\n\tcontent: DPaneScrollBarContent;\n}\n\nexport interface DPaneScrollBarContent {\n\tx: number;\n\ty: number;\n\twidth: number;\n\theight: number;\n}\n\nexport class DPaneScrollBar<PARENT extends DPaneScrollBarParent = DPaneScrollBarParent> {\n\tprotected _parent: PARENT;\n\tprotected _onUpdate: (isRegionVisible: boolean) => void;\n\treadonly vertical: DScrollBarVertical;\n\treadonly horizontal: DScrollBarHorizontal;\n\n\tprotected _isLocked: number;\n\tprotected _isCalled: boolean;\n\tprotected _isCalledSilently?: boolean;\n\n\tconstructor(\n\t\tparent: PARENT,\n\t\toptions: DPaneScrollBarOptions | undefined,\n\t\tonUpdate: (isRegionVisible: boolean) => void\n\t) {\n\t\tthis._parent = parent;\n\t\tthis._onUpdate = onUpdate;\n\t\tthis._isLocked = 0;\n\t\tthis._isCalled = false;\n\t\tthis.vertical = new DScrollBarVertical(options?.vertical);\n\t\tthis.horizontal = new DScrollBarHorizontal(options?.horizontal);\n\t}\n\n\tlock(): void {\n\t\tthis._isLocked += 1;\n\t\tif (this._isLocked === 1) {\n\t\t\tthis._isCalled = false;\n\t\t\tthis._isCalledSilently = undefined;\n\t\t}\n\t}\n\n\tunlock(callIfNeeded: boolean): void {\n\t\tthis._isLocked -= 1;\n\t\tif (this._isLocked === 0) {\n\t\t\tif (callIfNeeded && this._isCalled) {\n\t\t\t\tthis.update(this._isCalledSilently);\n\t\t\t}\n\t\t\tthis._isCalled = false;\n\t\t\tthis._isCalledSilently = undefined;\n\t\t}\n\t}\n\n\tupdate(silently?: boolean): void {\n\t\tif (0 < this._isLocked) {\n\t\t\tthis._isCalled = true;\n\t\t\tif (silently != null) {\n\t\t\t\tthis._isCalledSilently ||= silently;\n\t\t\t}\n\t\t\treturn;\n\t\t}\n\n\t\tconst parent = this._parent;\n\t\tconst width = parent.width;\n\t\tconst height = parent.height;\n\t\tconst content = parent.content;\n\t\tconst x = -content.x;\n\t\tconst y = -content.y;\n\n\t\tconst vertical = this.vertical;\n\t\tconst verticalWidth = vertical.width;\n\t\tconst verticalOffsetStart = this.getOffsetVerticalStart(verticalWidth);\n\t\tconst verticalOffsetEnd = this.getOffsetVerticalEnd(verticalWidth);\n\t\tvertical.set(y, y + height, content.height, silently);\n\t\tvertical.position.set(width - verticalWidth, verticalOffsetStart);\n\t\tvertical.height = height - verticalOffsetStart - verticalOffsetEnd;\n\n\t\tconst horizontal = this.horizontal;\n\t\tconst horizontalHeight = horizontal.height;\n\t\tconst horizontalOffsetStart = this.getOffsetHorizontalStart(horizontalHeight);\n\t\tconst horizontalOffsetEnd = this.getOffsetHorizontalEnd(horizontalHeight);\n\t\thorizontal.set(x, x + width, content.width, silently);\n\t\thorizontal.position.set(horizontalOffsetStart, height - horizontalHeight);\n\t\thorizontal.width = width - horizontalOffsetStart - horizontalOffsetEnd;\n\n\t\tthis._onUpdate(vertical.isRegionVisible() || horizontal.isRegionVisible());\n\t}\n\n\ttouch(silently?: boolean): void {\n\t\tthis.vertical.touch(silently);\n\t\tthis.horizontal.touch(silently);\n\t}\n\n\tprotected getOffsetHorizontalStart(size: number): number {\n\t\treturn size * 0.5;\n\t}\n\n\tprotected getOffsetHorizontalEnd(size: number): number {\n\t\treturn size * 0.5;\n\t}\n\n\tprotected getOffsetVerticalStart(size: number): number {\n\t\treturn size * 0.5;\n\t}\n\n\tprotected getOffsetVerticalEnd(size: number): number {\n\t\treturn size * 0.5;\n\t}\n}\n"]}
@@ -124,6 +124,10 @@ var DPane = /** @class */ (function (_super) {
124
124
  var content = this.content;
125
125
  content.y = -content.height * start;
126
126
  };
127
+ DPane.prototype.onOver = function (e) {
128
+ _super.prototype.onOver.call(this, e);
129
+ this.scrollbar.touch();
130
+ };
127
131
  DPane.prototype.getType = function () {
128
132
  return "DPane";
129
133
  };
@@ -1 +1 @@
1
- {"version":3,"file":"d-pane.js","sourceRoot":"","sources":["../../../src/main/typescript/wcardinal/ui/d-pane.ts"],"names":[],"mappings":"AAAA;;;GAGG;;AAEH,OAAO,EAAE,KAAK,EAAE,SAAS,EAAE,MAAM,SAAS,CAAC;AAC3C,OAAO,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AACjD,OAAO,EAAE,KAAK,EAA4B,MAAM,UAAU,CAAC;AAC3D,OAAO,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAC;AAC3D,OAAO,EAAE,QAAQ,EAAmB,MAAM,aAAa,CAAC;AACxD,OAAO,EAAE,eAAe,EAAE,MAAM,0BAA0B,CAAC;AAC3D,OAAO,EAAE,UAAU,EAAE,MAAM,gBAAgB,C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ACD;aAAM,IAAI,cAAc,GAAG,EAAE,EAAE;YAC/B,IAAI,GAAG,QAAQ,GAAG,IAAI,CAAC,GAAG,CAAC,EAAE,GAAG,cAAc,EAAE,EAAE,GAAG,cAAc,CAAC,CAAC;YACrE,IAAI,GAAG,IAAI,CAAC,GAAG,CAAC,MAAM,GAAG,aAAa,EAAE,IAAI,CAAC,GAAG,CAAC,CAAC,EAAE,IAAI,CAAC,CAAC,CAAC;SAC3D;QAED,IAAM,eAAe,GAAG,OAAO,CAAC,QAAQ,CAAC;QACzC,IAAI,IAAI,IAAI,IAAI,EAAE;YACjB,IAAI,IAAI,IAAI,IAAI,EAAE;gBACjB,eAAe,CAAC,GAAG,CAAC,IAAI,EAAE,IAAI,CAAC,CAAC;aAChC;iBAAM;gBACN,eAAe,CAAC,CAAC,GAAG,IAAI,CAAC;aACzB;SACD;aAAM;YACN,IAAI,IAAI,IAAI,IAAI,EAAE;gBACjB,eAAe,CAAC,CAAC,GAAG,IAAI,CAAC;aACzB;SACD;QAED,iBAAM,YAAY,YAAC,OAAO,CAAC,CAAC;IAC7B,CAAC;IAED,uBAAO,GAAP;QACC,gBAAgB;QAChB,IAAM,YAAY,GAAG,IAAI,CAAC,aAAa,CAAC;QACxC,IAAI,YAAY,IAAI,IAAI,EAAE;YACzB,IAAI,CAAC,aAAa,GAAG,IAAI,CAAC;YAC1B,YAAY,CAAC,OAAO,EAAE,CAAC;SACvB;QACA,IAAY,CAAC,IAAI,GAAG,IAAI,CAAC;QAE1B,iBAAM,OAAO,WAAE,CAAC;IACjB,CAAC;IACF,YAAC;AAAD,CAAC,AAlVD,CAIU,KAAK,GA8Ud","sourcesContent":["/*\n * Copyright (C) 2019 Toshiba Corporation\n * SPDX-License-Identifier: Apache-2.0\n */\n\nimport { Point, Rectangle } from \"pixi.js\";\nimport { DApplications } from \"./d-applications\";\nimport { DBase, DBaseOptions, DThemeBase } from \"./d-base\";\nimport { DBaseOverflowMask } from \"./d-base-overflow-mask\";\nimport { DContent, DContentOptions } from \"./d-content\";\nimport { UtilGestureMode } from \"./util/util-gesture-mode\";\nimport { DScrollBar } from \"./d-scroll-bar\";\nimport { toEnum } from \"./util/to-enum\";\nimport { UtilGesture } from \"./util/util-gesture\";\nimport { UtilWheelEventDeltas } from \"./util/util-wheel-event\";\nimport { DPaneScrollBar, DPaneScrollBarOptions } from \"./d-pane-scrollbar\";\n\n/**\n * {@link DPane} gesture options.\n */\nexport interface DPaneGestureOptions {\n\tmode?: keyof typeof UtilGestureMode | UtilGestureMode;\n}\n\n/**\n * {@link DPane} options.\n */\nexport interface DPaneOptions<\n\tTHEME extends DThemePane = DThemePane,\n\tCONTENT_OPTIONS extends DBaseOptions = DContentOptions\n> extends DBaseOptions<THEME> {\n\t/**\n\t * True to enable an overflow mask.\n\t */\n\tmask?: boolean;\n\n\t/**\n\t * Content options or a content.\n\t */\n\tcontent?: CONTENT_OPTIONS | DBase;\n\n\t/**\n\t * Scroll bar options.\n\t */\n\tscrollbar?: DPaneScrollBarOptions;\n\n\t/**\n\t * Gesture options.\n\t */\n\tgesture?: DPaneGestureOptions;\n}\n\nexport interface DThemePane extends DThemeBase {\n\tisOverflowMaskEnabled(): boolean;\n\tgetWheelSpeed(): number;\n\tgetGestureMode(): UtilGestureMode;\n}\n\n// Class\nexport class DPane<\n\tTHEME extends DThemePane = DThemePane,\n\tCONTENT_OPTIONS extends DBaseOptions = DContentOptions,\n\tOPTIONS extends DPaneOptions<THEME, CONTENT_OPTIONS> = DPaneOptions<THEME, CONTENT_OPTIONS>\n> extends DBase<THEME, OPTIONS> {\n\tprotected static WORK_POINT?: Point;\n\tprotected static WORK_RECTANGLE?: Rectangle;\n\n\tprotected _content?: DBase;\n\tprotected _overflowMask?: DBaseOverflowMask | null;\n\tprotected _scrollbar?: DPaneScrollBar;\n\tprotected _gestureUtil?: UtilGesture<DPane>;\n\n\tconstructor(options?: OPTIONS) {\n\t\tsuper(options);\n\n\t\t// Mask\n\t\tconst theme = this.theme;\n\t\tif (options?.mask ?? theme.isOverflowMaskEnabled()) {\n\t\t\tthis.mask = this.getOverflowMask();\n\t\t}\n\n\t\t// Content\n\t\tthis.addChild(this.content);\n\n\t\t// Scroll bar\n\t\tconst scrollbar = this.scrollbar;\n\t\tthis.addChild(scrollbar.vertical);\n\t\tthis.addChild(scrollbar.horizontal);\n\t\tscrollbar.update();\n\n\t\t// Gesture\n\t\tthis.initGesture(theme, options);\n\t}\n\n\tprotected initGesture(theme: THEME, options?: OPTIONS): void {\n\t\t// Edge does not fire the wheel event when scrolling using the 2-fingure scroll gesture on a touchpad.\n\t\t// Instead, it fires touch events. This is why the gesture is enabled regardless of the `UtilPointerEvent.touchable`.\n\t\t// https://developer.microsoft.com/en-us/microsoft-edge/platform/issues/7134034/\n\t\tconst mode = toEnum(options?.gesture?.mode ?? theme.getGestureMode(), UtilGestureMode);\n\t\tif (mode === UtilGestureMode.ON || mode === UtilGestureMode.TOUCH) {\n\t\t\tconst position = new Point();\n\t\t\tconst content = this.content;\n\t\t\tthis._gestureUtil = new UtilGesture<DPane>({\n\t\t\t\tbind: this,\n\t\t\t\ttouch: mode === UtilGestureMode.TOUCH,\n\t\t\t\ton: {\n\t\t\t\t\tstart: (): void => {\n\t\t\t\t\t\tposition.copyFrom(content.position);\n\t\t\t\t\t},\n\t\t\t\t\tmove: (target: DPane, dx: number, dy: number): void => {\n\t\t\t\t\t\tposition.set(position.x + dx, position.y + dy);\n\t\t\t\t\t\tcontent.position.set(\n\t\t\t\t\t\t\tthis.toContentX(content, position.x),\n\t\t\t\t\t\t\tthis.toContentY(content, position.y)\n\t\t\t\t\t\t);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t});\n\t\t}\n\t}\n\n\tget scrollbar(): DPaneScrollBar {\n\t\tlet result = this._scrollbar;\n\t\tif (result == null) {\n\t\t\tresult = this.newScrollBar(this._options?.scrollbar);\n\t\t\tthis.initScrollBar(result);\n\t\t\tthis._scrollbar = result;\n\t\t}\n\t\treturn result;\n\t}\n\n\tprotected newScrollBar(options?: DPaneScrollBarOptions): DPaneScrollBar {\n\t\treturn new DPaneScrollBar(this, options, (isRegionVisible: boolean): void => {\n\t\t\tthis.onScrollBarUpdate(isRegionVisible);\n\t\t});\n\t}\n\n\tprotected onScrollBarUpdate(isRegionVisible: boolean): void {\n\t\tconst overflowMask = this._overflowMask;\n\t\tif (overflowMask != null) {\n\t\t\tconst content = this.content;\n\t\t\tif (isRegionVisible) {\n\t\t\t\tif (content.mask !== overflowMask) {\n\t\t\t\t\tcontent.mask = overflowMask;\n\t\t\t\t\tDApplications.update(this);\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tif (content.mask) {\n\t\t\t\t\t(content as any).mask = null;\n\t\t\t\t\tDApplications.update(this);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\tprotected initScrollBar(scrollbar: DPaneScrollBar): void {\n\t\tscrollbar.vertical.on(\"regionmove\", (start: number): void => {\n\t\t\tthis.onScrollBarMoveY(start);\n\t\t});\n\t\tscrollbar.horizontal.on(\"regionmove\", (start: number): void => {\n\t\t\tthis.onScrollBarMoveX(start);\n\t\t});\n\t}\n\n\tprotected onScrollBarMoveX(start: number): void {\n\t\tconst gestureUtil = this._gestureUtil;\n\t\tif (gestureUtil != null) {\n\t\t\tgestureUtil.stop(this);\n\t\t}\n\t\tconst content = this.content;\n\t\tcontent.x = -content.width * start;\n\t}\n\n\tprotected onScrollBarMoveY(start: number): void {\n\t\tconst gestureUtil = this._gestureUtil;\n\t\tif (gestureUtil != null) {\n\t\t\tgestureUtil.stop(this);\n\t\t}\n\t\tconst content = this.content;\n\t\tcontent.y = -content.height * start;\n\t}\n\n\tprotected getType(): string {\n\t\treturn \"DPane\";\n\t}\n\n\tget content(): DBase {\n\t\tlet result = this._content;\n\t\tif (result == null) {\n\t\t\tresult = this.toContent(this._options);\n\t\t\tthis.initContent(result);\n\t\t\tthis._content = result;\n\t\t}\n\t\treturn result;\n\t}\n\n\tprotected toContent(options?: OPTIONS): DBase {\n\t\tconst content = options?.content;\n\t\tif (content) {\n\t\t\tif (content instanceof DBase) {\n\t\t\t\treturn content;\n\t\t\t} else {\n\t\t\t\treturn this.newContent(content);\n\t\t\t}\n\t\t}\n\t\treturn this.newContent();\n\t}\n\n\tprotected newContent(options?: CONTENT_OPTIONS): DBase {\n\t\treturn new DContent(options);\n\t}\n\n\tprotected initContent(content: DBase): void {\n\t\tcontent.on(\"move\", (): void => {\n\t\t\tthis.onContentChange();\n\t\t});\n\t\tcontent.on(\"resize\", (): void => {\n\t\t\tthis.onContentChange();\n\t\t});\n\t}\n\n\tprotected getOverflowMask(): DBaseOverflowMask {\n\t\tlet result = this._overflowMask;\n\t\tif (result == null) {\n\t\t\tresult = new DBaseOverflowMask(this);\n\t\t\tthis._overflowMask = result;\n\t\t\tthis.reflowable.add(result);\n\t\t\tthis.toDirty();\n\t\t}\n\t\treturn result;\n\t}\n\n\tprotected onWheel(e: WheelEvent, deltas: UtilWheelEventDeltas, global: Point): boolean {\n\t\tconst content = this.content;\n\t\tconst x = this.getWheelContentX(content, deltas.deltaX * deltas.lowest);\n\t\tconst y = this.getWheelContentY(content, deltas.deltaY * deltas.lowest);\n\t\tif (content.x !== x || content.y !== y) {\n\t\t\tconst gestureUtil = this._gestureUtil;\n\t\t\tif (gestureUtil != null) {\n\t\t\t\tgestureUtil.stop(this);\n\t\t\t}\n\t\t\tcontent.position.set(x, y);\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}\n\n\tprotected getWheelContentX(content: DBase, delta: number): number {\n\t\tif (0 < delta || delta < 0) {\n\t\t\tconst speed = this.theme.getWheelSpeed();\n\t\t\treturn this.toContentX(content, content.x - delta * speed);\n\t\t}\n\t\treturn content.x;\n\t}\n\n\tprotected getWheelContentY(content: DBase, delta: number): number {\n\t\tif (0 < delta || delta < 0) {\n\t\t\tconst speed = this.theme.getWheelSpeed();\n\t\t\treturn this.toContentY(content, content.y + delta * speed);\n\t\t}\n\t\treturn content.y;\n\t}\n\n\tprotected toContentX(content: DBase, x: number): number {\n\t\treturn Math.min(0, Math.max(this.width - content.width, x));\n\t}\n\n\tprotected toContentY(content: DBase, y: number): number {\n\t\treturn Math.min(0, Math.max(this.height - content.height, y));\n\t}\n\n\tprotected isRefitable(target: any): target is DBase<any, any> {\n\t\treturn super.isRefitable(target) && !(target instanceof DScrollBar);\n\t}\n\n\tonResize(newWidth: number, newHeight: number, oldWidth: number, oldHeight: number): void {\n\t\tconst scrollbar = this.scrollbar;\n\t\tscrollbar.lock();\n\t\tsuper.onResize(newWidth, newHeight, oldWidth, oldHeight);\n\t\tscrollbar.update();\n\t\tscrollbar.unlock(true);\n\t}\n\n\tprotected onContentChange(): void {\n\t\tthis.scrollbar.update();\n\t}\n\n\tprotected getFocusedChildClippingRect(\n\t\tfocused: DBase,\n\t\tcontentX: number,\n\t\tcontentY: number,\n\t\tcontentWidth: number,\n\t\tcontentHeight: number,\n\t\twidth: number,\n\t\theight: number,\n\t\tresult: Rectangle\n\t): Rectangle {\n\t\tresult.x = 0;\n\t\tresult.y = 0;\n\t\tresult.width = width;\n\t\tresult.height = height;\n\t\treturn result;\n\t}\n\n\tprotected onChildFocus(focused: DBase): void {\n\t\tconst point = DPane.WORK_POINT || new Point();\n\t\tDPane.WORK_POINT = point;\n\n\t\t// Content rectangle\n\t\tconst content = this.content;\n\t\tconst contentX = content.x;\n\t\tconst contentY = content.y;\n\t\tconst contentWidth = content.width;\n\t\tconst contentHeight = content.height;\n\n\t\tpoint.set(0, 0);\n\t\tfocused.toGlobal(point, point, false);\n\t\tcontent.toLocal(point, undefined, point, false);\n\t\tconst x0 = contentX + Math.min(contentWidth, Math.max(0, point.x));\n\t\tconst y0 = contentY + Math.min(contentHeight, Math.max(0, point.y));\n\n\t\tpoint.set(focused.width, focused.height);\n\t\tfocused.toGlobal(point, point, true);\n\t\tcontent.toLocal(point, undefined, point, true);\n\t\tconst x1 = contentX + Math.min(contentWidth, Math.max(0, point.x));\n\t\tconst y1 = contentY + Math.min(contentHeight, Math.max(0, point.y));\n\n\t\tconst width = this.width;\n\t\tconst height = this.height;\n\t\tconst clippingRect = DPane.WORK_RECTANGLE || new Rectangle();\n\t\tDPane.WORK_RECTANGLE = clippingRect;\n\t\tthis.getFocusedChildClippingRect(\n\t\t\tfocused,\n\t\t\tcontentX,\n\t\t\tcontentY,\n\t\t\tcontentWidth,\n\t\t\tcontentHeight,\n\t\t\twidth,\n\t\t\theight,\n\t\t\tclippingRect\n\t\t);\n\t\tconst clippingRectX = clippingRect.x;\n\t\tconst clippingRectY = clippingRect.y;\n\t\tconst clippingRectX0 = clippingRectX;\n\t\tconst clippingRectY0 = clippingRectY;\n\t\tconst clippingRectX1 = clippingRectX + clippingRect.width;\n\t\tconst clippingRectY1 = clippingRectY + clippingRect.height;\n\n\t\tlet newX: number | null = null;\n\t\tif (x0 < clippingRectX0) {\n\t\t\tif (x1 <= clippingRectX1) {\n\t\t\t\tnewX = contentX + Math.min(clippingRectX0 - x0, clippingRectX1 - x1);\n\t\t\t\tnewX = Math.max(width - contentWidth, Math.min(0, newX));\n\t\t\t}\n\t\t} else if (clippingRectX1 < x1) {\n\t\t\tnewX = contentX - Math.min(x0 - clippingRectX0, x1 - clippingRectX1);\n\t\t\tnewX = Math.max(width - contentWidth, Math.min(0, newX));\n\t\t}\n\n\t\tlet newY: number | null = null;\n\t\tif (y0 < clippingRectY0) {\n\t\t\tif (y1 <= clippingRectY1) {\n\t\t\t\tnewY = contentY + Math.min(clippingRectY0 - y0, clippingRectY1 - y1);\n\t\t\t\tnewY = Math.max(height - contentHeight, Math.min(0, newY));\n\t\t\t}\n\t\t} else if (clippingRectY1 < y1) {\n\t\t\tnewY = contentY - Math.min(y0 - clippingRectY0, y1 - clippingRectY1);\n\t\t\tnewY = Math.max(height - contentHeight, Math.min(0, newY));\n\t\t}\n\n\t\tconst contentPosition = content.position;\n\t\tif (newX != null) {\n\t\t\tif (newY != null) {\n\t\t\t\tcontentPosition.set(newX, newY);\n\t\t\t} else {\n\t\t\t\tcontentPosition.x = newX;\n\t\t\t}\n\t\t} else {\n\t\t\tif (newY != null) {\n\t\t\t\tcontentPosition.y = newY;\n\t\t\t}\n\t\t}\n\n\t\tsuper.onChildFocus(focused);\n\t}\n\n\tdestroy(): void {\n\t\t// Overflow mask\n\t\tconst overflowMask = this._overflowMask;\n\t\tif (overflowMask != null) {\n\t\t\tthis._overflowMask = null;\n\t\t\toverflowMask.destroy();\n\t\t}\n\t\t(this as any).mask = null;\n\n\t\tsuper.destroy();\n\t}\n}\n"]}
1
+ {"version":3,"file":"d-pane.js","sourceRoot":"","sources":["../../../src/main/typescript/wcardinal/ui/d-pane.ts"],"names":[],"mappings":"AAAA;;;GAGG;;AAEH,OAAO,EAAe,KAAK,EAAE,SAAS,EAAE,MAAM,SAAS,CAAC;AACxD,OAAO,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AACjD,OAAO,EAAE,KAAK,EAA4B,MAAM,UAAU,CAAC;AAC3D,OAAO,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAC;AAC3D,OAAO,EAAE,QAAQ,EAAmB,MAAM,aAAa,CAAC;AACxD,OAAO,EAAE,eAAe,EAAE,MAAM,0BAA0B,CAAC;AAC3D,OAAO,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC;AAC5C,OAAO,EAAE,MAAM,EAAE,MAAM,gBAAgB,CAAC;AACxC,OAAO,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAC;AAElD,OAAO,EAAE,cAAc,EAAyB,MAAM,oBAAoB,CAAC;AA2C3E,QAAQ;AACR;IAIU,yBAAqB;IAS9B,eAAY,OAAiB;QAA7B,iBAoBC;;gBAnBA,kBAAM,OAAO,CAAC;QAEd,OAAO;QACP,IAAM,KAAK,GAAG,KAAI,CAAC,KAAK,CAAC;QACzB,IAAI,MAAA,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,IAAI,mCAAI,KAAK,CAAC,qBAAqB,EAAE,EAAE;YACnD,KAAI,CAA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eAAe,GAAG,OAAO,CAAC,QAAQ,CAAC;QACzC,IAAI,IAAI,IAAI,IAAI,EAAE;YACjB,IAAI,IAAI,IAAI,IAAI,EAAE;gBACjB,eAAe,CAAC,GAAG,CAAC,IAAI,EAAE,IAAI,CAAC,CAAC;aAChC;iBAAM;gBACN,eAAe,CAAC,CAAC,GAAG,IAAI,CAAC;aACzB;SACD;aAAM;YACN,IAAI,IAAI,IAAI,IAAI,EAAE;gBACjB,eAAe,CAAC,CAAC,GAAG,IAAI,CAAC;aACzB;SACD;QAED,iBAAM,YAAY,YAAC,OAAO,CAAC,CAAC;IAC7B,CAAC;IAED,uBAAO,GAAP;QACC,gBAAgB;QAChB,IAAM,YAAY,GAAG,IAAI,CAAC,aAAa,CAAC;QACxC,IAAI,YAAY,IAAI,IAAI,EAAE;YACzB,IAAI,CAAC,aAAa,GAAG,IAAI,CAAC;YAC1B,YAAY,CAAC,OAAO,EAAE,CAAC;SACvB;QACA,IAAY,CAAC,IAAI,GAAG,IAAI,CAAC;QAE1B,iBAAM,OAAO,WAAE,CAAC;IACjB,CAAC;IACF,YAAC;AAAD,CAAC,AAvVD,CAIU,KAAK,GAmVd","sourcesContent":["/*\n * Copyright (C) 2019 Toshiba Corporation\n * SPDX-License-Identifier: Apache-2.0\n */\n\nimport { interaction, Point, Rectangle } from \"pixi.js\";\nimport { DApplications } from \"./d-applications\";\nimport { DBase, DBaseOptions, DThemeBase } from \"./d-base\";\nimport { DBaseOverflowMask } from \"./d-base-overflow-mask\";\nimport { DContent, DContentOptions } from \"./d-content\";\nimport { UtilGestureMode } from \"./util/util-gesture-mode\";\nimport { DScrollBar } from \"./d-scroll-bar\";\nimport { toEnum } from \"./util/to-enum\";\nimport { UtilGesture } from \"./util/util-gesture\";\nimport { UtilWheelEventDeltas } from \"./util/util-wheel-event\";\nimport { DPaneScrollBar, DPaneScrollBarOptions } from \"./d-pane-scrollbar\";\n\n/**\n * {@link DPane} gesture options.\n */\nexport interface DPaneGestureOptions {\n\tmode?: keyof typeof UtilGestureMode | UtilGestureMode;\n}\n\n/**\n * {@link DPane} options.\n */\nexport interface DPaneOptions<\n\tTHEME extends DThemePane = DThemePane,\n\tCONTENT_OPTIONS extends DBaseOptions = DContentOptions\n> extends DBaseOptions<THEME> {\n\t/**\n\t * True to enable an overflow mask.\n\t */\n\tmask?: boolean;\n\n\t/**\n\t * Content options or a content.\n\t */\n\tcontent?: CONTENT_OPTIONS | DBase;\n\n\t/**\n\t * Scroll bar options.\n\t */\n\tscrollbar?: DPaneScrollBarOptions;\n\n\t/**\n\t * Gesture options.\n\t */\n\tgesture?: DPaneGestureOptions;\n}\n\nexport interface DThemePane extends DThemeBase {\n\tisOverflowMaskEnabled(): boolean;\n\tgetWheelSpeed(): number;\n\tgetGestureMode(): UtilGestureMode;\n}\n\n// Class\nexport class DPane<\n\tTHEME extends DThemePane = DThemePane,\n\tCONTENT_OPTIONS extends DBaseOptions = DContentOptions,\n\tOPTIONS extends DPaneOptions<THEME, CONTENT_OPTIONS> = DPaneOptions<THEME, CONTENT_OPTIONS>\n> extends DBase<THEME, OPTIONS> {\n\tprotected static WORK_POINT?: Point;\n\tprotected static WORK_RECTANGLE?: Rectangle;\n\n\tprotected _content?: DBase;\n\tprotected _overflowMask?: DBaseOverflowMask | null;\n\tprotected _scrollbar?: DPaneScrollBar;\n\tprotected _gestureUtil?: UtilGesture<DPane>;\n\n\tconstructor(options?: OPTIONS) {\n\t\tsuper(options);\n\n\t\t// Mask\n\t\tconst theme = this.theme;\n\t\tif (options?.mask ?? theme.isOverflowMaskEnabled()) {\n\t\t\tthis.mask = this.getOverflowMask();\n\t\t}\n\n\t\t// Content\n\t\tthis.addChild(this.content);\n\n\t\t// Scroll bar\n\t\tconst scrollbar = this.scrollbar;\n\t\tthis.addChild(scrollbar.vertical);\n\t\tthis.addChild(scrollbar.horizontal);\n\t\tscrollbar.update();\n\n\t\t// Gesture\n\t\tthis.initGesture(theme, options);\n\t}\n\n\tprotected initGesture(theme: THEME, options?: OPTIONS): void {\n\t\t// Edge does not fire the wheel event when scrolling using the 2-fingure scroll gesture on a touchpad.\n\t\t// Instead, it fires touch events. This is why the gesture is enabled regardless of the `UtilPointerEvent.touchable`.\n\t\t// https://developer.microsoft.com/en-us/microsoft-edge/platform/issues/7134034/\n\t\tconst mode = toEnum(options?.gesture?.mode ?? theme.getGestureMode(), UtilGestureMode);\n\t\tif (mode === UtilGestureMode.ON || mode === UtilGestureMode.TOUCH) {\n\t\t\tconst position = new Point();\n\t\t\tconst content = this.content;\n\t\t\tthis._gestureUtil = new UtilGesture<DPane>({\n\t\t\t\tbind: this,\n\t\t\t\ttouch: mode === UtilGestureMode.TOUCH,\n\t\t\t\ton: {\n\t\t\t\t\tstart: (): void => {\n\t\t\t\t\t\tposition.copyFrom(content.position);\n\t\t\t\t\t},\n\t\t\t\t\tmove: (target: DPane, dx: number, dy: number): void => {\n\t\t\t\t\t\tposition.set(position.x + dx, position.y + dy);\n\t\t\t\t\t\tcontent.position.set(\n\t\t\t\t\t\t\tthis.toContentX(content, position.x),\n\t\t\t\t\t\t\tthis.toContentY(content, position.y)\n\t\t\t\t\t\t);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t});\n\t\t}\n\t}\n\n\tget scrollbar(): DPaneScrollBar {\n\t\tlet result = this._scrollbar;\n\t\tif (result == null) {\n\t\t\tresult = this.newScrollBar(this._options?.scrollbar);\n\t\t\tthis.initScrollBar(result);\n\t\t\tthis._scrollbar = result;\n\t\t}\n\t\treturn result;\n\t}\n\n\tprotected newScrollBar(options?: DPaneScrollBarOptions): DPaneScrollBar {\n\t\treturn new DPaneScrollBar(this, options, (isRegionVisible: boolean): void => {\n\t\t\tthis.onScrollBarUpdate(isRegionVisible);\n\t\t});\n\t}\n\n\tprotected onScrollBarUpdate(isRegionVisible: boolean): void {\n\t\tconst overflowMask = this._overflowMask;\n\t\tif (overflowMask != null) {\n\t\t\tconst content = this.content;\n\t\t\tif (isRegionVisible) {\n\t\t\t\tif (content.mask !== overflowMask) {\n\t\t\t\t\tcontent.mask = overflowMask;\n\t\t\t\t\tDApplications.update(this);\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tif (content.mask) {\n\t\t\t\t\t(content as any).mask = null;\n\t\t\t\t\tDApplications.update(this);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\tprotected initScrollBar(scrollbar: DPaneScrollBar): void {\n\t\tscrollbar.vertical.on(\"regionmove\", (start: number): void => {\n\t\t\tthis.onScrollBarMoveY(start);\n\t\t});\n\t\tscrollbar.horizontal.on(\"regionmove\", (start: number): void => {\n\t\t\tthis.onScrollBarMoveX(start);\n\t\t});\n\t}\n\n\tprotected onScrollBarMoveX(start: number): void {\n\t\tconst gestureUtil = this._gestureUtil;\n\t\tif (gestureUtil != null) {\n\t\t\tgestureUtil.stop(this);\n\t\t}\n\t\tconst content = this.content;\n\t\tcontent.x = -content.width * start;\n\t}\n\n\tprotected onScrollBarMoveY(start: number): void {\n\t\tconst gestureUtil = this._gestureUtil;\n\t\tif (gestureUtil != null) {\n\t\t\tgestureUtil.stop(this);\n\t\t}\n\t\tconst content = this.content;\n\t\tcontent.y = -content.height * start;\n\t}\n\n\tprotected override onOver(e: interaction.InteractionEvent): void {\n\t\tsuper.onOver(e);\n\t\tthis.scrollbar.touch();\n\t}\n\n\tprotected getType(): string {\n\t\treturn \"DPane\";\n\t}\n\n\tget content(): DBase {\n\t\tlet result = this._content;\n\t\tif (result == null) {\n\t\t\tresult = this.toContent(this._options);\n\t\t\tthis.initContent(result);\n\t\t\tthis._content = result;\n\t\t}\n\t\treturn result;\n\t}\n\n\tprotected toContent(options?: OPTIONS): DBase {\n\t\tconst content = options?.content;\n\t\tif (content) {\n\t\t\tif (content instanceof DBase) {\n\t\t\t\treturn content;\n\t\t\t} else {\n\t\t\t\treturn this.newContent(content);\n\t\t\t}\n\t\t}\n\t\treturn this.newContent();\n\t}\n\n\tprotected newContent(options?: CONTENT_OPTIONS): DBase {\n\t\treturn new DContent(options);\n\t}\n\n\tprotected initContent(content: DBase): void {\n\t\tcontent.on(\"move\", (): void => {\n\t\t\tthis.onContentChange();\n\t\t});\n\t\tcontent.on(\"resize\", (): void => {\n\t\t\tthis.onContentChange();\n\t\t});\n\t}\n\n\tprotected getOverflowMask(): DBaseOverflowMask {\n\t\tlet result = this._overflowMask;\n\t\tif (result == null) {\n\t\t\tresult = new DBaseOverflowMask(this);\n\t\t\tthis._overflowMask = result;\n\t\t\tthis.reflowable.add(result);\n\t\t\tthis.toDirty();\n\t\t}\n\t\treturn result;\n\t}\n\n\tprotected onWheel(e: WheelEvent, deltas: UtilWheelEventDeltas, global: Point): boolean {\n\t\tconst content = this.content;\n\t\tconst x = this.getWheelContentX(content, deltas.deltaX * deltas.lowest);\n\t\tconst y = this.getWheelContentY(content, deltas.deltaY * deltas.lowest);\n\t\tif (content.x !== x || content.y !== y) {\n\t\t\tconst gestureUtil = this._gestureUtil;\n\t\t\tif (gestureUtil != null) {\n\t\t\t\tgestureUtil.stop(this);\n\t\t\t}\n\t\t\tcontent.position.set(x, y);\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}\n\n\tprotected getWheelContentX(content: DBase, delta: number): number {\n\t\tif (0 < delta || delta < 0) {\n\t\t\tconst speed = this.theme.getWheelSpeed();\n\t\t\treturn this.toContentX(content, content.x - delta * speed);\n\t\t}\n\t\treturn content.x;\n\t}\n\n\tprotected getWheelContentY(content: DBase, delta: number): number {\n\t\tif (0 < delta || delta < 0) {\n\t\t\tconst speed = this.theme.getWheelSpeed();\n\t\t\treturn this.toContentY(content, content.y + delta * speed);\n\t\t}\n\t\treturn content.y;\n\t}\n\n\tprotected toContentX(content: DBase, x: number): number {\n\t\treturn Math.min(0, Math.max(this.width - content.width, x));\n\t}\n\n\tprotected toContentY(content: DBase, y: number): number {\n\t\treturn Math.min(0, Math.max(this.height - content.height, y));\n\t}\n\n\tprotected isRefitable(target: any): target is DBase<any, any> {\n\t\treturn super.isRefitable(target) && !(target instanceof DScrollBar);\n\t}\n\n\tonResize(newWidth: number, newHeight: number, oldWidth: number, oldHeight: number): void {\n\t\tconst scrollbar = this.scrollbar;\n\t\tscrollbar.lock();\n\t\tsuper.onResize(newWidth, newHeight, oldWidth, oldHeight);\n\t\tscrollbar.update();\n\t\tscrollbar.unlock(true);\n\t}\n\n\tprotected onContentChange(): void {\n\t\tthis.scrollbar.update();\n\t}\n\n\tprotected getFocusedChildClippingRect(\n\t\tfocused: DBase,\n\t\tcontentX: number,\n\t\tcontentY: number,\n\t\tcontentWidth: number,\n\t\tcontentHeight: number,\n\t\twidth: number,\n\t\theight: number,\n\t\tresult: Rectangle\n\t): Rectangle {\n\t\tresult.x = 0;\n\t\tresult.y = 0;\n\t\tresult.width = width;\n\t\tresult.height = height;\n\t\treturn result;\n\t}\n\n\tprotected onChildFocus(focused: DBase): void {\n\t\tconst point = DPane.WORK_POINT || new Point();\n\t\tDPane.WORK_POINT = point;\n\n\t\t// Content rectangle\n\t\tconst content = this.content;\n\t\tconst contentX = content.x;\n\t\tconst contentY = content.y;\n\t\tconst contentWidth = content.width;\n\t\tconst contentHeight = content.height;\n\n\t\tpoint.set(0, 0);\n\t\tfocused.toGlobal(point, point, false);\n\t\tcontent.toLocal(point, undefined, point, false);\n\t\tconst x0 = contentX + Math.min(contentWidth, Math.max(0, point.x));\n\t\tconst y0 = contentY + Math.min(contentHeight, Math.max(0, point.y));\n\n\t\tpoint.set(focused.width, focused.height);\n\t\tfocused.toGlobal(point, point, true);\n\t\tcontent.toLocal(point, undefined, point, true);\n\t\tconst x1 = contentX + Math.min(contentWidth, Math.max(0, point.x));\n\t\tconst y1 = contentY + Math.min(contentHeight, Math.max(0, point.y));\n\n\t\tconst width = this.width;\n\t\tconst height = this.height;\n\t\tconst clippingRect = DPane.WORK_RECTANGLE || new Rectangle();\n\t\tDPane.WORK_RECTANGLE = clippingRect;\n\t\tthis.getFocusedChildClippingRect(\n\t\t\tfocused,\n\t\t\tcontentX,\n\t\t\tcontentY,\n\t\t\tcontentWidth,\n\t\t\tcontentHeight,\n\t\t\twidth,\n\t\t\theight,\n\t\t\tclippingRect\n\t\t);\n\t\tconst clippingRectX = clippingRect.x;\n\t\tconst clippingRectY = clippingRect.y;\n\t\tconst clippingRectX0 = clippingRectX;\n\t\tconst clippingRectY0 = clippingRectY;\n\t\tconst clippingRectX1 = clippingRectX + clippingRect.width;\n\t\tconst clippingRectY1 = clippingRectY + clippingRect.height;\n\n\t\tlet newX: number | null = null;\n\t\tif (x0 < clippingRectX0) {\n\t\t\tif (x1 <= clippingRectX1) {\n\t\t\t\tnewX = contentX + Math.min(clippingRectX0 - x0, clippingRectX1 - x1);\n\t\t\t\tnewX = Math.max(width - contentWidth, Math.min(0, newX));\n\t\t\t}\n\t\t} else if (clippingRectX1 < x1) {\n\t\t\tnewX = contentX - Math.min(x0 - clippingRectX0, x1 - clippingRectX1);\n\t\t\tnewX = Math.max(width - contentWidth, Math.min(0, newX));\n\t\t}\n\n\t\tlet newY: number | null = null;\n\t\tif (y0 < clippingRectY0) {\n\t\t\tif (y1 <= clippingRectY1) {\n\t\t\t\tnewY = contentY + Math.min(clippingRectY0 - y0, clippingRectY1 - y1);\n\t\t\t\tnewY = Math.max(height - contentHeight, Math.min(0, newY));\n\t\t\t}\n\t\t} else if (clippingRectY1 < y1) {\n\t\t\tnewY = contentY - Math.min(y0 - clippingRectY0, y1 - clippingRectY1);\n\t\t\tnewY = Math.max(height - contentHeight, Math.min(0, newY));\n\t\t}\n\n\t\tconst contentPosition = content.position;\n\t\tif (newX != null) {\n\t\t\tif (newY != null) {\n\t\t\t\tcontentPosition.set(newX, newY);\n\t\t\t} else {\n\t\t\t\tcontentPosition.x = newX;\n\t\t\t}\n\t\t} else {\n\t\t\tif (newY != null) {\n\t\t\t\tcontentPosition.y = newY;\n\t\t\t}\n\t\t}\n\n\t\tsuper.onChildFocus(focused);\n\t}\n\n\tdestroy(): void {\n\t\t// Overflow mask\n\t\tconst overflowMask = this._overflowMask;\n\t\tif (overflowMask != null) {\n\t\t\tthis._overflowMask = null;\n\t\t\toverflowMask.destroy();\n\t\t}\n\t\t(this as any).mask = null;\n\n\t\tsuper.destroy();\n\t}\n}\n"]}
@@ -76,6 +76,9 @@ var DScrollBar = /** @class */ (function (_super) {
76
76
  DApplications.update(this);
77
77
  }
78
78
  };
79
+ DScrollBar.prototype.touch = function (silently) {
80
+ this.onChange(silently);
81
+ };
79
82
  DScrollBar.prototype.isRegionVisible = function () {
80
83
  return 0 < this._start || this._end < 1;
81
84
  };
@@ -111,20 +114,20 @@ var DScrollBar = /** @class */ (function (_super) {
111
114
  };
112
115
  DScrollBar.prototype.onFadeOutTimeout = function () {
113
116
  this._fadeOutTimeoutId = null;
114
- var fadeOutInterval = this._fadeOutDelay;
117
+ var fadeOutDelay = this._fadeOutDelay;
115
118
  var onTouchTimeoutBound = this._onFadeOutTimeoutBound;
116
119
  var state = this.state;
117
- if (state.isGesturing || state.isHovered || state.isPressed) {
118
- this._fadeOutTimeoutId = window.setTimeout(onTouchTimeoutBound, fadeOutInterval);
120
+ if (state.isGesturing || state.onHovered || state.isHovered || state.isPressed) {
121
+ this._fadeOutTimeoutId = window.setTimeout(onTouchTimeoutBound, fadeOutDelay);
119
122
  return;
120
123
  }
121
124
  var thumbState = this._thumb.state;
122
125
  if (thumbState.isGesturing || thumbState.isHovered || thumbState.isPressed) {
123
- this._fadeOutTimeoutId = window.setTimeout(onTouchTimeoutBound, fadeOutInterval);
126
+ this._fadeOutTimeoutId = window.setTimeout(onTouchTimeoutBound, fadeOutDelay);
124
127
  return;
125
128
  }
126
129
  var now = Date.now();
127
- var remainingTime = fadeOutInterval - (now - this._touchedAt);
130
+ var remainingTime = fadeOutDelay - (now - this._touchedAt);
128
131
  if (0 < remainingTime) {
129
132
  this._fadeOutTimeoutId = window.setTimeout(onTouchTimeoutBound, remainingTime);
130
133
  return;
@@ -1 +1 @@
1
- {"version":3,"file":"d-scroll-bar.js","sourceRoot":"","sources":["../../../src/main/typescript/wc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,CAAC,SAAS,EAAE;gBACrE,IAAI,CAAC,UAAU,GAAG,IAAI,CAAC,GAAG,EAAE,CAAC;aAC7B;SACD;IACF,CAAC;IAES,kCAAa,GAAvB,UAAwB,QAAuB,EAAE,QAAuB;QACvE,iBAAM,aAAa,YAAC,QAAQ,EAAE,QAAQ,CAAC,CAAC;QAExC,IAAI,CAAC,QAAQ,CAAC,WAAW,IAAI,CAAC,QAAQ,CAAC,SAAS,IAAI,CAAC,QAAQ,CAAC,SAAS,EAAE;YACxE,IAAI,QAAQ,CAAC,WAAW,IAAI,QAAQ,CAAC,SAAS,IAAI,QAAQ,CAAC,SAAS,EAAE;gBACrE,IAAI,CAAC,UAAU,GAAG,IAAI,CAAC,GAAG,EAAE,CAAC;aAC7B;SACD;IACF,CAAC;IAIS,4BAAO,GAAjB;QACC,OAAO,YAAY,CAAC;IACrB,CAAC;IACF,iBAAC;AAAD,CAAC,AAzKD,CAGU,KAAK,GAsKd","sourcesContent":["/*\n * Copyright (C) 2019 Toshiba Corporation\n * SPDX-License-Identifier: Apache-2.0\n */\n\nimport { DApplications } from \"./d-applications\";\nimport { DBase, DBaseOptions, DThemeBase } from \"./d-base\";\nimport { DBaseStateSet } from \"./d-base-state-set\";\nimport { DScrollBarThumb, DScrollBarThumbOptions } from \"./d-scroll-bar-thumb\";\n\nexport interface DScrollBarFadeOutOpiotns {\n\tdelay?: number;\n}\n\nexport interface DScrollBarOptions<THEME extends DThemeScrollBar = DThemeScrollBar>\n\textends DBaseOptions<THEME> {\n\tthumb?: DScrollBarThumbOptions;\n\tfadeOut?: DScrollBarFadeOutOpiotns;\n}\n\nexport interface DThemeScrollBar extends DThemeBase {\n\tgetFadeOutDelay(): number;\n}\n\nexport abstract class DScrollBar<\n\tTHEME extends DThemeScrollBar = DThemeScrollBar,\n\tOPTIONS extends DScrollBarOptions<THEME> = DScrollBarOptions<THEME>\n> extends DBase<THEME, OPTIONS> {\n\tprotected _start: number;\n\tprotected _end: number;\n\tprotected _thumb: DScrollBarThumb;\n\tprotected _touchedAt: number;\n\tprotected _isTouched: boolean;\n\tprotected _fadeOutTimeoutId: number | null;\n\tprotected _fadeOutDelay: number;\n\tprotected _onFadeOutTimeoutBound: () => void;\n\tprotected _isSilent: boolean;\n\n\tconstructor(options?: OPTIONS) {\n\t\tsuper(options);\n\n\t\tthis._start = 0;\n\t\tthis._end = 1;\n\t\tthis.visible = false;\n\t\tthis._touchedAt = -1;\n\t\tthis._isTouched = false;\n\t\tthis._fadeOutTimeoutId = null;\n\t\tthis._fadeOutDelay = options?.fadeOut?.delay ?? this.theme.getFadeOutDelay();\n\t\tthis._isSilent = true;\n\t\tthis._onFadeOutTimeoutBound = (): void => {\n\t\t\tthis.onFadeOutTimeout();\n\t\t};\n\t\tconst thumb = this.newThumb(options?.thumb);\n\t\tthumb.on(\"statechange\", (newState: DBaseStateSet, oldState: DBaseStateSet): void => {\n\t\t\tthis.onThumbStateChange(newState, oldState);\n\t\t});\n\t\tthis._thumb = thumb;\n\t\tthis.addChild(thumb);\n\t}\n\n\tget thumb(): DScrollBarThumb {\n\t\treturn this._thumb;\n\t}\n\n\tget start(): number {\n\t\treturn this._start;\n\t}\n\n\tget end(): number {\n\t\treturn this._end;\n\t}\n\n\tset(start: number, end: number, size: number, silently?: boolean): void {\n\t\tif (size < 1) {\n\t\t\tstart = 0;\n\t\t\tend = 1;\n\t\t} else {\n\t\t\tstart = Math.max(0, Math.min(1, start / size));\n\t\t\tend = Math.max(start, Math.min(1, end / size));\n\t\t}\n\t\tif (this._start !== start || this._end !== end) {\n\t\t\tthis._start = start;\n\t\t\tthis._end = end;\n\t\t\tthis.onChange(silently);\n\t\t}\n\t}\n\n\tprotected onChange(silently?: boolean): void {\n\t\tthis.updateThumb(this.width, this.height);\n\n\t\tif (silently) {\n\t\t\tthis._isSilent = true;\n\t\t}\n\t\tif (!this._isTouched) {\n\t\t\tthis._isTouched = true;\n\t\t\tDApplications.update(this);\n\t\t}\n\t}\n\n\tisRegionVisible(): boolean {\n\t\treturn 0 < this._start || this._end < 1;\n\t}\n\n\trender(renderer: PIXI.Renderer): void {\n\t\tif (this._isTouched) {\n\t\t\tthis._isTouched = false;\n\t\t\tif (!this._isSilent && this.isRegionVisible()) {\n\t\t\t\tconst fadeOutDelay = this._fadeOutDelay;\n\t\t\t\tif (0 <= fadeOutDelay) {\n\t\t\t\t\tthis._touchedAt = Date.now();\n\t\t\t\t\tif (this._fadeOutTimeoutId == null) {\n\t\t\t\t\t\tthis._fadeOutTimeoutId = window.setTimeout(\n\t\t\t\t\t\t\tthis._onFadeOutTimeoutBound,\n\t\t\t\t\t\t\tfadeOutDelay\n\t\t\t\t\t\t);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif (!this.visible) {\n\t\t\t\t\tthis.visible = true;\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tif (this._fadeOutDelay < 0 && this.visible) {\n\t\t\t\t\tthis.visible = false;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tif (this._isSilent) {\n\t\t\tthis._isSilent = false;\n\t\t}\n\t\tsuper.render(renderer);\n\t}\n\n\tonResize(newWidth: number, newHeight: number, oldWidth: number, oldHeight: number): void {\n\t\tsuper.onResize(newWidth, newHeight, oldWidth, oldHeight);\n\t\tthis.updateThumb(newWidth, newHeight);\n\t}\n\n\tprotected abstract updateThumb(width: number, height: number): void;\n\n\tprotected onFadeOutTimeout(): void {\n\t\tthis._fadeOutTimeoutId = null;\n\n\t\tconst fadeOutInterval = this._fadeOutDelay;\n\t\tconst onTouchTimeoutBound = this._onFadeOutTimeoutBound;\n\n\t\tconst state = this.state;\n\t\tif (state.isGesturing || state.isHovered || state.isPressed) {\n\t\t\tthis._fadeOutTimeoutId = window.setTimeout(onTouchTimeoutBound, fadeOutInterval);\n\t\t\treturn;\n\t\t}\n\n\t\tconst thumbState = this._thumb.state;\n\t\tif (thumbState.isGesturing || thumbState.isHovered || thumbState.isPressed) {\n\t\t\tthis._fadeOutTimeoutId = window.setTimeout(onTouchTimeoutBound, fadeOutInterval);\n\t\t\treturn;\n\t\t}\n\n\t\tconst now = Date.now();\n\t\tconst remainingTime = fadeOutInterval - (now - this._touchedAt);\n\t\tif (0 < remainingTime) {\n\t\t\tthis._fadeOutTimeoutId = window.setTimeout(onTouchTimeoutBound, remainingTime);\n\t\t\treturn;\n\t\t}\n\n\t\tif (this.visible) {\n\t\t\tthis.visible = false;\n\t\t\tDApplications.update(this);\n\t\t}\n\t}\n\n\tprotected onThumbStateChange(newState: DBaseStateSet, oldState: DBaseStateSet): void {\n\t\tif (!newState.isGesturing && !newState.isHovered && !newState.isPressed) {\n\t\t\tif (oldState.isGesturing || oldState.isHovered || oldState.isPressed) {\n\t\t\t\tthis._touchedAt = Date.now();\n\t\t\t}\n\t\t}\n\t}\n\n\tprotected onStateChange(newState: DBaseStateSet, oldState: DBaseStateSet): void {\n\t\tsuper.onStateChange(newState, oldState);\n\n\t\tif (!newState.isGesturing && !newState.isHovered && !newState.isPressed) {\n\t\t\tif (oldState.isGesturing || oldState.isHovered || oldState.isPressed) {\n\t\t\t\tthis._touchedAt = Date.now();\n\t\t\t}\n\t\t}\n\t}\n\n\tprotected abstract newThumb(options?: DScrollBarThumbOptions): DScrollBarThumb;\n\n\tprotected getType(): string {\n\t\treturn \"DScrollBar\";\n\t}\n}\n"]}
1
+ {"version":3,"file":"d-scroll-bar.js","sourceRoot":"","sources":["../../../src/main/typescript/wcardinal/ui/d-scroll-bar.ts"],"names":[],"mappings":"AAAA;;;GAGG;;AAEH,OAAO,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AACjD,OAAO,EAAE,KAAK,EAA4B,MAAM,UAAU,CAAC;AAkB3D;IAGU,8BAAqB;IAW9B,oBAAY,OAAiB;QAA7B,iBAoBC;;gBAnBA,kBAAM,OAAO,CAAC;QAEd,KAAI,CAAC,MAAM,GAAG,CAAC,CAAC;QAChB,KAAI,CAAC,IAAI,GAAG,CAAC,CAAC;QACd,KAAI,CAAC,OAAO,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AQ,CAAC,WAAW,IAAI,CAAC,QAAQ,CAAC,SAAS,IAAI,CAAC,QAAQ,CAAC,SAAS,EAAE;YACxE,IAAI,QAAQ,CAAC,WAAW,IAAI,QAAQ,CAAC,SAAS,IAAI,QAAQ,CAAC,SAAS,EAAE;gBACrE,IAAI,CAAC,UAAU,GAAG,IAAI,CAAC,GAAG,EAAE,CAAC;aAC7B;SACD;IACF,CAAC;IAIS,4BAAO,GAAjB;QACC,OAAO,YAAY,CAAC;IACrB,CAAC;IACF,iBAAC;AAAD,CAAC,AA7KD,CAGU,KAAK,GA0Kd","sourcesContent":["/*\n * Copyright (C) 2019 Toshiba Corporation\n * SPDX-License-Identifier: Apache-2.0\n */\n\nimport { DApplications } from \"./d-applications\";\nimport { DBase, DBaseOptions, DThemeBase } from \"./d-base\";\nimport { DBaseStateSet } from \"./d-base-state-set\";\nimport { DScrollBarThumb, DScrollBarThumbOptions } from \"./d-scroll-bar-thumb\";\n\nexport interface DScrollBarFadeOutOpiotns {\n\tdelay?: number;\n}\n\nexport interface DScrollBarOptions<THEME extends DThemeScrollBar = DThemeScrollBar>\n\textends DBaseOptions<THEME> {\n\tthumb?: DScrollBarThumbOptions;\n\tfadeOut?: DScrollBarFadeOutOpiotns;\n}\n\nexport interface DThemeScrollBar extends DThemeBase {\n\tgetFadeOutDelay(): number;\n}\n\nexport abstract class DScrollBar<\n\tTHEME extends DThemeScrollBar = DThemeScrollBar,\n\tOPTIONS extends DScrollBarOptions<THEME> = DScrollBarOptions<THEME>\n> extends DBase<THEME, OPTIONS> {\n\tprotected _start: number;\n\tprotected _end: number;\n\tprotected _thumb: DScrollBarThumb;\n\tprotected _touchedAt: number;\n\tprotected _isTouched: boolean;\n\tprotected _fadeOutTimeoutId: number | null;\n\tprotected _fadeOutDelay: number;\n\tprotected _onFadeOutTimeoutBound: () => void;\n\tprotected _isSilent: boolean;\n\n\tconstructor(options?: OPTIONS) {\n\t\tsuper(options);\n\n\t\tthis._start = 0;\n\t\tthis._end = 1;\n\t\tthis.visible = false;\n\t\tthis._touchedAt = -1;\n\t\tthis._isTouched = false;\n\t\tthis._fadeOutTimeoutId = null;\n\t\tthis._fadeOutDelay = options?.fadeOut?.delay ?? this.theme.getFadeOutDelay();\n\t\tthis._isSilent = true;\n\t\tthis._onFadeOutTimeoutBound = (): void => {\n\t\t\tthis.onFadeOutTimeout();\n\t\t};\n\t\tconst thumb = this.newThumb(options?.thumb);\n\t\tthumb.on(\"statechange\", (newState: DBaseStateSet, oldState: DBaseStateSet): void => {\n\t\t\tthis.onThumbStateChange(newState, oldState);\n\t\t});\n\t\tthis._thumb = thumb;\n\t\tthis.addChild(thumb);\n\t}\n\n\tget thumb(): DScrollBarThumb {\n\t\treturn this._thumb;\n\t}\n\n\tget start(): number {\n\t\treturn this._start;\n\t}\n\n\tget end(): number {\n\t\treturn this._end;\n\t}\n\n\tset(start: number, end: number, size: number, silently?: boolean): void {\n\t\tif (size < 1) {\n\t\t\tstart = 0;\n\t\t\tend = 1;\n\t\t} else {\n\t\t\tstart = Math.max(0, Math.min(1, start / size));\n\t\t\tend = Math.max(start, Math.min(1, end / size));\n\t\t}\n\t\tif (this._start !== start || this._end !== end) {\n\t\t\tthis._start = start;\n\t\t\tthis._end = end;\n\t\t\tthis.onChange(silently);\n\t\t}\n\t}\n\n\tprotected onChange(silently?: boolean): void {\n\t\tthis.updateThumb(this.width, this.height);\n\n\t\tif (silently) {\n\t\t\tthis._isSilent = true;\n\t\t}\n\t\tif (!this._isTouched) {\n\t\t\tthis._isTouched = true;\n\t\t\tDApplications.update(this);\n\t\t}\n\t}\n\n\ttouch(silently?: boolean): void {\n\t\tthis.onChange(silently);\n\t}\n\n\tisRegionVisible(): boolean {\n\t\treturn 0 < this._start || this._end < 1;\n\t}\n\n\trender(renderer: PIXI.Renderer): void {\n\t\tif (this._isTouched) {\n\t\t\tthis._isTouched = false;\n\t\t\tif (!this._isSilent && this.isRegionVisible()) {\n\t\t\t\tconst fadeOutDelay = this._fadeOutDelay;\n\t\t\t\tif (0 <= fadeOutDelay) {\n\t\t\t\t\tthis._touchedAt = Date.now();\n\t\t\t\t\tif (this._fadeOutTimeoutId == null) {\n\t\t\t\t\t\tthis._fadeOutTimeoutId = window.setTimeout(\n\t\t\t\t\t\t\tthis._onFadeOutTimeoutBound,\n\t\t\t\t\t\t\tfadeOutDelay\n\t\t\t\t\t\t);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif (!this.visible) {\n\t\t\t\t\tthis.visible = true;\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tif (this._fadeOutDelay < 0 && this.visible) {\n\t\t\t\t\tthis.visible = false;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tif (this._isSilent) {\n\t\t\tthis._isSilent = false;\n\t\t}\n\t\tsuper.render(renderer);\n\t}\n\n\tonResize(newWidth: number, newHeight: number, oldWidth: number, oldHeight: number): void {\n\t\tsuper.onResize(newWidth, newHeight, oldWidth, oldHeight);\n\t\tthis.updateThumb(newWidth, newHeight);\n\t}\n\n\tprotected abstract updateThumb(width: number, height: number): void;\n\n\tprotected onFadeOutTimeout(): void {\n\t\tthis._fadeOutTimeoutId = null;\n\n\t\tconst fadeOutDelay = this._fadeOutDelay;\n\t\tconst onTouchTimeoutBound = this._onFadeOutTimeoutBound;\n\n\t\tconst state = this.state;\n\t\tif (state.isGesturing || state.onHovered || state.isHovered || state.isPressed) {\n\t\t\tthis._fadeOutTimeoutId = window.setTimeout(onTouchTimeoutBound, fadeOutDelay);\n\t\t\treturn;\n\t\t}\n\n\t\tconst thumbState = this._thumb.state;\n\t\tif (thumbState.isGesturing || thumbState.isHovered || thumbState.isPressed) {\n\t\t\tthis._fadeOutTimeoutId = window.setTimeout(onTouchTimeoutBound, fadeOutDelay);\n\t\t\treturn;\n\t\t}\n\n\t\tconst now = Date.now();\n\t\tconst remainingTime = fadeOutDelay - (now - this._touchedAt);\n\t\tif (0 < remainingTime) {\n\t\t\tthis._fadeOutTimeoutId = window.setTimeout(onTouchTimeoutBound, remainingTime);\n\t\t\treturn;\n\t\t}\n\n\t\tif (this.visible) {\n\t\t\tthis.visible = false;\n\t\t\tDApplications.update(this);\n\t\t}\n\t}\n\n\tprotected onThumbStateChange(newState: DBaseStateSet, oldState: DBaseStateSet): void {\n\t\tif (!newState.isGesturing && !newState.isHovered && !newState.isPressed) {\n\t\t\tif (oldState.isGesturing || oldState.isHovered || oldState.isPressed) {\n\t\t\t\tthis._touchedAt = Date.now();\n\t\t\t}\n\t\t}\n\t}\n\n\tprotected onStateChange(newState: DBaseStateSet, oldState: DBaseStateSet): void {\n\t\tsuper.onStateChange(newState, oldState);\n\n\t\tif (!newState.isGesturing && !newState.isHovered && !newState.isPressed) {\n\t\t\tif (oldState.isGesturing || oldState.isHovered || oldState.isPressed) {\n\t\t\t\tthis._touchedAt = Date.now();\n\t\t\t}\n\t\t}\n\t}\n\n\tprotected abstract newThumb(options?: DScrollBarThumbOptions): DScrollBarThumb;\n\n\tprotected getType(): string {\n\t\treturn \"DScrollBar\";\n\t}\n}\n"]}
@@ -148,8 +148,7 @@ var DTableBody = /** @class */ (function (_super) {
148
148
  var newRowIndexMappedStart = Math.floor(newRowIndexMappedLowerBound);
149
149
  newRowIndexMappedStart -= newRowIndexMappedStart % 2 === 0 ? 2 : 1;
150
150
  var newRowIndexMappedEnd = Math.floor(newRowIndexMappedUpperBound);
151
- newRowIndexMappedEnd +=
152
- (newRowIndexMappedUpperBound - newRowIndexMappedStart + 1) % 2 === 0 ? 3 : 2;
151
+ newRowIndexMappedEnd += (newRowIndexMappedEnd - newRowIndexMappedStart) % 2 === 1 ? 3 : 2;
153
152
  var newRowCount = newRowIndexMappedEnd - newRowIndexMappedStart;
154
153
  if (newRowCount < oldRowCount && oldRowCount - 2 <= newRowCount) {
155
154
  newRowCount = oldRowCount;
@@ -1 +1 @@
1
- {"version":3,"file":"d-table-body.js","sourceRoot":"","sources":["../../../src/main/typescript/wcardinal/ui/d-table-body.ts"],"names":[],"mappings":"AA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AAE,kBAAkB,CAAC,CAAC;IAChD,CAAC;IAES,4BAAO,GAAjB;QACC,OAAO,YAAY,CAAC;IACrB,CAAC;IAED,sBAAI,4BAAI;aAAR;YACC,OAAO,IAAI,CAAC,KAAK,CAAC;QACnB,CAAC;;;OAAA;IA/agB,wBAAa,GAAG,IAAI,KAAK,EAAE,CAAC;IAgb9C,iBAAC;CAAA,AAtbD,CAKU,KAAK,GAibd;SAtbY,UAAU","sourcesContent":["/*\n * Copyright (C) 2019 Toshiba Corporation\n * SPDX-License-Identifier: Apache-2.0\n */\n\nimport { interaction, Point, Rectangle } from \"pixi.js\";\nimport InteractionEvent = interaction.InteractionEvent;\nimport { DBase, DBaseEvents, DBaseOptions, DThemeBase } from \"./d-base\";\nimport { DBaseState } from \"./d-base-state\";\nimport { DTableBodyRow, DTableBodyRowOnChange, DTableBodyRowOptions } from \"./d-table-body-row\";\nimport { DTableColumn } from \"./d-table-column\";\nimport { DTableData, DTableDataOptions } from \"./d-table-data\";\nimport { DTableDataList, DTableDataListOptions } from \"./d-table-data-list\";\nimport { DTableDataSelection, DTableDataSelectionType } from \"./d-table-data-selection\";\nimport { DTableBodyCell } from \"./d-table-body-cell\";\nimport { DTableState } from \"./d-table-state\";\nimport { DTableBodyCellOptions } from \"./d-table-body-cell-options\";\nimport { DOnOptions } from \"./d-on-options\";\n\n/**\n * {@link DTableBody} events.\n */\nexport interface DTableBodyEvents<EMITTER> extends DBaseEvents<EMITTER> {\n\t/**\n\t * Triggered when rows are updated.\n\t * The first and second parameters are an mapped index range of visible data.\n\t * Please note that these parameters are real numbers.\n\t * For instance, An index range of [0.5, 2.5] means:\n\t *\n\t * * The row at index 0 is partially visible.\n\t * * The row at index 1 is fully visible.\n\t * * The row at index 2 is partially visible.\n\t *\n\t * @param from a lowest mapped index of visible data\n\t * @param to a highest mapped index of vislble data\n\t * @param emitter an emitter\n\t */\n\tupdate(from: number, to: number, emitter: EMITTER): void;\n}\n\n/**\n * {@link DTableBody} \"on\" options.\n */\nexport interface DTableBodyOnOptions<EMITTER>\n\textends Partial<DTableBodyEvents<EMITTER>>,\n\t\tDOnOptions {}\n\nexport interface DTableBodyOptions<\n\tROW,\n\tDATA extends DTableData<ROW> = DTableDataList<ROW>,\n\tTHEME extends DThemeTableBody = DThemeTableBody,\n\tEMITTER = any\n> extends DBaseOptions<THEME, EMITTER> {\n\tcolumns?: Array<DTableColumn<ROW, unknown>>;\n\trow?: DTableBodyRowOptions<ROW>;\n\tdata?: DTableDataListOptions<ROW> | DATA;\n\toffset?: number;\n\tfrozen?: number;\n\ton?: DTableBodyOnOptions<EMITTER>;\n}\n\nexport interface DThemeTableBody extends DThemeBase {\n\tgetRowHeight(): number;\n}\n\nconst toRowOptions = <ROW, DATA extends DTableData<ROW>>(\n\ttheme: DThemeTableBody,\n\toptions: DTableBodyOptions<ROW, DATA>,\n\tselectionType: DTableDataSelectionType\n): DTableBodyRowOptions<ROW> => {\n\tconst columns = options.columns || [];\n\tlet result = options.row;\n\tif (result != null) {\n\t\tif (result.height == null) {\n\t\t\tresult.height = theme.getRowHeight();\n\t\t}\n\t\tif (result.columns === undefined) {\n\t\t\tresult.columns = columns;\n\t\t}\n\t\tif (result.frozen == null) {\n\t\t\tresult.frozen = options.frozen;\n\t\t}\n\t\tif (result.selection === undefined) {\n\t\t\tresult.selection = {\n\t\t\t\ttype: selectionType\n\t\t\t};\n\t\t} else if (result.selection.type === undefined) {\n\t\t\tresult.selection.type = selectionType;\n\t\t}\n\t} else {\n\t\tresult = {\n\t\t\tcolumns,\n\t\t\theight: theme.getRowHeight(),\n\t\t\tfrozen: options.frozen,\n\t\t\tselection: {\n\t\t\t\ttype: selectionType\n\t\t\t}\n\t\t};\n\t}\n\treturn result as DTableBodyRowOptions<ROW>;\n};\n\nexport class DTableBody<\n\tROW,\n\tDATA extends DTableData<ROW> = DTableDataList<ROW>,\n\tTHEME extends DThemeTableBody = DThemeTableBody,\n\tOPTIONS extends DTableBodyOptions<ROW, DATA, THEME> = DTableBodyOptions<ROW, DATA, THEME>\n> extends DBase<THEME, OPTIONS> {\n\tprotected static WORK_ON_CLICK = new Point();\n\n\tprotected _columns: Array<DTableColumn<ROW, unknown>>;\n\tprotected _rowHeight: number;\n\tprotected _rowIndexMappedStart: number;\n\tprotected _rowIndexMappedEnd: number;\n\tprotected _rowOptions: DTableBodyRowOptions<ROW>;\n\tprotected _updateRowsCount: number;\n\tprotected _isUpdateRowsCalled: boolean;\n\tprotected _isUpdateRowsCalledForcibly: boolean;\n\tprotected _workRows: Array<DTableBodyRow<ROW>>;\n\tprotected _onRowChangeBound: DTableBodyRowOnChange<ROW, unknown>;\n\tprotected _columnIndexToCellOptions: Map<number, DTableBodyCellOptions<ROW>>;\n\tprotected _data: DATA;\n\n\tconstructor(options: OPTIONS) {\n\t\tsuper(options);\n\n\t\tthis.transform.position.y = options.offset ?? 0;\n\t\tconst data = this.toData(options.data);\n\t\tthis._data = data;\n\t\tdata.bind(this);\n\t\tconst theme = this.theme;\n\t\tconst rowOptions = toRowOptions(theme, options, data.selection.type);\n\t\tthis._rowOptions = rowOptions;\n\t\tthis._rowHeight = rowOptions.height != null ? rowOptions.height : theme.getRowHeight();\n\t\tthis._columns = rowOptions.columns || [];\n\t\tthis._rowIndexMappedStart = 0;\n\t\tthis._rowIndexMappedEnd = 0;\n\t\tthis._updateRowsCount = 0;\n\t\tthis._isUpdateRowsCalled = false;\n\t\tthis._isUpdateRowsCalledForcibly = false;\n\t\tthis._workRows = [];\n\t\tthis._onRowChangeBound = (newValue, oldValue, row, rowIndex, columnIndex): void => {\n\t\t\tdata.emit(\"change\", newValue, oldValue, row, rowIndex, columnIndex, data);\n\t\t};\n\t\tthis._columnIndexToCellOptions = new Map<number, DTableBodyCellOptions<ROW>>();\n\t\tthis._data.emit(\"init\", this._data);\n\t}\n\n\tprotected toData(options?: DATA | DTableDataListOptions<ROW>): DATA {\n\t\tif (this.isData(options)) {\n\t\t\treturn options;\n\t\t}\n\t\treturn new DTableDataList<ROW>(options) as any;\n\t}\n\n\tprotected isData(\n\t\ttarget?: ROW[] | DTableDataOptions<ROW> | DTableData<ROW>\n\t): target is DTableData<ROW> {\n\t\treturn target != null && \"mapped\" in target;\n\t}\n\n\tonResize(newWidth: number, newHeight: number, oldWidth: number, oldHeight: number): void {\n\t\tsuper.onResize(newWidth, newHeight, oldWidth, oldHeight);\n\t\tthis.update();\n\t}\n\n\tget selection(): DTableDataSelection<ROW> {\n\t\treturn this._data.selection;\n\t}\n\n\tlock(): void {\n\t\tthis._updateRowsCount += 1;\n\t\tif (this._updateRowsCount === 1) {\n\t\t\tthis._isUpdateRowsCalled = false;\n\t\t\tthis._isUpdateRowsCalledForcibly = false;\n\t\t}\n\t}\n\n\tunlock(callIfNeeded: boolean): void {\n\t\tthis._updateRowsCount -= 1;\n\t\tif (this._updateRowsCount === 0) {\n\t\t\tif (callIfNeeded && this._isUpdateRowsCalled) {\n\t\t\t\tthis.update(this._isUpdateRowsCalledForcibly);\n\t\t\t}\n\t\t\tthis._isUpdateRowsCalled = false;\n\t\t\tthis._isUpdateRowsCalledForcibly = false;\n\t\t}\n\t}\n\n\t/**\n\t * Updates rows. If the `forcibly` is true, some dirty checkings for\n\t * avoiding unnecessary state changes are skipped.\n\t *\n\t * @param forcibly true to update forcibly\n\t */\n\tupdate(forcibly?: boolean): void {\n\t\tif (0 < this._updateRowsCount) {\n\t\t\tthis._isUpdateRowsCalled = true;\n\t\t\tif (forcibly) {\n\t\t\t\tthis._isUpdateRowsCalledForcibly = true;\n\t\t\t}\n\t\t\treturn;\n\t\t}\n\n\t\tconst content = this.parent;\n\t\tif (content == null) {\n\t\t\treturn;\n\t\t}\n\t\tconst contentParent = content.parent;\n\t\tif (contentParent == null) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst rows = this.children as Array<DTableBodyRow<ROW>>;\n\t\tconst height = contentParent.height;\n\t\tconst rowHeight = this._rowHeight;\n\n\t\tconst data = this._data;\n\t\tconst dataMappedSize = data.mapped.size();\n\n\t\tconst oldRowIndexMappedStart = this._rowIndexMappedStart;\n\t\tlet oldRowIndexMappedEnd = this._rowIndexMappedEnd;\n\t\tlet oldRowCount = oldRowIndexMappedEnd - oldRowIndexMappedStart;\n\n\t\tconst y = this.transform.position.y;\n\t\tconst newHeight = y + dataMappedSize * rowHeight;\n\t\tconst newContentHeight = Math.max(height, newHeight);\n\t\tconst newContentY = Math.max(height - newContentHeight, content.position.y);\n\n\t\tconst newRowIndexMappedLowerBound = -newContentY / rowHeight;\n\t\tconst newRowIndexMappedUpperBound = (height - (newContentY + y)) / rowHeight;\n\t\tlet newRowIndexMappedStart = Math.floor(newRowIndexMappedLowerBound);\n\t\tnewRowIndexMappedStart -= newRowIndexMappedStart % 2 === 0 ? 2 : 1;\n\t\tlet newRowIndexMappedEnd = Math.floor(newRowIndexMappedUpperBound);\n\t\tnewRowIndexMappedEnd +=\n\t\t\t(newRowIndexMappedUpperBound - newRowIndexMappedStart + 1) % 2 === 0 ? 3 : 2;\n\t\tlet newRowCount = newRowIndexMappedEnd - newRowIndexMappedStart;\n\t\tif (newRowCount < oldRowCount && oldRowCount - 2 <= newRowCount) {\n\t\t\tnewRowCount = oldRowCount;\n\t\t\tnewRowIndexMappedEnd = newRowIndexMappedStart + newRowCount;\n\t\t}\n\n\t\tif (oldRowCount < newRowCount) {\n\t\t\tfor (let i = oldRowCount; i < newRowCount; ++i) {\n\t\t\t\tconst oldRowIndexMapped = oldRowIndexMappedStart + i;\n\t\t\t\tconst newRow = this.newRow(oldRowIndexMapped % 2 === 0);\n\t\t\t\tthis.addChild(newRow);\n\t\t\t}\n\t\t\toldRowCount = newRowCount;\n\t\t\toldRowIndexMappedEnd = oldRowIndexMappedStart + oldRowCount;\n\t\t} else if (newRowCount < oldRowCount) {\n\t\t\tfor (let i = oldRowCount - 1; newRowCount <= i; --i) {\n\t\t\t\tthis.removeChild(rows[i]);\n\t\t\t}\n\t\t\toldRowCount = newRowCount;\n\t\t\toldRowIndexMappedEnd = oldRowIndexMappedStart + oldRowCount;\n\t\t}\n\n\t\tthis._rowIndexMappedStart = newRowIndexMappedStart;\n\t\tthis._rowIndexMappedEnd = newRowIndexMappedEnd;\n\n\t\tconst rowIndexMappedStartDelta = newRowIndexMappedStart - oldRowIndexMappedStart;\n\t\tconst rowIndexMappedStartDeltaAbs = Math.abs(rowIndexMappedStartDelta);\n\t\tconst rowsLength = rows.length;\n\t\tif (0 < rowIndexMappedStartDeltaAbs && rowIndexMappedStartDeltaAbs < rowsLength) {\n\t\t\tconst work = this._workRows;\n\t\t\tif (0 < rowIndexMappedStartDelta) {\n\t\t\t\tfor (let i = 0; i < rowIndexMappedStartDeltaAbs; ++i) {\n\t\t\t\t\twork.push(this.resetRow(rows[i]));\n\t\t\t\t}\n\t\t\t\tfor (let i = rowIndexMappedStartDeltaAbs; i < rowsLength; ++i) {\n\t\t\t\t\trows[i - rowIndexMappedStartDeltaAbs] = rows[i];\n\t\t\t\t}\n\t\t\t\tfor (let i = 0; i < rowIndexMappedStartDeltaAbs; ++i) {\n\t\t\t\t\trows[rowsLength - rowIndexMappedStartDeltaAbs + i] = work[i];\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tfor (let i = 0; i < rowIndexMappedStartDeltaAbs; ++i) {\n\t\t\t\t\twork.push(this.resetRow(rows[rowsLength - rowIndexMappedStartDeltaAbs + i]));\n\t\t\t\t}\n\t\t\t\tfor (let i = rowsLength - rowIndexMappedStartDeltaAbs - 1; 0 <= i; --i) {\n\t\t\t\t\trows[i + rowIndexMappedStartDeltaAbs] = rows[i];\n\t\t\t\t}\n\t\t\t\tfor (let i = 0; i < rowIndexMappedStartDeltaAbs; ++i) {\n\t\t\t\t\trows[i] = work[i];\n\t\t\t\t}\n\t\t\t}\n\t\t\twork.length = 0;\n\t\t}\n\n\t\tconst selection = data.selection;\n\t\tconst isRowSelectable = selection.type !== DTableDataSelectionType.NONE;\n\t\tdata.mapped.each(\n\t\t\t(\n\t\t\t\tdatum: ROW,\n\t\t\t\tsupplimental: unknown,\n\t\t\t\tindex: number,\n\t\t\t\tunmappedIndex: number\n\t\t\t): void | boolean => {\n\t\t\t\tconst row = rows[index - newRowIndexMappedStart];\n\n\t\t\t\t// Position\n\t\t\t\trow.position.y = index * rowHeight;\n\n\t\t\t\t// State\n\t\t\t\tconst rowState = row.state;\n\t\t\t\trowState.lock();\n\t\t\t\trowState.set(DTableState.SELECTABLE, isRowSelectable);\n\t\t\t\trowState.set(DBaseState.ACTIVE, selection.contains(unmappedIndex));\n\t\t\t\trowState.remove(DBaseState.DISABLED);\n\t\t\t\trowState.unlock();\n\n\t\t\t\t// Data\n\t\t\t\trow.set(datum, supplimental, unmappedIndex, forcibly);\n\t\t\t},\n\t\t\tnewRowIndexMappedStart,\n\t\t\tnewRowIndexMappedStart + rowsLength\n\t\t);\n\n\t\tfor (let i = 0; newRowIndexMappedStart + i < 0 && i < rowsLength; ++i) {\n\t\t\tconst row = rows[i];\n\n\t\t\t// Position\n\t\t\trow.position.y = (newRowIndexMappedStart + i) * rowHeight;\n\n\t\t\t// State\n\t\t\tconst rowState = row.state;\n\t\t\trowState.lock();\n\t\t\trowState.add(DBaseState.DISABLED);\n\t\t\trowState.removeAll(DTableState.SELECTABLE, DBaseState.ACTIVE);\n\t\t\trowState.unlock();\n\n\t\t\t// Data\n\t\t\trow.unset();\n\t\t}\n\n\t\tfor (let i = rowsLength - 1; dataMappedSize <= newRowIndexMappedStart + i && 0 <= i; --i) {\n\t\t\tconst row = rows[i];\n\n\t\t\t// Position\n\t\t\trow.position.y = (newRowIndexMappedStart + i) * rowHeight;\n\n\t\t\t// State\n\t\t\tconst rowState = row.state;\n\t\t\trowState.lock();\n\t\t\trowState.add(DBaseState.DISABLED);\n\t\t\trowState.removeAll(DTableState.SELECTABLE, DBaseState.ACTIVE);\n\t\t\trowState.unlock();\n\n\t\t\t// Data\n\t\t\trow.unset();\n\t\t}\n\n\t\tthis.lock();\n\t\tcontent.position.y = newContentY;\n\t\tcontent.height = newContentHeight;\n\t\tthis.height = newHeight;\n\t\tthis.unlock(false);\n\t\tthis.emit(\"update\", newRowIndexMappedLowerBound, newRowIndexMappedUpperBound, this);\n\t}\n\n\tprotected resetRow(row: DTableBodyRow<ROW>): DTableBodyRow<ROW> {\n\t\trow.blur(true);\n\t\tconst cells = row.children;\n\t\tfor (let i = 0, imax = cells.length; i < imax; ++i) {\n\t\t\tconst cell = cells[i];\n\t\t\tif (cell instanceof DBase) {\n\t\t\t\tcell.state.isPressed = false;\n\t\t\t}\n\t\t}\n\t\treturn row;\n\t}\n\n\tprotected newRow(isEven: boolean): DTableBodyRow<ROW> {\n\t\treturn new DTableBodyRow<ROW>(\n\t\t\tthis._onRowChangeBound,\n\t\t\tisEven,\n\t\t\tthis._columnIndexToCellOptions,\n\t\t\tthis._rowOptions\n\t\t);\n\t}\n\n\tprotected onParentMove(newX: number, newY: number, oldX: number, oldY: number): void {\n\t\tsuper.onParentMove(newX, newY, oldX, oldY);\n\t\tthis.updateFrozenCellPosition(newX);\n\t}\n\n\tprotected updateFrozenCellPosition(x: number): void {\n\t\tconst frozen = this._rowOptions.frozen;\n\t\tif (frozen != null && 0 < frozen) {\n\t\t\tconst rows = this.children as Array<DTableBodyRow<ROW>>;\n\t\t\tfor (let i = 0, imax = rows.length; i < imax; ++i) {\n\t\t\t\trows[i].updateFrozenCellPosition(x);\n\t\t\t}\n\t\t}\n\t}\n\n\tgetClippingRect(target: unknown, result: Rectangle): void {\n\t\tsuper.getClippingRect(target, result);\n\n\t\tconst parent = this.parent;\n\t\tif (parent) {\n\t\t\tconst dy = -parent.transform.position.y;\n\t\t\tresult.y += dy;\n\t\t\tresult.height -= dy;\n\t\t}\n\t}\n\n\tprotected toRowIndexMapped(local: Point): number {\n\t\tif (0 <= this.parent.position.y + local.y) {\n\t\t\treturn Math.floor(local.y / this._rowHeight);\n\t\t}\n\t\treturn -1;\n\t}\n\n\tprotected toRow(rowIndexMapped: number): DTableBodyRow<ROW> | null {\n\t\tconst index = rowIndexMapped - this._rowIndexMappedStart;\n\t\tconst rows = this.children as Array<DTableBodyRow<ROW>>;\n\t\tif (0 <= index && index < rows.length) {\n\t\t\treturn rows[index];\n\t\t}\n\t\treturn null;\n\t}\n\n\tprotected toCell(row: DTableBodyRow<ROW>, local: Point): DTableBodyCell<ROW, unknown> | null {\n\t\tconst cells = row.children as Array<DTableBodyCell<ROW, unknown>>;\n\t\tconst cellsLength = cells.length;\n\t\tconst columns = this._columns;\n\t\tconst columnsLength = columns.length;\n\t\tfor (let i = 0, imax = Math.min(cellsLength, columnsLength); i < imax; ++i) {\n\t\t\tconst cell = cells[cellsLength - i - 1];\n\t\t\tconst x = local.x - cell.position.x;\n\t\t\tif (0 <= x && x <= cell.width) {\n\t\t\t\treturn cell;\n\t\t\t}\n\t\t}\n\t\treturn null;\n\t}\n\n\tonRowClick(e: InteractionEvent): void {\n\t\tif (this.state.isActionable) {\n\t\t\tconst local = DTableBody.WORK_ON_CLICK;\n\t\t\tlocal.copyFrom(e.data.global);\n\t\t\tthis.toLocal(local, undefined, local, false);\n\t\t\tconst rowIndexMapped = this.toRowIndexMapped(local);\n\t\t\tif (0 <= rowIndexMapped && rowIndexMapped < this._data.mapped.size()) {\n\t\t\t\t// Delegate to the cell at first\n\t\t\t\tconst row = this.toRow(rowIndexMapped);\n\t\t\t\tif (row) {\n\t\t\t\t\tconst cell = this.toCell(row, local);\n\t\t\t\t\tif (cell && cell.onRowSelect && cell.onRowSelect(e, local)) {\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t// Fallback to the default\n\t\t\t\tthis.onRowSelect(e, rowIndexMapped);\n\t\t\t}\n\t\t}\n\t}\n\n\tprotected onRowSelect(e: InteractionEvent, rowIndexMapped: number): void {\n\t\tconst data = this._data;\n\t\tconst selection = data.selection;\n\t\tconst isSingle = selection.type === DTableDataSelectionType.SINGLE;\n\t\tconst isNotSingle = !isSingle;\n\t\tconst rowIndex = data.mapped.unmap(rowIndexMapped);\n\t\tconst originalEvent = e.data.originalEvent;\n\t\tconst ctrlKey = originalEvent.ctrlKey;\n\t\tconst shiftKey = originalEvent.shiftKey;\n\t\tif (isSingle || selection.isEmpty() || !(isNotSingle && (ctrlKey || shiftKey))) {\n\t\t\tselection.clearAndAdd(rowIndex);\n\t\t} else if (ctrlKey) {\n\t\t\tselection.toggle(rowIndex);\n\t\t} else if (shiftKey) {\n\t\t\tconst lastRowIndex = selection.last;\n\t\t\tif (lastRowIndex != null) {\n\t\t\t\tconst sorter = data.sorter;\n\t\t\t\tconst filter = data.filter;\n\t\t\t\tconst rowIndexSorted = sorter.map(rowIndex);\n\t\t\t\tconst lastRowIndexSorted = sorter.map(lastRowIndex);\n\t\t\t\tif (rowIndexSorted != null && lastRowIndexSorted != null) {\n\t\t\t\t\tlet istart = lastRowIndexSorted + 1;\n\t\t\t\t\tlet iend = rowIndexSorted + 1;\n\t\t\t\t\tif (rowIndexSorted < lastRowIndexSorted) {\n\t\t\t\t\t\tistart = rowIndexSorted;\n\t\t\t\t\t\tiend = lastRowIndexSorted;\n\t\t\t\t\t}\n\t\t\t\t\tif (istart < iend) {\n\t\t\t\t\t\tconst rowIndices: number[] = [];\n\t\t\t\t\t\tconst indicesFiltered = filter.indices;\n\t\t\t\t\t\tconst indicesSorted = sorter.indices;\n\t\t\t\t\t\tif (indicesFiltered) {\n\t\t\t\t\t\t\tif (indicesSorted) {\n\t\t\t\t\t\t\t\tfor (let i = 0, imax = indicesFiltered.length; i < imax; ++i) {\n\t\t\t\t\t\t\t\t\tconst indexFiltered = indicesFiltered[i];\n\t\t\t\t\t\t\t\t\tif (istart <= indexFiltered && indexFiltered < iend) {\n\t\t\t\t\t\t\t\t\t\trowIndices.push(indicesSorted[indexFiltered]);\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\tfor (let i = 0, imax = indicesFiltered.length; i < imax; ++i) {\n\t\t\t\t\t\t\t\t\tconst indexFiltered = indicesFiltered[i];\n\t\t\t\t\t\t\t\t\tif (istart <= indexFiltered && indexFiltered < iend) {\n\t\t\t\t\t\t\t\t\t\trowIndices.push(indexFiltered);\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tif (indicesSorted) {\n\t\t\t\t\t\t\t\tfor (let i = istart; i < iend; ++i) {\n\t\t\t\t\t\t\t\t\trowIndices.push(indicesSorted[i]);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\tfor (let i = istart; i < iend; ++i) {\n\t\t\t\t\t\t\t\t\trowIndices.push(i);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\tselection.addAll(rowIndices);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\tonDblClick(\n\t\te: MouseEvent | TouchEvent,\n\t\tinteractionManager: interaction.InteractionManager\n\t): boolean {\n\t\treturn super.onDblClick(e, interactionManager);\n\t}\n\n\tprotected getType(): string {\n\t\treturn \"DTableBody\";\n\t}\n\n\tget data(): DATA {\n\t\treturn this._data;\n\t}\n}\n"]}
1
+ {"version":3,"file":"d-table-body.js","sourceRoot":"","sources":["../../../src/main/typescript/wcardinal/ui/d-table-body.ts"],"names":[],"mappings":"AAAA;;;GAGG;;AAEH,OAAO,EAAe,KAAK,EAAa,MAAM,SAAS,CAAC;AAExD,OAAO,EAAE,KAAK,EAAyC,MAAM,UAAU,CAAC;AACxE,OAAO,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC;AAC5C,OAAO,EAAE,aAAa,EAA+C,MAAM,oBAAoB,CAAC;AAGhG,OAAO,EAAE,cAAc,EAAyB,MAAM,qBAAqB,CAAC;AAC5E,OAAO,EAAuB,uBAAuB,EAAE,MAAM,0BAA0B,CAAC;AAExF,OAAO,EAA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import { interaction, Point, Rectangle } from \"pixi.js\";\nimport InteractionEvent = interaction.InteractionEvent;\nimport { DBase, DBaseEvents, DBaseOptions, DThemeBase } from \"./d-base\";\nimport { DBaseState } from \"./d-base-state\";\nimport { DTableBodyRow, DTableBodyRowOnChange, DTableBodyRowOptions } from \"./d-table-body-row\";\nimport { DTableColumn } from \"./d-table-column\";\nimport { DTableData, DTableDataOptions } from \"./d-table-data\";\nimport { DTableDataList, DTableDataListOptions } from \"./d-table-data-list\";\nimport { DTableDataSelection, DTableDataSelectionType } from \"./d-table-data-selection\";\nimport { DTableBodyCell } from \"./d-table-body-cell\";\nimport { DTableState } from \"./d-table-state\";\nimport { DTableBodyCellOptions } from \"./d-table-body-cell-options\";\nimport { DOnOptions } from \"./d-on-options\";\n\n/**\n * {@link DTableBody} events.\n */\nexport interface DTableBodyEvents<EMITTER> extends DBaseEvents<EMITTER> {\n\t/**\n\t * Triggered when rows are updated.\n\t * The first and second parameters are an mapped index range of visible data.\n\t * Please note that these parameters are real numbers.\n\t * For instance, An index range of [0.5, 2.5] means:\n\t *\n\t * * The row at index 0 is partially visible.\n\t * * The row at index 1 is fully visible.\n\t * * The row at index 2 is partially visible.\n\t *\n\t * @param from a lowest mapped index of visible data\n\t * @param to a highest mapped index of vislble data\n\t * @param emitter an emitter\n\t */\n\tupdate(from: number, to: number, emitter: EMITTER): void;\n}\n\n/**\n * {@link DTableBody} \"on\" options.\n */\nexport interface DTableBodyOnOptions<EMITTER>\n\textends Partial<DTableBodyEvents<EMITTER>>,\n\t\tDOnOptions {}\n\nexport interface DTableBodyOptions<\n\tROW,\n\tDATA extends DTableData<ROW> = DTableDataList<ROW>,\n\tTHEME extends DThemeTableBody = DThemeTableBody,\n\tEMITTER = any\n> extends DBaseOptions<THEME, EMITTER> {\n\tcolumns?: Array<DTableColumn<ROW, unknown>>;\n\trow?: DTableBodyRowOptions<ROW>;\n\tdata?: DTableDataListOptions<ROW> | DATA;\n\toffset?: number;\n\tfrozen?: number;\n\ton?: DTableBodyOnOptions<EMITTER>;\n}\n\nexport interface DThemeTableBody extends DThemeBase {\n\tgetRowHeight(): number;\n}\n\nconst toRowOptions = <ROW, DATA extends DTableData<ROW>>(\n\ttheme: DThemeTableBody,\n\toptions: DTableBodyOptions<ROW, DATA>,\n\tselectionType: DTableDataSelectionType\n): DTableBodyRowOptions<ROW> => {\n\tconst columns = options.columns || [];\n\tlet result = options.row;\n\tif (result != null) {\n\t\tif (result.height == null) {\n\t\t\tresult.height = theme.getRowHeight();\n\t\t}\n\t\tif (result.columns === undefined) {\n\t\t\tresult.columns = columns;\n\t\t}\n\t\tif (result.frozen == null) {\n\t\t\tresult.frozen = options.frozen;\n\t\t}\n\t\tif (result.selection === undefined) {\n\t\t\tresult.selection = {\n\t\t\t\ttype: selectionType\n\t\t\t};\n\t\t} else if (result.selection.type === undefined) {\n\t\t\tresult.selection.type = selectionType;\n\t\t}\n\t} else {\n\t\tresult = {\n\t\t\tcolumns,\n\t\t\theight: theme.getRowHeight(),\n\t\t\tfrozen: options.frozen,\n\t\t\tselection: {\n\t\t\t\ttype: selectionType\n\t\t\t}\n\t\t};\n\t}\n\treturn result as DTableBodyRowOptions<ROW>;\n};\n\nexport class DTableBody<\n\tROW,\n\tDATA extends DTableData<ROW> = DTableDataList<ROW>,\n\tTHEME extends DThemeTableBody = DThemeTableBody,\n\tOPTIONS extends DTableBodyOptions<ROW, DATA, THEME> = DTableBodyOptions<ROW, DATA, THEME>\n> extends DBase<THEME, OPTIONS> {\n\tprotected static WORK_ON_CLICK = new Point();\n\n\tprotected _columns: Array<DTableColumn<ROW, unknown>>;\n\tprotected _rowHeight: number;\n\tprotected _rowIndexMappedStart: number;\n\tprotected _rowIndexMappedEnd: number;\n\tprotected _rowOptions: DTableBodyRowOptions<ROW>;\n\tprotected _updateRowsCount: number;\n\tprotected _isUpdateRowsCalled: boolean;\n\tprotected _isUpdateRowsCalledForcibly: boolean;\n\tprotected _workRows: Array<DTableBodyRow<ROW>>;\n\tprotected _onRowChangeBound: DTableBodyRowOnChange<ROW, unknown>;\n\tprotected _columnIndexToCellOptions: Map<number, DTableBodyCellOptions<ROW>>;\n\tprotected _data: DATA;\n\n\tconstructor(options: OPTIONS) {\n\t\tsuper(options);\n\n\t\tthis.transform.position.y = options.offset ?? 0;\n\t\tconst data = this.toData(options.data);\n\t\tthis._data = data;\n\t\tdata.bind(this);\n\t\tconst theme = this.theme;\n\t\tconst rowOptions = toRowOptions(theme, options, data.selection.type);\n\t\tthis._rowOptions = rowOptions;\n\t\tthis._rowHeight = rowOptions.height != null ? rowOptions.height : theme.getRowHeight();\n\t\tthis._columns = rowOptions.columns || [];\n\t\tthis._rowIndexMappedStart = 0;\n\t\tthis._rowIndexMappedEnd = 0;\n\t\tthis._updateRowsCount = 0;\n\t\tthis._isUpdateRowsCalled = false;\n\t\tthis._isUpdateRowsCalledForcibly = false;\n\t\tthis._workRows = [];\n\t\tthis._onRowChangeBound = (newValue, oldValue, row, rowIndex, columnIndex): void => {\n\t\t\tdata.emit(\"change\", newValue, oldValue, row, rowIndex, columnIndex, data);\n\t\t};\n\t\tthis._columnIndexToCellOptions = new Map<number, DTableBodyCellOptions<ROW>>();\n\t\tthis._data.emit(\"init\", this._data);\n\t}\n\n\tprotected toData(options?: DATA | DTableDataListOptions<ROW>): DATA {\n\t\tif (this.isData(options)) {\n\t\t\treturn options;\n\t\t}\n\t\treturn new DTableDataList<ROW>(options) as any;\n\t}\n\n\tprotected isData(\n\t\ttarget?: ROW[] | DTableDataOptions<ROW> | DTableData<ROW>\n\t): target is DTableData<ROW> {\n\t\treturn target != null && \"mapped\" in target;\n\t}\n\n\tonResize(newWidth: number, newHeight: number, oldWidth: number, oldHeight: number): void {\n\t\tsuper.onResize(newWidth, newHeight, oldWidth, oldHeight);\n\t\tthis.update();\n\t}\n\n\tget selection(): DTableDataSelection<ROW> {\n\t\treturn this._data.selection;\n\t}\n\n\tlock(): void {\n\t\tthis._updateRowsCount += 1;\n\t\tif (this._updateRowsCount === 1) {\n\t\t\tthis._isUpdateRowsCalled = false;\n\t\t\tthis._isUpdateRowsCalledForcibly = false;\n\t\t}\n\t}\n\n\tunlock(callIfNeeded: boolean): void {\n\t\tthis._updateRowsCount -= 1;\n\t\tif (this._updateRowsCount === 0) {\n\t\t\tif (callIfNeeded && this._isUpdateRowsCalled) {\n\t\t\t\tthis.update(this._isUpdateRowsCalledForcibly);\n\t\t\t}\n\t\t\tthis._isUpdateRowsCalled = false;\n\t\t\tthis._isUpdateRowsCalledForcibly = false;\n\t\t}\n\t}\n\n\t/**\n\t * Updates rows. If the `forcibly` is true, some dirty checkings for\n\t * avoiding unnecessary state changes are skipped.\n\t *\n\t * @param forcibly true to update forcibly\n\t */\n\tupdate(forcibly?: boolean): void {\n\t\tif (0 < this._updateRowsCount) {\n\t\t\tthis._isUpdateRowsCalled = true;\n\t\t\tif (forcibly) {\n\t\t\t\tthis._isUpdateRowsCalledForcibly = true;\n\t\t\t}\n\t\t\treturn;\n\t\t}\n\n\t\tconst content = this.parent;\n\t\tif (content == null) {\n\t\t\treturn;\n\t\t}\n\t\tconst contentParent = content.parent;\n\t\tif (contentParent == null) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst rows = this.children as Array<DTableBodyRow<ROW>>;\n\t\tconst height = contentParent.height;\n\t\tconst rowHeight = this._rowHeight;\n\n\t\tconst data = this._data;\n\t\tconst dataMappedSize = data.mapped.size();\n\n\t\tconst oldRowIndexMappedStart = this._rowIndexMappedStart;\n\t\tlet oldRowIndexMappedEnd = this._rowIndexMappedEnd;\n\t\tlet oldRowCount = oldRowIndexMappedEnd - oldRowIndexMappedStart;\n\n\t\tconst y = this.transform.position.y;\n\t\tconst newHeight = y + dataMappedSize * rowHeight;\n\t\tconst newContentHeight = Math.max(height, newHeight);\n\t\tconst newContentY = Math.max(height - newContentHeight, content.position.y);\n\n\t\tconst newRowIndexMappedLowerBound = -newContentY / rowHeight;\n\t\tconst newRowIndexMappedUpperBound = (height - (newContentY + y)) / rowHeight;\n\t\tlet newRowIndexMappedStart = Math.floor(newRowIndexMappedLowerBound);\n\t\tnewRowIndexMappedStart -= newRowIndexMappedStart % 2 === 0 ? 2 : 1;\n\t\tlet newRowIndexMappedEnd = Math.floor(newRowIndexMappedUpperBound);\n\t\tnewRowIndexMappedEnd += (newRowIndexMappedEnd - newRowIndexMappedStart) % 2 === 1 ? 3 : 2;\n\t\tlet newRowCount = newRowIndexMappedEnd - newRowIndexMappedStart;\n\t\tif (newRowCount < oldRowCount && oldRowCount - 2 <= newRowCount) {\n\t\t\tnewRowCount = oldRowCount;\n\t\t\tnewRowIndexMappedEnd = newRowIndexMappedStart + newRowCount;\n\t\t}\n\n\t\tif (oldRowCount < newRowCount) {\n\t\t\tfor (let i = oldRowCount; i < newRowCount; ++i) {\n\t\t\t\tconst oldRowIndexMapped = oldRowIndexMappedStart + i;\n\t\t\t\tconst newRow = this.newRow(oldRowIndexMapped % 2 === 0);\n\t\t\t\tthis.addChild(newRow);\n\t\t\t}\n\t\t\toldRowCount = newRowCount;\n\t\t\toldRowIndexMappedEnd = oldRowIndexMappedStart + oldRowCount;\n\t\t} else if (newRowCount < oldRowCount) {\n\t\t\tfor (let i = oldRowCount - 1; newRowCount <= i; --i) {\n\t\t\t\tthis.removeChild(rows[i]);\n\t\t\t}\n\t\t\toldRowCount = newRowCount;\n\t\t\toldRowIndexMappedEnd = oldRowIndexMappedStart + oldRowCount;\n\t\t}\n\n\t\tthis._rowIndexMappedStart = newRowIndexMappedStart;\n\t\tthis._rowIndexMappedEnd = newRowIndexMappedEnd;\n\n\t\tconst rowIndexMappedStartDelta = newRowIndexMappedStart - oldRowIndexMappedStart;\n\t\tconst rowIndexMappedStartDeltaAbs = Math.abs(rowIndexMappedStartDelta);\n\t\tconst rowsLength = rows.length;\n\t\tif (0 < rowIndexMappedStartDeltaAbs && rowIndexMappedStartDeltaAbs < rowsLength) {\n\t\t\tconst work = this._workRows;\n\t\t\tif (0 < rowIndexMappedStartDelta) {\n\t\t\t\tfor (let i = 0; i < rowIndexMappedStartDeltaAbs; ++i) {\n\t\t\t\t\twork.push(this.resetRow(rows[i]));\n\t\t\t\t}\n\t\t\t\tfor (let i = rowIndexMappedStartDeltaAbs; i < rowsLength; ++i) {\n\t\t\t\t\trows[i - rowIndexMappedStartDeltaAbs] = rows[i];\n\t\t\t\t}\n\t\t\t\tfor (let i = 0; i < rowIndexMappedStartDeltaAbs; ++i) {\n\t\t\t\t\trows[rowsLength - rowIndexMappedStartDeltaAbs + i] = work[i];\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tfor (let i = 0; i < rowIndexMappedStartDeltaAbs; ++i) {\n\t\t\t\t\twork.push(this.resetRow(rows[rowsLength - rowIndexMappedStartDeltaAbs + i]));\n\t\t\t\t}\n\t\t\t\tfor (let i = rowsLength - rowIndexMappedStartDeltaAbs - 1; 0 <= i; --i) {\n\t\t\t\t\trows[i + rowIndexMappedStartDeltaAbs] = rows[i];\n\t\t\t\t}\n\t\t\t\tfor (let i = 0; i < rowIndexMappedStartDeltaAbs; ++i) {\n\t\t\t\t\trows[i] = work[i];\n\t\t\t\t}\n\t\t\t}\n\t\t\twork.length = 0;\n\t\t}\n\n\t\tconst selection = data.selection;\n\t\tconst isRowSelectable = selection.type !== DTableDataSelectionType.NONE;\n\t\tdata.mapped.each(\n\t\t\t(\n\t\t\t\tdatum: ROW,\n\t\t\t\tsupplimental: unknown,\n\t\t\t\tindex: number,\n\t\t\t\tunmappedIndex: number\n\t\t\t): void | boolean => {\n\t\t\t\tconst row = rows[index - newRowIndexMappedStart];\n\n\t\t\t\t// Position\n\t\t\t\trow.position.y = index * rowHeight;\n\n\t\t\t\t// State\n\t\t\t\tconst rowState = row.state;\n\t\t\t\trowState.lock();\n\t\t\t\trowState.set(DTableState.SELECTABLE, isRowSelectable);\n\t\t\t\trowState.set(DBaseState.ACTIVE, selection.contains(unmappedIndex));\n\t\t\t\trowState.remove(DBaseState.DISABLED);\n\t\t\t\trowState.unlock();\n\n\t\t\t\t// Data\n\t\t\t\trow.set(datum, supplimental, unmappedIndex, forcibly);\n\t\t\t},\n\t\t\tnewRowIndexMappedStart,\n\t\t\tnewRowIndexMappedStart + rowsLength\n\t\t);\n\n\t\tfor (let i = 0; newRowIndexMappedStart + i < 0 && i < rowsLength; ++i) {\n\t\t\tconst row = rows[i];\n\n\t\t\t// Position\n\t\t\trow.position.y = (newRowIndexMappedStart + i) * rowHeight;\n\n\t\t\t// State\n\t\t\tconst rowState = row.state;\n\t\t\trowState.lock();\n\t\t\trowState.add(DBaseState.DISABLED);\n\t\t\trowState.removeAll(DTableState.SELECTABLE, DBaseState.ACTIVE);\n\t\t\trowState.unlock();\n\n\t\t\t// Data\n\t\t\trow.unset();\n\t\t}\n\n\t\tfor (let i = rowsLength - 1; dataMappedSize <= newRowIndexMappedStart + i && 0 <= i; --i) {\n\t\t\tconst row = rows[i];\n\n\t\t\t// Position\n\t\t\trow.position.y = (newRowIndexMappedStart + i) * rowHeight;\n\n\t\t\t// State\n\t\t\tconst rowState = row.state;\n\t\t\trowState.lock();\n\t\t\trowState.add(DBaseState.DISABLED);\n\t\t\trowState.removeAll(DTableState.SELECTABLE, DBaseState.ACTIVE);\n\t\t\trowState.unlock();\n\n\t\t\t// Data\n\t\t\trow.unset();\n\t\t}\n\n\t\tthis.lock();\n\t\tcontent.position.y = newContentY;\n\t\tcontent.height = newContentHeight;\n\t\tthis.height = newHeight;\n\t\tthis.unlock(false);\n\t\tthis.emit(\"update\", newRowIndexMappedLowerBound, newRowIndexMappedUpperBound, this);\n\t}\n\n\tprotected resetRow(row: DTableBodyRow<ROW>): DTableBodyRow<ROW> {\n\t\trow.blur(true);\n\t\tconst cells = row.children;\n\t\tfor (let i = 0, imax = cells.length; i < imax; ++i) {\n\t\t\tconst cell = cells[i];\n\t\t\tif (cell instanceof DBase) {\n\t\t\t\tcell.state.isPressed = false;\n\t\t\t}\n\t\t}\n\t\treturn row;\n\t}\n\n\tprotected newRow(isEven: boolean): DTableBodyRow<ROW> {\n\t\treturn new DTableBodyRow<ROW>(\n\t\t\tthis._onRowChangeBound,\n\t\t\tisEven,\n\t\t\tthis._columnIndexToCellOptions,\n\t\t\tthis._rowOptions\n\t\t);\n\t}\n\n\tprotected onParentMove(newX: number, newY: number, oldX: number, oldY: number): void {\n\t\tsuper.onParentMove(newX, newY, oldX, oldY);\n\t\tthis.updateFrozenCellPosition(newX);\n\t}\n\n\tprotected updateFrozenCellPosition(x: number): void {\n\t\tconst frozen = this._rowOptions.frozen;\n\t\tif (frozen != null && 0 < frozen) {\n\t\t\tconst rows = this.children as Array<DTableBodyRow<ROW>>;\n\t\t\tfor (let i = 0, imax = rows.length; i < imax; ++i) {\n\t\t\t\trows[i].updateFrozenCellPosition(x);\n\t\t\t}\n\t\t}\n\t}\n\n\tgetClippingRect(target: unknown, result: Rectangle): void {\n\t\tsuper.getClippingRect(target, result);\n\n\t\tconst parent = this.parent;\n\t\tif (parent) {\n\t\t\tconst dy = -parent.transform.position.y;\n\t\t\tresult.y += dy;\n\t\t\tresult.height -= dy;\n\t\t}\n\t}\n\n\tprotected toRowIndexMapped(local: Point): number {\n\t\tif (0 <= this.parent.position.y + local.y) {\n\t\t\treturn Math.floor(local.y / this._rowHeight);\n\t\t}\n\t\treturn -1;\n\t}\n\n\tprotected toRow(rowIndexMapped: number): DTableBodyRow<ROW> | null {\n\t\tconst index = rowIndexMapped - this._rowIndexMappedStart;\n\t\tconst rows = this.children as Array<DTableBodyRow<ROW>>;\n\t\tif (0 <= index && index < rows.length) {\n\t\t\treturn rows[index];\n\t\t}\n\t\treturn null;\n\t}\n\n\tprotected toCell(row: DTableBodyRow<ROW>, local: Point): DTableBodyCell<ROW, unknown> | null {\n\t\tconst cells = row.children as Array<DTableBodyCell<ROW, unknown>>;\n\t\tconst cellsLength = cells.length;\n\t\tconst columns = this._columns;\n\t\tconst columnsLength = columns.length;\n\t\tfor (let i = 0, imax = Math.min(cellsLength, columnsLength); i < imax; ++i) {\n\t\t\tconst cell = cells[cellsLength - i - 1];\n\t\t\tconst x = local.x - cell.position.x;\n\t\t\tif (0 <= x && x <= cell.width) {\n\t\t\t\treturn cell;\n\t\t\t}\n\t\t}\n\t\treturn null;\n\t}\n\n\tonRowClick(e: InteractionEvent): void {\n\t\tif (this.state.isActionable) {\n\t\t\tconst local = DTableBody.WORK_ON_CLICK;\n\t\t\tlocal.copyFrom(e.data.global);\n\t\t\tthis.toLocal(local, undefined, local, false);\n\t\t\tconst rowIndexMapped = this.toRowIndexMapped(local);\n\t\t\tif (0 <= rowIndexMapped && rowIndexMapped < this._data.mapped.size()) {\n\t\t\t\t// Delegate to the cell at first\n\t\t\t\tconst row = this.toRow(rowIndexMapped);\n\t\t\t\tif (row) {\n\t\t\t\t\tconst cell = this.toCell(row, local);\n\t\t\t\t\tif (cell && cell.onRowSelect && cell.onRowSelect(e, local)) {\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t// Fallback to the default\n\t\t\t\tthis.onRowSelect(e, rowIndexMapped);\n\t\t\t}\n\t\t}\n\t}\n\n\tprotected onRowSelect(e: InteractionEvent, rowIndexMapped: number): void {\n\t\tconst data = this._data;\n\t\tconst selection = data.selection;\n\t\tconst isSingle = selection.type === DTableDataSelectionType.SINGLE;\n\t\tconst isNotSingle = !isSingle;\n\t\tconst rowIndex = data.mapped.unmap(rowIndexMapped);\n\t\tconst originalEvent = e.data.originalEvent;\n\t\tconst ctrlKey = originalEvent.ctrlKey;\n\t\tconst shiftKey = originalEvent.shiftKey;\n\t\tif (isSingle || selection.isEmpty() || !(isNotSingle && (ctrlKey || shiftKey))) {\n\t\t\tselection.clearAndAdd(rowIndex);\n\t\t} else if (ctrlKey) {\n\t\t\tselection.toggle(rowIndex);\n\t\t} else if (shiftKey) {\n\t\t\tconst lastRowIndex = selection.last;\n\t\t\tif (lastRowIndex != null) {\n\t\t\t\tconst sorter = data.sorter;\n\t\t\t\tconst filter = data.filter;\n\t\t\t\tconst rowIndexSorted = sorter.map(rowIndex);\n\t\t\t\tconst lastRowIndexSorted = sorter.map(lastRowIndex);\n\t\t\t\tif (rowIndexSorted != null && lastRowIndexSorted != null) {\n\t\t\t\t\tlet istart = lastRowIndexSorted + 1;\n\t\t\t\t\tlet iend = rowIndexSorted + 1;\n\t\t\t\t\tif (rowIndexSorted < lastRowIndexSorted) {\n\t\t\t\t\t\tistart = rowIndexSorted;\n\t\t\t\t\t\tiend = lastRowIndexSorted;\n\t\t\t\t\t}\n\t\t\t\t\tif (istart < iend) {\n\t\t\t\t\t\tconst rowIndices: number[] = [];\n\t\t\t\t\t\tconst indicesFiltered = filter.indices;\n\t\t\t\t\t\tconst indicesSorted = sorter.indices;\n\t\t\t\t\t\tif (indicesFiltered) {\n\t\t\t\t\t\t\tif (indicesSorted) {\n\t\t\t\t\t\t\t\tfor (let i = 0, imax = indicesFiltered.length; i < imax; ++i) {\n\t\t\t\t\t\t\t\t\tconst indexFiltered = indicesFiltered[i];\n\t\t\t\t\t\t\t\t\tif (istart <= indexFiltered && indexFiltered < iend) {\n\t\t\t\t\t\t\t\t\t\trowIndices.push(indicesSorted[indexFiltered]);\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\tfor (let i = 0, imax = indicesFiltered.length; i < imax; ++i) {\n\t\t\t\t\t\t\t\t\tconst indexFiltered = indicesFiltered[i];\n\t\t\t\t\t\t\t\t\tif (istart <= indexFiltered && indexFiltered < iend) {\n\t\t\t\t\t\t\t\t\t\trowIndices.push(indexFiltered);\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tif (indicesSorted) {\n\t\t\t\t\t\t\t\tfor (let i = istart; i < iend; ++i) {\n\t\t\t\t\t\t\t\t\trowIndices.push(indicesSorted[i]);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\tfor (let i = istart; i < iend; ++i) {\n\t\t\t\t\t\t\t\t\trowIndices.push(i);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\tselection.addAll(rowIndices);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\tonDblClick(\n\t\te: MouseEvent | TouchEvent,\n\t\tinteractionManager: interaction.InteractionManager\n\t): boolean {\n\t\treturn super.onDblClick(e, interactionManager);\n\t}\n\n\tprotected getType(): string {\n\t\treturn \"DTableBody\";\n\t}\n\n\tget data(): DATA {\n\t\treturn this._data;\n\t}\n}\n"]}
@@ -1,5 +1,5 @@
1
1
  /*
2
- Winter Cardinal UI v0.247.0
2
+ Winter Cardinal UI v0.249.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.247.0
2
+ Winter Cardinal UI v0.249.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.247.0
2
+ Winter Cardinal UI v0.249.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.247.0
2
+ Winter Cardinal UI v0.249.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.247.0
2
+ Winter Cardinal UI v0.249.0
3
3
  Copyright (C) 2019 Toshiba Corporation
4
4
  SPDX-License-Identifier: Apache-2.0
5
5
 
@@ -70083,6 +70083,9 @@ var DScrollBar = /** @class */ (function (_super) {
70083
70083
  DApplications.update(this);
70084
70084
  }
70085
70085
  };
70086
+ DScrollBar.prototype.touch = function (silently) {
70087
+ this.onChange(silently);
70088
+ };
70086
70089
  DScrollBar.prototype.isRegionVisible = function () {
70087
70090
  return 0 < this._start || this._end < 1;
70088
70091
  };
@@ -70118,20 +70121,20 @@ var DScrollBar = /** @class */ (function (_super) {
70118
70121
  };
70119
70122
  DScrollBar.prototype.onFadeOutTimeout = function () {
70120
70123
  this._fadeOutTimeoutId = null;
70121
- var fadeOutInterval = this._fadeOutDelay;
70124
+ var fadeOutDelay = this._fadeOutDelay;
70122
70125
  var onTouchTimeoutBound = this._onFadeOutTimeoutBound;
70123
70126
  var state = this.state;
70124
- if (state.isGesturing || state.isHovered || state.isPressed) {
70125
- this._fadeOutTimeoutId = window.setTimeout(onTouchTimeoutBound, fadeOutInterval);
70127
+ if (state.isGesturing || state.onHovered || state.isHovered || state.isPressed) {
70128
+ this._fadeOutTimeoutId = window.setTimeout(onTouchTimeoutBound, fadeOutDelay);
70126
70129
  return;
70127
70130
  }
70128
70131
  var thumbState = this._thumb.state;
70129
70132
  if (thumbState.isGesturing || thumbState.isHovered || thumbState.isPressed) {
70130
- this._fadeOutTimeoutId = window.setTimeout(onTouchTimeoutBound, fadeOutInterval);
70133
+ this._fadeOutTimeoutId = window.setTimeout(onTouchTimeoutBound, fadeOutDelay);
70131
70134
  return;
70132
70135
  }
70133
70136
  var now = Date.now();
70134
- var remainingTime = fadeOutInterval - (now - this._touchedAt);
70137
+ var remainingTime = fadeOutDelay - (now - this._touchedAt);
70135
70138
  if (0 < remainingTime) {
70136
70139
  this._fadeOutTimeoutId = window.setTimeout(onTouchTimeoutBound, remainingTime);
70137
70140
  return;
@@ -70457,6 +70460,10 @@ var DPaneScrollBar = /** @class */ (function () {
70457
70460
  horizontal.width = width - horizontalOffsetStart - horizontalOffsetEnd;
70458
70461
  this._onUpdate(vertical.isRegionVisible() || horizontal.isRegionVisible());
70459
70462
  };
70463
+ DPaneScrollBar.prototype.touch = function (silently) {
70464
+ this.vertical.touch(silently);
70465
+ this.horizontal.touch(silently);
70466
+ };
70460
70467
  DPaneScrollBar.prototype.getOffsetHorizontalStart = function (size) {
70461
70468
  return size * 0.5;
70462
70469
  };
@@ -70587,6 +70594,10 @@ var DPane = /** @class */ (function (_super) {
70587
70594
  var content = this.content;
70588
70595
  content.y = -content.height * start;
70589
70596
  };
70597
+ DPane.prototype.onOver = function (e) {
70598
+ _super.prototype.onOver.call(this, e);
70599
+ this.scrollbar.touch();
70600
+ };
70590
70601
  DPane.prototype.getType = function () {
70591
70602
  return "DPane";
70592
70603
  };
@@ -86158,8 +86169,7 @@ var DTableBody = /** @class */ (function (_super) {
86158
86169
  var newRowIndexMappedStart = Math.floor(newRowIndexMappedLowerBound);
86159
86170
  newRowIndexMappedStart -= newRowIndexMappedStart % 2 === 0 ? 2 : 1;
86160
86171
  var newRowIndexMappedEnd = Math.floor(newRowIndexMappedUpperBound);
86161
- newRowIndexMappedEnd +=
86162
- (newRowIndexMappedUpperBound - newRowIndexMappedStart + 1) % 2 === 0 ? 3 : 2;
86172
+ newRowIndexMappedEnd += (newRowIndexMappedEnd - newRowIndexMappedStart) % 2 === 1 ? 3 : 2;
86163
86173
  var newRowCount = newRowIndexMappedEnd - newRowIndexMappedStart;
86164
86174
  if (newRowCount < oldRowCount && oldRowCount - 2 <= newRowCount) {
86165
86175
  newRowCount = oldRowCount;