@wcardinal/wcardinal-ui 0.423.0 → 0.425.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.
@@ -4,17 +4,22 @@ import { DChartAxisContainer } from "./d-chart-axis-container";
4
4
  import { DChartAxisGuide } from "./d-chart-axis-guide";
5
5
  import { DChartAxis } from "./d-chart-axis";
6
6
  import { DChartAxisGuideSimpleShape, DChartAxisGuideSimpleShapeOptions } from "./d-chart-axis-guide-simple-shape";
7
+ import { DChartPlotArea, DChartPlotAreaLike } from "./d-chart-plot-area";
8
+ import { DChartRegion } from "./d-chart-region";
7
9
  export interface DChartAxisGuideSimpleOptions extends DChartAxisGuideSimpleShapeOptions {
8
10
  position?: number;
11
+ fixed?: boolean;
9
12
  }
10
13
  export declare class DChartAxisGuideSimple<CHART extends DBase = DBase> implements DChartAxisGuide<CHART> {
14
+ protected static WORK_POINT?: Point;
15
+ protected static WORK_REGION?: DChartRegion;
11
16
  protected _axis?: DChartAxis<CHART>;
12
17
  protected _options?: DChartAxisGuideSimpleOptions;
13
18
  protected _container?: DChartAxisContainer<CHART>;
14
19
  protected _index: number;
15
20
  protected _shape?: DChartAxisGuideSimpleShape;
16
21
  protected _position: number;
17
- protected _work: Point;
22
+ protected _fixed: boolean;
18
23
  protected _isShown: boolean;
19
24
  constructor(options?: DChartAxisGuideSimpleOptions);
20
25
  get shape(): DChartAxisGuideSimpleShape;
@@ -28,5 +33,7 @@ export declare class DChartAxisGuideSimple<CHART extends DBase = DBase> implemen
28
33
  bind(container: DChartAxisContainer<CHART>, index: number, axis: DChartAxis<CHART>): void;
29
34
  unbind(): void;
30
35
  update(): boolean;
36
+ protected getPositionX(axis: DChartAxis<CHART>, plotArea: DChartPlotArea<CHART> | DChartPlotAreaLike<CHART>, plotAreaX: number): number;
37
+ protected getPositionY(axis: DChartAxis<CHART>, plotArea: DChartPlotArea<CHART> | DChartPlotAreaLike<CHART>, plotAreaY: number): number;
31
38
  destroy(): void;
32
39
  }
@@ -29,6 +29,7 @@ export declare class DChartPlotAreaTwofold<CHART extends DBase = DBase, THEME ex
29
29
  protected _series: DChartPlotAreaTwofoldSeriesContainer<CHART>;
30
30
  protected _axis: DChartPlotAreaTwofoldAxisContainer<CHART>;
31
31
  constructor(chart: CHART, options?: OPTIONS);
32
+ onResize(newWidth: number, newHeight: number, oldWidth: number, oldHeight: number): void;
32
33
  protected addSeries(series: DChartSeriesContainer<CHART>, list?: DChartSeries<CHART>[]): void;
33
34
  protected addAxes(axis: DChartAxisContainer<CHART>, list?: DChartAxis<CHART>[]): void;
34
35
  get primary(): DChartPlotAreaTwofoldSubPrimary<CHART>;
@@ -1,13 +1,20 @@
1
1
  import { Point } from "pixi.js";
2
2
  import { DChartAxisPosition } from "./d-chart-axis-position";
3
3
  import { DChartAxisGuideSimpleShapeImpl } from "./d-chart-axis-guide-simple-shape-impl";
4
+ import { DChartRegionImpl } from "./d-chart-region-impl";
4
5
  var DChartAxisGuideSimple = /** @class */ (function () {
5
6
  function DChartAxisGuideSimple(options) {
6
- var _a;
7
+ var _a, _b;
7
8
  this._options = options;
8
9
  this._index = 0;
9
- this._position = (_a = options === null || options === void 0 ? void 0 : options.position) !== null && _a !== void 0 ? _a : 0;
10
- this._work = new Point();
10
+ if (options != null) {
11
+ this._position = (_a = options.position) !== null && _a !== void 0 ? _a : 0;
12
+ this._fixed = (_b = options.fixed) !== null && _b !== void 0 ? _b : false;
13
+ }
14
+ else {
15
+ this._position = 0;
16
+ this._fixed = false;
17
+ }
11
18
  this._isShown = true;
12
19
  }
13
20
  Object.defineProperty(DChartAxisGuideSimple.prototype, "shape", {
@@ -76,42 +83,63 @@ var DChartAxisGuideSimple = /** @class */ (function () {
76
83
  var plotAreaY = plotAreaBounds.y;
77
84
  var plotAreaWidth = plotAreaBounds.width;
78
85
  var plotAreaHeight = plotAreaBounds.height;
79
- var transform = plotArea.container.transform.localTransform;
80
86
  var offset = axis.padding * index;
81
87
  switch (axis.position) {
82
88
  case DChartAxisPosition.TOP:
83
89
  case DChartAxisPosition.BOTTOM:
84
- var coordinateX = plotArea.coordinate.x.get(axis.coordinate);
85
- if (coordinateX) {
86
- var work = this._work;
87
- work.set(coordinateX.transform.map(coordinateX.map(this._position)), 0);
88
- transform.apply(work, work);
89
- var x = work.x;
90
- shape.update(axis.position, x, plotAreaY + plotAreaHeight * 0.5, this._isShown && plotAreaX <= x && x <= plotAreaX + plotAreaWidth, plotAreaWidth, plotAreaHeight, offset);
91
- }
92
- else {
93
- shape.update(axis.position, plotAreaX, plotAreaY + plotAreaHeight * 0.5, false, plotAreaWidth, plotAreaHeight, offset);
94
- }
90
+ var x = this.getPositionX(axis, plotArea, plotAreaX);
91
+ shape.update(axis.position, x, plotAreaY + plotAreaHeight * 0.5, this._isShown && plotAreaX <= x && x <= plotAreaX + plotAreaWidth, plotAreaWidth, plotAreaHeight, offset);
95
92
  break;
96
93
  case DChartAxisPosition.LEFT:
97
94
  case DChartAxisPosition.RIGHT:
98
- var coordinateY = plotArea.coordinate.y.get(axis.coordinate);
99
- if (coordinateY) {
100
- var work = this._work;
101
- work.set(0, coordinateY.transform.map(coordinateY.map(this._position)));
102
- transform.apply(work, work);
103
- var y = work.y;
104
- shape.update(axis.position, plotAreaX + plotAreaWidth * 0.5, y, this._isShown && plotAreaY <= y && y <= plotAreaY + plotAreaHeight, plotAreaWidth, plotAreaHeight, offset);
105
- }
106
- else {
107
- shape.update(axis.position, plotAreaX + plotAreaWidth * 0.5, plotAreaY, false, plotAreaWidth, plotAreaHeight, offset);
108
- }
95
+ var y = this.getPositionY(axis, plotArea, plotAreaY);
96
+ shape.update(axis.position, plotAreaX + plotAreaWidth * 0.5, y, this._isShown && plotAreaY <= y && y <= plotAreaY + plotAreaHeight, plotAreaWidth, plotAreaHeight, offset);
109
97
  break;
110
98
  }
111
99
  return true;
112
100
  }
113
101
  return false;
114
102
  };
103
+ DChartAxisGuideSimple.prototype.getPositionX = function (axis, plotArea, plotAreaX) {
104
+ var _a, _b;
105
+ if (this._fixed) {
106
+ var work = ((_a = DChartAxisGuideSimple.WORK_REGION) !== null && _a !== void 0 ? _a : (DChartAxisGuideSimple.WORK_REGION = new DChartRegionImpl(0, 0)));
107
+ plotArea.getPixelDomain(work);
108
+ return work.from + this._position * (work.to - work.from);
109
+ }
110
+ else {
111
+ var coordinateX = plotArea.coordinate.x.get(axis.coordinate);
112
+ if (coordinateX) {
113
+ var work = ((_b = DChartAxisGuideSimple.WORK_POINT) !== null && _b !== void 0 ? _b : (DChartAxisGuideSimple.WORK_POINT = new Point()));
114
+ work.set(coordinateX.transform.map(coordinateX.map(this._position)), 0);
115
+ plotArea.container.transform.localTransform.apply(work, work);
116
+ return work.x;
117
+ }
118
+ else {
119
+ return plotAreaX - 100;
120
+ }
121
+ }
122
+ };
123
+ DChartAxisGuideSimple.prototype.getPositionY = function (axis, plotArea, plotAreaY) {
124
+ var _a, _b;
125
+ if (this._fixed) {
126
+ var work = ((_a = DChartAxisGuideSimple.WORK_REGION) !== null && _a !== void 0 ? _a : (DChartAxisGuideSimple.WORK_REGION = new DChartRegionImpl(0, 0)));
127
+ plotArea.getPixelRange(work);
128
+ return work.to + (1 - this._position) * (work.from - work.to);
129
+ }
130
+ else {
131
+ var coordinateY = plotArea.coordinate.y.get(axis.coordinate);
132
+ if (coordinateY) {
133
+ var work = ((_b = DChartAxisGuideSimple.WORK_POINT) !== null && _b !== void 0 ? _b : (DChartAxisGuideSimple.WORK_POINT = new Point()));
134
+ work.set(0, coordinateY.transform.map(coordinateY.map(this._position)));
135
+ plotArea.container.transform.localTransform.apply(work, work);
136
+ return work.y;
137
+ }
138
+ else {
139
+ return plotAreaY - 100;
140
+ }
141
+ }
142
+ };
115
143
  DChartAxisGuideSimple.prototype.destroy = function () {
116
144
  var shape = this._shape;
117
145
  if (shape != null) {
@@ -1 +1 @@
1
- {"version":3,"file":"d-chart-axis-guide-simple.js","sourceRoot":"","sources":["../../../src/main/typescript/wcardinal/ui/d-chart-axis-guide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"./d-base\";\nimport { DChartAxisContainer } from \"./d-chart-axis-container\";\nimport { DChartAxisGuide } from \"./d-chart-axis-guide\";\nimport { DChartAxisPosition } from \"./d-chart-axis-position\";\nimport { DChartAxis } from \"./d-chart-axis\";\nimport {\n\tDChartAxisGuideSimpleShape,\n\tDChartAxisGuideSimpleShapeOptions\n} from \"./d-chart-axis-guide-simple-shape\";\nimport { DChartAxisGuideSimpleShapeImpl } from \"./d-chart-axis-guide-simple-shape-impl\";\n\nexport interface DChartAxisGuideSimpleOptions extends DChartAxisGuideSimpleShapeOptions {\n\tposition?: number;\n}\n\nexport class DChartAxisGuideSimple<CHART extends DBase = DBase> implements DChartAxisGuide<CHART> {\n\tprotected _axis?: DChartAxis<CHART>;\n\tprotected _options?: DChartAxisGuideSimpleOptions;\n\tprotected _container?: DChartAxisContainer<CHART>;\n\tprotected _index: number;\n\tprotected _shape?: DChartAxisGuideSimpleShape;\n\tprotected _position: number;\n\tprotected _work: Point;\n\tprotected _isShown: boolean;\n\n\tconstructor(options?: DChartAxisGuideSimpleOptions) {\n\t\tthis._options = options;\n\t\tthis._index = 0;\n\t\tthis._position = options?.position ?? 0;\n\t\tthis._work = new Point();\n\t\tthis._isShown = true;\n\t}\n\n\tget shape(): DChartAxisGuideSimpleShape {\n\t\tlet result = this._shape;\n\t\tif (result == null) {\n\t\t\tresult = this.newShape();\n\t\t\tthis._shape = result;\n\t\t}\n\t\treturn result;\n\t}\n\n\tprotected newShape(): DChartAxisGuideSimpleShape {\n\t\treturn new DChartAxisGuideSimpleShapeImpl(this._options);\n\t}\n\n\tget position(): number {\n\t\treturn this._position;\n\t}\n\n\tset position(position: number) {\n\t\tthis._position = position;\n\t}\n\n\tshow(): this {\n\t\tthis._isShown = true;\n\t\treturn this;\n\t}\n\n\tisShown(): boolean {\n\t\treturn this._isShown;\n\t}\n\n\thide(): this {\n\t\tthis._isShown = false;\n\t\treturn this;\n\t}\n\n\tisHidden(): boolean {\n\t\treturn !this._isShown;\n\t}\n\n\tbind(container: DChartAxisContainer<CHART>, index: number, axis: DChartAxis<CHART>): void {\n\t\tthis._container = container;\n\t\tthis._index = index;\n\t\tthis._axis = axis;\n\t\tthis.shape.bind(container, index, axis);\n\t}\n\n\tunbind(): void {\n\t\tconst shape = this._shape;\n\t\tif (shape != null) {\n\t\t\tshape.unbind();\n\t\t}\n\t\tthis._axis = undefined;\n\t\tthis._index = 0;\n\t\tthis._container = undefined;\n\t}\n\n\tupdate(): boolean {\n\t\tconst container = this._container;\n\t\tconst index = this._index;\n\t\tconst shape = this._shape;\n\t\tconst axis = this._axis;\n\t\tif (shape != null && container != null && axis != null) {\n\t\t\tconst plotArea = container.plotArea;\n\t\t\tconst plotAreaBounds = plotArea.getAxisBounds(axis.position);\n\t\t\tconst plotAreaX = plotAreaBounds.x;\n\t\t\tconst plotAreaY = plotAreaBounds.y;\n\t\t\tconst plotAreaWidth = plotAreaBounds.width;\n\t\t\tconst plotAreaHeight = plotAreaBounds.height;\n\t\t\tconst transform = plotArea.container.transform.localTransform;\n\t\t\tconst offset = axis.padding * index;\n\t\t\tswitch (axis.position) {\n\t\t\t\tcase DChartAxisPosition.TOP:\n\t\t\t\tcase DChartAxisPosition.BOTTOM:\n\t\t\t\t\tconst coordinateX = plotArea.coordinate.x.get(axis.coordinate);\n\t\t\t\t\tif (coordinateX) {\n\t\t\t\t\t\tconst work = this._work;\n\t\t\t\t\t\twork.set(coordinateX.transform.map(coordinateX.map(this._position)), 0);\n\t\t\t\t\t\ttransform.apply(work, work);\n\t\t\t\t\t\tconst x = work.x;\n\t\t\t\t\t\tshape.update(\n\t\t\t\t\t\t\taxis.position,\n\t\t\t\t\t\t\tx,\n\t\t\t\t\t\t\tplotAreaY + plotAreaHeight * 0.5,\n\t\t\t\t\t\t\tthis._isShown && plotAreaX <= x && x <= plotAreaX + plotAreaWidth,\n\t\t\t\t\t\t\tplotAreaWidth,\n\t\t\t\t\t\t\tplotAreaHeight,\n\t\t\t\t\t\t\toffset\n\t\t\t\t\t\t);\n\t\t\t\t\t} else {\n\t\t\t\t\t\tshape.update(\n\t\t\t\t\t\t\taxis.position,\n\t\t\t\t\t\t\tplotAreaX,\n\t\t\t\t\t\t\tplotAreaY + plotAreaHeight * 0.5,\n\t\t\t\t\t\t\tfalse,\n\t\t\t\t\t\t\tplotAreaWidth,\n\t\t\t\t\t\t\tplotAreaHeight,\n\t\t\t\t\t\t\toffset\n\t\t\t\t\t\t);\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\tcase DChartAxisPosition.LEFT:\n\t\t\t\tcase DChartAxisPosition.RIGHT:\n\t\t\t\t\tconst coordinateY = plotArea.coordinate.y.get(axis.coordinate);\n\t\t\t\t\tif (coordinateY) {\n\t\t\t\t\t\tconst work = this._work;\n\t\t\t\t\t\twork.set(0, coordinateY.transform.map(coordinateY.map(this._position)));\n\t\t\t\t\t\ttransform.apply(work, work);\n\t\t\t\t\t\tconst y = work.y;\n\t\t\t\t\t\tshape.update(\n\t\t\t\t\t\t\taxis.position,\n\t\t\t\t\t\t\tplotAreaX + plotAreaWidth * 0.5,\n\t\t\t\t\t\t\ty,\n\t\t\t\t\t\t\tthis._isShown && plotAreaY <= y && y <= plotAreaY + plotAreaHeight,\n\t\t\t\t\t\t\tplotAreaWidth,\n\t\t\t\t\t\t\tplotAreaHeight,\n\t\t\t\t\t\t\toffset\n\t\t\t\t\t\t);\n\t\t\t\t\t} else {\n\t\t\t\t\t\tshape.update(\n\t\t\t\t\t\t\taxis.position,\n\t\t\t\t\t\t\tplotAreaX + plotAreaWidth * 0.5,\n\t\t\t\t\t\t\tplotAreaY,\n\t\t\t\t\t\t\tfalse,\n\t\t\t\t\t\t\tplotAreaWidth,\n\t\t\t\t\t\t\tplotAreaHeight,\n\t\t\t\t\t\t\toffset\n\t\t\t\t\t\t);\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t}\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}\n\n\tdestroy(): void {\n\t\tconst shape = this._shape;\n\t\tif (shape != null) {\n\t\t\tshape.destroy();\n\t\t}\n\t\tthis._index = 0;\n\t\tthis._container = undefined;\n\t}\n}\n"]}
1
+ {"version":3,"file":"d-chart-axis-guide-simple.js","sourceRoot":"","sources":["../../../src/main/typescript/wcardinal/ui/d-chart-axis-guide-simple.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AAIhC,OAAO,EAAE,kBAAkB,EAAE,MAAM,yBAAyB,CAAC;AAM7D,OAAO,EAAE,8BAA8B,EAAE,MAAM,wCAAwC,CAAC;AAExF,OAAO,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AAQzD;IAaC,+BAAY,OAAsC;;QACjD,IAAI,CAAC,QAAQ,GAAG,OAAO,CAAC;QACxB,IAAI,CAAC,MAAM,GAAG,CAAC,CAAC;QAChB,IAAI,OAAO,IAAI,IAAI,EAAE;YACpB,IAAI,CAAC,SAAS,GAAG,MAAA,OAAO,CAAC,QAAQ,mCAAI,CAAC,CAAC;YACvC,IAAI,CAAC,MAAM,GAAG,MAAA,OAAO,CAAC,KAAK,mCAAI,KAAK,CAAC;SACrC;aAAM;YACN,IAAI,CAAC,SAAS,GAAG,CAAC,CAAC;YACnB,IAAI,CAAC,MAAM,GAAG,KAAK,CAAC;SACpB;QACD,IAAI,CAAC,QAAQ,GAAG,IAAI,CAAC;IACtB,CAAC;IAED,sBAAI,wCAAK;aAAT;YACC,IAAI,MAAM,GAAG,IAAI,CAAC,MAAM,CAAC;YACzB,IAAI,MAAM,IAAI,IAAI,EAAE;gBACnB,MAAM,GAAG,IAAI,CAAC,QAAQ,EAAE,CAAC;gBACzB,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;aACrB;YACD,OAAO,MAAM,CAAC;QACf,CAAC;;;OAAA;IAES,wCAAQ,GAAlB;QACC,OAAO,IAAI,8BAA8B,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;IAC1D,CAAC;IAED,s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,SAAS,CAAC;IAC7B,CAAC;IACF,4BAAC;AAAD,CAAC,AApLD,IAoLC","sourcesContent":["import { Point } from \"pixi.js\";\nimport { DBase } from \"./d-base\";\nimport { DChartAxisContainer } from \"./d-chart-axis-container\";\nimport { DChartAxisGuide } from \"./d-chart-axis-guide\";\nimport { DChartAxisPosition } from \"./d-chart-axis-position\";\nimport { DChartAxis } from \"./d-chart-axis\";\nimport {\n\tDChartAxisGuideSimpleShape,\n\tDChartAxisGuideSimpleShapeOptions\n} from \"./d-chart-axis-guide-simple-shape\";\nimport { DChartAxisGuideSimpleShapeImpl } from \"./d-chart-axis-guide-simple-shape-impl\";\nimport { DChartPlotArea, DChartPlotAreaLike } from \"./d-chart-plot-area\";\nimport { DChartRegionImpl } from \"./d-chart-region-impl\";\nimport { DChartRegion } from \"./d-chart-region\";\n\nexport interface DChartAxisGuideSimpleOptions extends DChartAxisGuideSimpleShapeOptions {\n\tposition?: number;\n\tfixed?: boolean;\n}\n\nexport class DChartAxisGuideSimple<CHART extends DBase = DBase> implements DChartAxisGuide<CHART> {\n\tprotected static WORK_POINT?: Point;\n\tprotected static WORK_REGION?: DChartRegion;\n\n\tprotected _axis?: DChartAxis<CHART>;\n\tprotected _options?: DChartAxisGuideSimpleOptions;\n\tprotected _container?: DChartAxisContainer<CHART>;\n\tprotected _index: number;\n\tprotected _shape?: DChartAxisGuideSimpleShape;\n\tprotected _position: number;\n\tprotected _fixed: boolean;\n\tprotected _isShown: boolean;\n\n\tconstructor(options?: DChartAxisGuideSimpleOptions) {\n\t\tthis._options = options;\n\t\tthis._index = 0;\n\t\tif (options != null) {\n\t\t\tthis._position = options.position ?? 0;\n\t\t\tthis._fixed = options.fixed ?? false;\n\t\t} else {\n\t\t\tthis._position = 0;\n\t\t\tthis._fixed = false;\n\t\t}\n\t\tthis._isShown = true;\n\t}\n\n\tget shape(): DChartAxisGuideSimpleShape {\n\t\tlet result = this._shape;\n\t\tif (result == null) {\n\t\t\tresult = this.newShape();\n\t\t\tthis._shape = result;\n\t\t}\n\t\treturn result;\n\t}\n\n\tprotected newShape(): DChartAxisGuideSimpleShape {\n\t\treturn new DChartAxisGuideSimpleShapeImpl(this._options);\n\t}\n\n\tget position(): number {\n\t\treturn this._position;\n\t}\n\n\tset position(position: number) {\n\t\tthis._position = position;\n\t}\n\n\tshow(): this {\n\t\tthis._isShown = true;\n\t\treturn this;\n\t}\n\n\tisShown(): boolean {\n\t\treturn this._isShown;\n\t}\n\n\thide(): this {\n\t\tthis._isShown = false;\n\t\treturn this;\n\t}\n\n\tisHidden(): boolean {\n\t\treturn !this._isShown;\n\t}\n\n\tbind(container: DChartAxisContainer<CHART>, index: number, axis: DChartAxis<CHART>): void {\n\t\tthis._container = container;\n\t\tthis._index = index;\n\t\tthis._axis = axis;\n\t\tthis.shape.bind(container, index, axis);\n\t}\n\n\tunbind(): void {\n\t\tconst shape = this._shape;\n\t\tif (shape != null) {\n\t\t\tshape.unbind();\n\t\t}\n\t\tthis._axis = undefined;\n\t\tthis._index = 0;\n\t\tthis._container = undefined;\n\t}\n\n\tupdate(): boolean {\n\t\tconst container = this._container;\n\t\tconst index = this._index;\n\t\tconst shape = this._shape;\n\t\tconst axis = this._axis;\n\t\tif (shape != null && container != null && axis != null) {\n\t\t\tconst plotArea = container.plotArea;\n\t\t\tconst plotAreaBounds = plotArea.getAxisBounds(axis.position);\n\t\t\tconst plotAreaX = plotAreaBounds.x;\n\t\t\tconst plotAreaY = plotAreaBounds.y;\n\t\t\tconst plotAreaWidth = plotAreaBounds.width;\n\t\t\tconst plotAreaHeight = plotAreaBounds.height;\n\t\t\tconst offset = axis.padding * index;\n\t\t\tswitch (axis.position) {\n\t\t\t\tcase DChartAxisPosition.TOP:\n\t\t\t\tcase DChartAxisPosition.BOTTOM:\n\t\t\t\t\tconst x = this.getPositionX(axis, plotArea, plotAreaX);\n\t\t\t\t\tshape.update(\n\t\t\t\t\t\taxis.position,\n\t\t\t\t\t\tx,\n\t\t\t\t\t\tplotAreaY + plotAreaHeight * 0.5,\n\t\t\t\t\t\tthis._isShown && plotAreaX <= x && x <= plotAreaX + plotAreaWidth,\n\t\t\t\t\t\tplotAreaWidth,\n\t\t\t\t\t\tplotAreaHeight,\n\t\t\t\t\t\toffset\n\t\t\t\t\t);\n\t\t\t\t\tbreak;\n\t\t\t\tcase DChartAxisPosition.LEFT:\n\t\t\t\tcase DChartAxisPosition.RIGHT:\n\t\t\t\t\tconst y = this.getPositionY(axis, plotArea, plotAreaY);\n\t\t\t\t\tshape.update(\n\t\t\t\t\t\taxis.position,\n\t\t\t\t\t\tplotAreaX + plotAreaWidth * 0.5,\n\t\t\t\t\t\ty,\n\t\t\t\t\t\tthis._isShown && plotAreaY <= y && y <= plotAreaY + plotAreaHeight,\n\t\t\t\t\t\tplotAreaWidth,\n\t\t\t\t\t\tplotAreaHeight,\n\t\t\t\t\t\toffset\n\t\t\t\t\t);\n\t\t\t\t\tbreak;\n\t\t\t}\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}\n\n\tprotected getPositionX(\n\t\taxis: DChartAxis<CHART>,\n\t\tplotArea: DChartPlotArea<CHART> | DChartPlotAreaLike<CHART>,\n\t\tplotAreaX: number\n\t): number {\n\t\tif (this._fixed) {\n\t\t\tconst work = (DChartAxisGuideSimple.WORK_REGION ??= new DChartRegionImpl(0, 0));\n\t\t\tplotArea.getPixelDomain(work);\n\t\t\treturn work.from + this._position * (work.to - work.from);\n\t\t} else {\n\t\t\tconst coordinateX = plotArea.coordinate.x.get(axis.coordinate);\n\t\t\tif (coordinateX) {\n\t\t\t\tconst work = (DChartAxisGuideSimple.WORK_POINT ??= new Point());\n\t\t\t\twork.set(coordinateX.transform.map(coordinateX.map(this._position)), 0);\n\t\t\t\tplotArea.container.transform.localTransform.apply(work, work);\n\t\t\t\treturn work.x;\n\t\t\t} else {\n\t\t\t\treturn plotAreaX - 100;\n\t\t\t}\n\t\t}\n\t}\n\n\tprotected getPositionY(\n\t\taxis: DChartAxis<CHART>,\n\t\tplotArea: DChartPlotArea<CHART> | DChartPlotAreaLike<CHART>,\n\t\tplotAreaY: number\n\t): number {\n\t\tif (this._fixed) {\n\t\t\tconst work = (DChartAxisGuideSimple.WORK_REGION ??= new DChartRegionImpl(0, 0));\n\t\t\tplotArea.getPixelRange(work);\n\t\t\treturn work.to + (1 - this._position) * (work.from - work.to);\n\t\t} else {\n\t\t\tconst coordinateY = plotArea.coordinate.y.get(axis.coordinate);\n\t\t\tif (coordinateY) {\n\t\t\t\tconst work = (DChartAxisGuideSimple.WORK_POINT ??= new Point());\n\t\t\t\twork.set(0, coordinateY.transform.map(coordinateY.map(this._position)));\n\t\t\t\tplotArea.container.transform.localTransform.apply(work, work);\n\t\t\t\treturn work.y;\n\t\t\t} else {\n\t\t\t\treturn plotAreaY - 100;\n\t\t\t}\n\t\t}\n\t}\n\n\tdestroy(): void {\n\t\tconst shape = this._shape;\n\t\tif (shape != null) {\n\t\t\tshape.destroy();\n\t\t}\n\t\tthis._index = 0;\n\t\tthis._container = undefined;\n\t}\n}\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"d-chart-plot-area-base.js","sourceRoot":"","sources":["../../../src/main/typescript/wcardinal/ui/d-chart-plot-area-base.ts"],"names":[],"mappings":"AAAA;;;GAGG;;AAEH,OAAO,EAAwC,KAAK,EAAE,SAAS,EAAY,MAAM,SAAS,CAAC;AAC3F,OAAO,EAAE,KAAK,EAAE,MAAM,UAAU,CAAC;AAajC;IAKS,sCAAqB;IAoB7B,4BAAY,KAAY,EAAE,OAAiB;QAA3C,YACC,kBAAM,OAAO,CAAC,SAmBd;QAjBA,KAAI,CAAC,uBAAuB,GAAG,IAAI,CAAC;QACpC,KAAI,CAAC,gBAAgB,GAAG,IAAI,SAAS,EAAE,CAAC;QACxC,KAAI,CAAC,UAAU,GAAG,IAAI,KAAK,EAAE,CAAC;QAE9B,KAAI,CAAC,YAAY,GAAG,IAAI,SAAS,EAAE,CAAC;QAEpC,KAAI,CAAC,MAAM,GAAG,KAA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Copyright (C) 2019 Toshiba Corporation\n * SPDX-License-Identifier: Apache-2.0\n */\n\nimport { InteractionEvent, InteractionManager, Point, Rectangle, Renderer } from \"pixi.js\";\nimport { DBase } from \"./d-base\";\nimport { DBaseOverflowMask } from \"./d-base-overflow-mask\";\nimport { DChartAxisContainer } from \"./d-chart-axis-container\";\nimport { DChartCoordinateContainer } from \"./d-chart-coordinate-container\";\nimport { DChartPlotArea, DThemeChartPlotArea, DChartPlotAreaOptions } from \"./d-chart-plot-area\";\nimport { DChartPlotAreaContainer } from \"./d-chart-plot-area-container\";\nimport { DChartSeriesContainer } from \"./d-chart-series-container\";\nimport { DView } from \"./d-view\";\nimport { DViewImpl } from \"./d-view-impl\";\nimport { UtilWheelEventDeltas } from \"./util/util-wheel-event\";\nimport { DChartRegion } from \"./d-chart-region\";\nimport { DChartAxisPosition } from \"./d-chart-axis-position\";\n\nexport abstract class DChartPlotAreaBase<\n\t\tCHART extends DBase = DBase,\n\t\tTHEME extends DThemeChartPlotArea = DThemeChartPlotArea,\n\t\tOPTIONS extends DChartPlotAreaOptions<CHART, THEME> = DChartPlotAreaOptions<CHART, THEME>\n\t>\n\textends DBase<THEME, OPTIONS>\n\timplements DChartPlotArea<CHART>\n{\n\tprotected _isContainerBoundsDirty: boolean;\n\tprotected _containerBounds: Rectangle;\n\tprotected _workPoint: Point;\n\n\tprotected _pixelBounds: Rectangle;\n\n\tprotected _chart: CHART;\n\n\tprotected _view: DViewImpl;\n\tprotected _isViewDirty: boolean;\n\tprotected _overflowMask?: DBaseOverflowMask | null;\n\n\tprotected _blendStartTime: number;\n\tprotected _blendDuration: number;\n\tprotected _blendTimeout: number | null;\n\tprotected _onBlendBound: () => void;\n\n\tconstructor(chart: CHART, options?: OPTIONS) {\n\t\tsuper(options);\n\n\t\tthis._isContainerBoundsDirty = true;\n\t\tthis._containerBounds = new Rectangle();\n\t\tthis._workPoint = new Point();\n\n\t\tthis._pixelBounds = new Rectangle();\n\n\t\tthis._chart = chart;\n\n\t\tthis._blendStartTime = 0;\n\t\tthis._blendDuration = 1000;\n\t\tthis._blendTimeout = null;\n\t\tthis._onBlendBound = () => {\n\t\t\tthis.onBlend();\n\t\t};\n\n\t\tthis._isViewDirty = true;\n\t\tthis._view = this.newView(options);\n\t}\n\n\tonResize(newWidth: number, newHeight: number, oldWidth: number, oldHeight: number): void {\n\t\tthis._isViewDirty = true;\n\t\tthis._isContainerBoundsDirty = true;\n\t\tsuper.onResize(newWidth, newHeight, oldWidth, oldHeight);\n\t}\n\n\tget chart(): CHART {\n\t\treturn this._chart;\n\t}\n\n\tabstract get coordinate(): DChartCoordinateContainer<CHART>;\n\n\tabstract get series(): DChartSeriesContainer<CHART>;\n\n\tabstract get container(): DChartPlotAreaContainer;\n\n\tabstract get axis(): DChartAxisContainer<CHART>;\n\n\tget view(): DView {\n\t\treturn this._view;\n\t}\n\n\tabstract newView(options?: OPTIONS): DViewImpl;\n\n\tprotected onWheel(e: WheelEvent, deltas: UtilWheelEventDeltas, global: Point): boolean {\n\t\tconst vresult = this._view.onWheel(e, deltas, global);\n\t\tconst sresult = super.onWheel(e, deltas, global);\n\t\treturn vresult || sresult;\n\t}\n\n\tprotected onDblClick(\n\t\te: MouseEvent | TouchEvent,\n\t\tinteractionManager: InteractionManager\n\t): boolean {\n\t\tconst vresult = this._view.onDblClick(e, interactionManager);\n\t\tconst sresult = super.onDblClick(e, interactionManager);\n\t\treturn vresult || sresult;\n\t}\n\n\tprotected onDown(e: InteractionEvent): void {\n\t\tthis._view.onDown(e);\n\t\tsuper.onDown(e);\n\t}\n\n\trender(renderer: Renderer): void {\n\t\tif (this._isViewDirty) {\n\t\t\tthis._isViewDirty = false;\n\t\t\tthis.onViewDirty();\n\t\t}\n\t\tsuper.render(renderer);\n\t}\n\n\tprotected abstract onViewDirty(): void;\n\n\tabstract destroy(): void;\n\n\tgetPixelDomain(result: DChartRegion): DChartRegion {\n\t\tconst padding = this.padding;\n\t\treturn result.set(padding.getLeft(), this.width - padding.getRight());\n\t}\n\n\tgetPixelRange(result: DChartRegion): DChartRegion {\n\t\tconst padding = this.padding;\n\t\treturn result.set(this.height - padding.getBottom(), padding.getTop());\n\t}\n\n\tgetPixelBounds(): Rectangle {\n\t\tconst result = this._pixelBounds;\n\t\tresult.x = 0;\n\t\tresult.y = 0;\n\t\tresult.width = this.width;\n\t\tresult.height = this.height;\n\t\treturn result;\n\t}\n\n\tgetAxisBounds(position: DChartAxisPosition): Rectangle {\n\t\treturn this.getPixelBounds();\n\t}\n\n\tgetSelectionBoundsX(): Rectangle {\n\t\treturn this.getPixelBounds();\n\t}\n\n\tgetSelectionBoundsY(): Rectangle {\n\t\treturn this.getPixelBounds();\n\t}\n\n\tgetContainerBounds(): Rectangle {\n\t\tconst result = this._containerBounds;\n\t\tif (this._isContainerBoundsDirty) {\n\t\t\tthis._isContainerBoundsDirty = false;\n\n\t\t\tconst container = this.container;\n\t\t\tcontainer.updateTransform();\n\t\t\tconst transform = container.transform.localTransform;\n\n\t\t\tconst work = this._workPoint;\n\n\t\t\twork.set(0, 0);\n\t\t\ttransform.applyInverse(work, work);\n\t\t\tresult.x = work.x;\n\t\t\tresult.y = work.y;\n\n\t\t\twork.set(this.width, this.height);\n\t\t\ttransform.applyInverse(work, work);\n\t\t\tresult.width = work.x - result.x;\n\t\t\tresult.height = work.y - result.y;\n\t\t}\n\t\treturn result;\n\t}\n\n\tabstract fit(\n\t\tduration?: number,\n\t\tdomainFrom?: number,\n\t\tdomainTo?: number,\n\t\trangeFrom?: number,\n\t\trangeTo?: number\n\t): this;\n\n\tprotected abstract onBlend(): void;\n\n\tprotected getType(): string {\n\t\treturn \"DChartPlotArea\";\n\t}\n}\n"]}
1
+ {"version":3,"file":"d-chart-plot-area-base.js","sourceRoot":"","sources":["../../../src/main/typescript/wcardinal/ui/d-chart-plot-area-base.ts"],"names":[],"mappings":"AAAA;;;GAGG;;AAEH,OAAO,EAAwC,KAAK,EAAE,SAAS,EAAY,MAAM,SAAS,CAAC;AAC3F,O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AAC;YAClC,SAAS,CAAC,YAAY,CAAC,IAAI,EAAE,IAAI,CAAC,CAAC;YACnC,MAAM,CAAC,KAAK,GAAG,IAAI,CAAC,CAAC,GAAG,MAAM,CAAC,CAAC,CAAC;YACjC,MAAM,CAAC,MAAM,GAAG,IAAI,CAAC,CAAC,GAAG,MAAM,CAAC,CAAC,CAAC;SAClC;QACD,OAAO,MAAM,CAAC;IACf,CAAC;IAYS,oCAAO,GAAjB;QACC,OAAO,gBAAgB,CAAC;IACzB,CAAC;IACF,yBAAC;AAAD,CAAC,AAhLD,CAKS,KAAK,GA2Kb","sourcesContent":["/*\n * Copyright (C) 2019 Toshiba Corporation\n * SPDX-License-Identifier: Apache-2.0\n */\n\nimport { InteractionEvent, InteractionManager, Point, Rectangle, Renderer } from \"pixi.js\";\nimport { DBase } from \"./d-base\";\nimport { DBaseOverflowMask } from \"./d-base-overflow-mask\";\nimport { DChartAxisContainer } from \"./d-chart-axis-container\";\nimport { DChartCoordinateContainer } from \"./d-chart-coordinate-container\";\nimport { DChartPlotArea, DThemeChartPlotArea, DChartPlotAreaOptions } from \"./d-chart-plot-area\";\nimport { DChartPlotAreaContainer } from \"./d-chart-plot-area-container\";\nimport { DChartSeriesContainer } from \"./d-chart-series-container\";\nimport { DView } from \"./d-view\";\nimport { DViewImpl } from \"./d-view-impl\";\nimport { UtilWheelEventDeltas } from \"./util/util-wheel-event\";\nimport { DChartRegion } from \"./d-chart-region\";\nimport { DChartAxisPosition } from \"./d-chart-axis-position\";\n\nexport abstract class DChartPlotAreaBase<\n\t\tCHART extends DBase = DBase,\n\t\tTHEME extends DThemeChartPlotArea = DThemeChartPlotArea,\n\t\tOPTIONS extends DChartPlotAreaOptions<CHART, THEME> = DChartPlotAreaOptions<CHART, THEME>\n\t>\n\textends DBase<THEME, OPTIONS>\n\timplements DChartPlotArea<CHART>\n{\n\tprotected _isContainerBoundsDirty: boolean;\n\tprotected _containerBounds: Rectangle;\n\tprotected _workPoint: Point;\n\n\tprotected _pixelBounds: Rectangle;\n\n\tprotected _chart: CHART;\n\n\tprotected _view: DViewImpl;\n\tprotected _isViewDirty: boolean;\n\tprotected _overflowMask?: DBaseOverflowMask | null;\n\n\tprotected _blendStartTime: number;\n\tprotected _blendDuration: number;\n\tprotected _blendTimeout: number | null;\n\tprotected _onBlendBound: () => void;\n\n\tconstructor(chart: CHART, options?: OPTIONS) {\n\t\tsuper(options);\n\n\t\tthis._isContainerBoundsDirty = true;\n\t\tthis._containerBounds = new Rectangle();\n\t\tthis._workPoint = new Point();\n\n\t\tthis._pixelBounds = new Rectangle();\n\n\t\tthis._chart = chart;\n\n\t\tthis._blendStartTime = 0;\n\t\tthis._blendDuration = 1000;\n\t\tthis._blendTimeout = null;\n\t\tthis._onBlendBound = () => {\n\t\t\tthis.onBlend();\n\t\t};\n\n\t\tthis._isViewDirty = true;\n\t\tthis._view = this.newView(options);\n\t}\n\n\toverride onResize(\n\t\tnewWidth: number,\n\t\tnewHeight: number,\n\t\toldWidth: number,\n\t\toldHeight: number\n\t): void {\n\t\tthis._isViewDirty = true;\n\t\tthis._isContainerBoundsDirty = true;\n\t\tsuper.onResize(newWidth, newHeight, oldWidth, oldHeight);\n\t}\n\n\tget chart(): CHART {\n\t\treturn this._chart;\n\t}\n\n\tabstract get coordinate(): DChartCoordinateContainer<CHART>;\n\n\tabstract get series(): DChartSeriesContainer<CHART>;\n\n\tabstract get container(): DChartPlotAreaContainer;\n\n\tabstract get axis(): DChartAxisContainer<CHART>;\n\n\tget view(): DView {\n\t\treturn this._view;\n\t}\n\n\tabstract newView(options?: OPTIONS): DViewImpl;\n\n\tprotected onWheel(e: WheelEvent, deltas: UtilWheelEventDeltas, global: Point): boolean {\n\t\tconst vresult = this._view.onWheel(e, deltas, global);\n\t\tconst sresult = super.onWheel(e, deltas, global);\n\t\treturn vresult || sresult;\n\t}\n\n\tprotected onDblClick(\n\t\te: MouseEvent | TouchEvent,\n\t\tinteractionManager: InteractionManager\n\t): boolean {\n\t\tconst vresult = this._view.onDblClick(e, interactionManager);\n\t\tconst sresult = super.onDblClick(e, interactionManager);\n\t\treturn vresult || sresult;\n\t}\n\n\tprotected onDown(e: InteractionEvent): void {\n\t\tthis._view.onDown(e);\n\t\tsuper.onDown(e);\n\t}\n\n\trender(renderer: Renderer): void {\n\t\tif (this._isViewDirty) {\n\t\t\tthis._isViewDirty = false;\n\t\t\tthis.onViewDirty();\n\t\t}\n\t\tsuper.render(renderer);\n\t}\n\n\tprotected abstract onViewDirty(): void;\n\n\tabstract destroy(): void;\n\n\tgetPixelDomain(result: DChartRegion): DChartRegion {\n\t\tconst padding = this.padding;\n\t\treturn result.set(padding.getLeft(), this.width - padding.getRight());\n\t}\n\n\tgetPixelRange(result: DChartRegion): DChartRegion {\n\t\tconst padding = this.padding;\n\t\treturn result.set(this.height - padding.getBottom(), padding.getTop());\n\t}\n\n\tgetPixelBounds(): Rectangle {\n\t\tconst result = this._pixelBounds;\n\t\tresult.x = 0;\n\t\tresult.y = 0;\n\t\tresult.width = this.width;\n\t\tresult.height = this.height;\n\t\treturn result;\n\t}\n\n\tgetAxisBounds(position: DChartAxisPosition): Rectangle {\n\t\treturn this.getPixelBounds();\n\t}\n\n\tgetSelectionBoundsX(): Rectangle {\n\t\treturn this.getPixelBounds();\n\t}\n\n\tgetSelectionBoundsY(): Rectangle {\n\t\treturn this.getPixelBounds();\n\t}\n\n\tgetContainerBounds(): Rectangle {\n\t\tconst result = this._containerBounds;\n\t\tif (this._isContainerBoundsDirty) {\n\t\t\tthis._isContainerBoundsDirty = false;\n\n\t\t\tconst container = this.container;\n\t\t\tcontainer.updateTransform();\n\t\t\tconst transform = container.transform.localTransform;\n\n\t\t\tconst work = this._workPoint;\n\n\t\t\twork.set(0, 0);\n\t\t\ttransform.applyInverse(work, work);\n\t\t\tresult.x = work.x;\n\t\t\tresult.y = work.y;\n\n\t\t\twork.set(this.width, this.height);\n\t\t\ttransform.applyInverse(work, work);\n\t\t\tresult.width = work.x - result.x;\n\t\t\tresult.height = work.y - result.y;\n\t\t}\n\t\treturn result;\n\t}\n\n\tabstract fit(\n\t\tduration?: number,\n\t\tdomainFrom?: number,\n\t\tdomainTo?: number,\n\t\trangeFrom?: number,\n\t\trangeTo?: number\n\t): this;\n\n\tprotected abstract onBlend(): void;\n\n\tprotected getType(): string {\n\t\treturn \"DChartPlotArea\";\n\t}\n}\n"]}
@@ -68,6 +68,11 @@ var DChartPlotAreaTwofold = /** @class */ (function (_super) {
68
68
  }
69
69
  return _this;
70
70
  }
71
+ DChartPlotAreaTwofold.prototype.onResize = function (newWidth, newHeight, oldWidth, oldHeight) {
72
+ this._primary.toBoundsDirty();
73
+ this._secondary.toBoundsDirty();
74
+ _super.prototype.onResize.call(this, newWidth, newHeight, oldWidth, oldHeight);
75
+ };
71
76
  DChartPlotAreaTwofold.prototype.addSeries = function (series, list) {
72
77
  if (list != null) {
73
78
  var listLength = list.length;
@@ -1 +1 @@
1
- {"version":3,"file":"d-chart-plot-area-twofold.js","sourceRoot":"","sources":["../../../src/main/typescript/wcardinal/ui/d-chart-plot-area-twofold.ts"],"names":[],"mappings":"AAAA;;;GAGG;;AAEH,OAAO,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AAIjD,OAAO,EAAE,kBAAkB,EAAE,MAAM,0BAA0B,CAAC;AAI9D,OAAO,EAAE,iBAAiB,EAAE,MAAM,uBAAuB,CAAC;AAC1D,OAAO,EAAE,uCAAuC,EAAE,MAAM,kDAAkD,CAAC;AAC3G,OAAO,EAAE,oCAAoC,EAAE,MAAM,8CAA8C,CAAC;AACpG,OAAO,EAAE,kCAAkC,EAAE,MAAM,4CAA4C,CAAC;AAGhG,OAAO,EAAE,+BAA+B,EAAE,MAAM,yCAAyC,CAAC;AAC1F,OAAO,EAAE,iCAAiC,EAAE,MAAM,2CAA2C,CAAC;AAG9F,OAAO,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AAC1C,OAAO,EAAE,+BAA+B,EAAE,MAAM,yCAAyC,CAAC;AA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applications\";\nimport { DBase } from \"./d-base\";\nimport { DThemeChartPlotArea, DChartPlotAreaOptions } from \"./d-chart-plot-area\";\nimport { DChartPlotAreaContainer } from \"./d-chart-plot-area-container\";\nimport { DChartPlotAreaBase } from \"./d-chart-plot-area-base\";\nimport { DChartSeriesContainer } from \"./d-chart-series-container\";\nimport { DChartCoordinateContainer } from \"./d-chart-coordinate-container\";\nimport { DChartAxisContainer, DChartAxisContainerOptions } from \"./d-chart-axis-container\";\nimport { DAnimationTimings } from \"./d-animation-timings\";\nimport { DChartPlotAreaTwofoldCoorinateContainer } from \"./d-chart-plot-area-twofold-coordinate-container\";\nimport { DChartPlotAreaTwofoldSeriesContainer } from \"./d-chart-plot-area-twofold-series-container\";\nimport { DChartPlotAreaTwofoldAxisContainer } from \"./d-chart-plot-area-twofold-axis-container\";\nimport { DChartSelection } from \"./d-chart-selection\";\nimport { DChartPlotAreaTwofoldSubOptions } from \"./d-chart-plot-area-twofold-sub\";\nimport { DChartPlotAreaTwofoldSubPrimary } from \"./d-chart-plot-area-twofold-sub-primary\";\nimport { DChartPlotAreaTwofoldSubSecondary } from \"./d-chart-plot-area-twofold-sub-secondary\";\nimport { DChartSeries } from \"./d-chart-series\";\nimport { DChartAxis } from \"./d-chart-axis\";\nimport { DViewImpl } from \"./d-view-impl\";\nimport { DChartPlotAreaTwofoldViewTarget } from \"./d-chart-plot-area-twofold-view-target\";\nimport { EShapeContainer } from \"./shape\";\n\nexport interface DChartPlotAreaTwofoldOptions<\n\tCHART extends DBase = DBase,\n\tTHEME extends DThemeChartPlotArea = DThemeChartPlotArea\n> extends DChartPlotAreaOptions<CHART, THEME> {\n\tprimary?: DChartPlotAreaTwofoldSubOptions<CHART>;\n\tsecondary?: DChartPlotAreaTwofoldSubOptions<CHART>;\n\tselection?: DChartSelection<CHART>;\n\taxis?: DChartAxisContainerOptions<CHART>;\n\tmargin?: number;\n}\n\nexport class DChartPlotAreaTwofold<\n\tCHART extends DBase = DBase,\n\tTHEME extends DThemeChartPlotArea = DThemeChartPlotArea,\n\tOPTIONS extends DChartPlotAreaTwofoldOptions<CHART, THEME> = DChartPlotAreaTwofoldOptions<\n\t\tCHART,\n\t\tTHEME\n\t>\n> extends DChartPlotAreaBase<CHART, THEME, OPTIONS> {\n\tprotected _primary: DChartPlotAreaTwofoldSubPrimary<CHART>;\n\tprotected _secondary: DChartPlotAreaTwofoldSubSecondary<CHART>;\n\tprotected _margin: number;\n\n\tprotected _coordinate: DChartCoordinateContainer<CHART>;\n\tprotected _series: DChartPlotAreaTwofoldSeriesContainer<CHART>;\n\tprotected _axis: DChartPlotAreaTwofoldAxisContainer<CHART>;\n\n\tconstructor(chart: CHART, options?: OPTIONS) {\n\t\tsuper(chart, options);\n\n\t\t// Margin\n\t\tconst theme = this.theme;\n\t\tconst margin = options?.margin ?? theme.getMargin();\n\t\tthis._margin = margin;\n\n\t\t// Primary\n\t\tconst axisShapeContainer = new EShapeContainer();\n\t\tconst onContainerChangeBound = (): void => {\n\t\t\tthis.onContainerChange();\n\t\t};\n\t\tconst mask = options?.mask ?? theme.isOverflowMaskEnabled();\n\t\tconst primaryOptions = options?.primary;\n\t\tconst primary = new DChartPlotAreaTwofoldSubPrimary<CHART>(\n\t\t\tthis,\n\t\t\tonContainerChangeBound,\n\t\t\tmask,\n\t\t\tmargin,\n\t\t\taxisShapeContainer,\n\t\t\tprimaryOptions\n\t\t);\n\t\tthis._primary = primary;\n\n\t\t// Secondary\n\t\tconst secondaryOptions = options?.secondary;\n\t\tconst secondary = new DChartPlotAreaTwofoldSubSecondary<CHART>(\n\t\t\tthis,\n\t\t\tonContainerChangeBound,\n\t\t\tmask,\n\t\t\tmargin,\n\t\t\taxisShapeContainer,\n\t\t\tsecondaryOptions\n\t\t);\n\t\tthis._secondary = secondary;\n\n\t\t// Container\n\t\tthis.addChild(primary.container);\n\t\tthis.addChild(secondary.container);\n\n\t\t// Coordinate\n\t\tthis._coordinate = new DChartPlotAreaTwofoldCoorinateContainer<CHART>(\n\t\t\tthis,\n\t\t\tprimary.coordinate,\n\t\t\tsecondary.coordinate\n\t\t);\n\n\t\t// Series\n\t\tconst primarySeries = primary.series;\n\t\tconst secondarySeries = secondary.series;\n\t\tconst series = new DChartPlotAreaTwofoldSeriesContainer<CHART>(\n\t\t\tthis,\n\t\t\tprimarySeries,\n\t\t\tsecondarySeries\n\t\t);\n\t\tthis._series = series;\n\n\t\t// Axis\n\t\tconst primaryAxis = primary.axis;\n\t\tconst secondaryAxis = secondary.axis;\n\t\tthis.addChild(axisShapeContainer);\n\t\tconst axis = new DChartPlotAreaTwofoldAxisContainer<CHART>(\n\t\t\tthis,\n\t\t\taxisShapeContainer,\n\t\t\tprimaryAxis,\n\t\t\tsecondaryAxis\n\t\t);\n\t\tthis._axis = axis;\n\n\t\t// Add Series\n\t\tthis.addSeries(primarySeries, primaryOptions?.series?.list);\n\t\tthis.addSeries(secondarySeries, secondaryOptions?.series?.list);\n\n\t\t// Add Axes\n\t\tthis.addAxes(primaryAxis, primaryOptions?.axis?.list);\n\t\tthis.addAxes(secondaryAxis, secondaryOptions?.axis?.list);\n\t\tthis.addAxes(axis, options?.axis?.list);\n\n\t\t// Selection\n\t\tconst selection = options?.selection;\n\t\tif (selection != null) {\n\t\t\tprimarySeries.selection = selection;\n\t\t\tsecondarySeries.selection = selection;\n\t\t\tselection.bind(series);\n\t\t}\n\t}\n\n\tprotected addSeries(series: DChartSeriesContainer<CHART>, list?: DChartSeries<CHART>[]): void {\n\t\tif (list != null) {\n\t\t\tconst listLength = list.length;\n\t\t\tif (0 < listLength) {\n\t\t\t\tfor (let i = 0; i < listLength; ++i) {\n\t\t\t\t\tseries.add(list[i]);\n\t\t\t\t}\n\t\t\t\tseries.update();\n\t\t\t}\n\t\t}\n\t}\n\n\tprotected addAxes(axis: DChartAxisContainer<CHART>, list?: DChartAxis<CHART>[]): void {\n\t\tif (list != null) {\n\t\t\tfor (let i = 0, imax = list.length; i < imax; ++i) {\n\t\t\t\taxis.add(list[i]);\n\t\t\t}\n\t\t}\n\t}\n\n\tget primary(): DChartPlotAreaTwofoldSubPrimary<CHART> {\n\t\treturn this._primary;\n\t}\n\n\tget secondary(): DChartPlotAreaTwofoldSubSecondary<CHART> {\n\t\treturn this._secondary;\n\t}\n\n\toverride get container(): DChartPlotAreaContainer {\n\t\treturn this.secondary.container;\n\t}\n\n\tprotected onContainerChange(): void {\n\t\tthis._isViewDirty = true;\n\t\tthis._isContainerBoundsDirty = true;\n\t\tthis._primary.toBoundsDirty();\n\t\tthis._secondary.toBoundsDirty();\n\t\tDApplications.update(this);\n\t}\n\n\toverride get coordinate(): DChartCoordinateContainer<CHART> {\n\t\treturn this._coordinate;\n\t}\n\n\toverride get series(): DChartSeriesContainer<CHART> {\n\t\treturn this._series;\n\t}\n\n\toverride get axis(): DChartAxisContainer<CHART> {\n\t\treturn this._axis;\n\t}\n\n\toverride newView(options?: OPTIONS): DViewImpl {\n\t\tlet viewTarget: DChartPlotAreaTwofoldViewTarget<CHART> | undefined;\n\t\tconst toViewTarget = () => {\n\t\t\treturn (viewTarget ??= new DChartPlotAreaTwofoldViewTarget<CHART>(\n\t\t\t\tthis._primary.container,\n\t\t\t\tthis._secondary.container\n\t\t\t));\n\t\t};\n\t\treturn new DViewImpl(this, toViewTarget, options?.view);\n\t}\n\n\tprotected override onViewDirty(): void {\n\t\tthis._coordinate.fit();\n\t\tthis._axis.onRender();\n\t\tthis._series.onRender();\n\t}\n\n\toverride fit(\n\t\tduration?: number,\n\t\tdomainFrom?: number,\n\t\tdomainTo?: number,\n\t\trangeFrom?: number,\n\t\trangeTo?: number\n\t): this {\n\t\tif (duration != null && duration <= 0) {\n\t\t\tconst primary = this.primary;\n\t\t\tprimary.coordinate.fit(domainFrom, domainTo, rangeFrom, rangeTo);\n\t\t\tprimary.axis.update();\n\t\t\tprimary.series.update();\n\n\t\t\tconst secondary = this.secondary;\n\t\t\tsecondary.coordinate.fit(domainFrom, domainTo, rangeFrom, rangeTo);\n\t\t\tsecondary.axis.update();\n\t\t\tsecondary.series.update();\n\t\t} else {\n\t\t\tthis._blendDuration = duration != null ? duration : 200;\n\t\t\tthis._blendStartTime = Date.now();\n\t\t\tthis.primary.coordinate.mark(domainFrom, domainTo, rangeFrom, rangeTo);\n\t\t\tthis.secondary.coordinate.mark(domainFrom, domainTo, rangeFrom, rangeTo);\n\t\t\tconst blendTimeout = this._blendTimeout;\n\t\t\tif (blendTimeout != null) {\n\t\t\t\twindow.clearTimeout(blendTimeout);\n\t\t\t}\n\t\t\tthis._blendTimeout = window.setTimeout(this._onBlendBound, 0);\n\t\t}\n\t\treturn this;\n\t}\n\n\tprotected onBlend(): void {\n\t\tconst now = Date.now();\n\t\tlet ratio = (now - this._blendStartTime) / this._blendDuration;\n\t\tif (ratio < 1) {\n\t\t\tthis._blendTimeout = window.setTimeout(this._onBlendBound, 0);\n\t\t} else {\n\t\t\tthis._blendTimeout = null;\n\t\t\tratio = 1;\n\t\t}\n\n\t\tconst t = DAnimationTimings.ELASTIC(ratio);\n\t\tconst primary = this.primary;\n\t\tprimary.coordinate.blend(t);\n\t\tprimary.axis.update();\n\t\tprimary.series.update();\n\n\t\tconst secondary = this.secondary;\n\t\tsecondary.coordinate.blend(t);\n\t\tsecondary.axis.update();\n\t\tsecondary.series.update();\n\t}\n\n\toverride destroy(): void {\n\t\tthis._primary?.destroy();\n\t\tthis._secondary?.destroy();\n\t\tthis._axis.destroy();\n\t}\n}\n"]}
1
+ {"version":3,"file":"d-chart-plot-area-twofold.js","sourceRoot":"","sources":["../../../src/main/typescript/wcardinal/ui/d-chart-plot-area-twofold.ts"],"names":[],"mappings":"AAAA;;;GAGG;;AAEH,OAAO,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AAIjD,OAAO,EAAE,kBAAkB,EAAE,MAAM,0BAA0B,CAAC;AAI9D,OAAO,EAAE,iBAAiB,EAAE,MAAM,uBAAuB,CAAC;AAC1D,OAAO,EAAE,uCAAuC,EAAE,MAAM,kDAAkD,CAAC;AAC3G,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,CAAC,MAAM,EAAE,CAAC;QAExB,IAAM,SAAS,GAAG,IAAI,CAAC,SAAS,CAAC;QACjC,SAAS,CAAC,UAAU,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC;QAC9B,SAAS,CAAC,IAAI,CAAC,MAAM,EAAE,CAAC;QACxB,SAAS,CAAC,MAAM,CAAC,MAAM,EAAE,CAAC;IAC3B,CAAC;IAEQ,uCAAO,GAAhB;;QACC,MAAA,IAAI,CAAC,QAAQ,0CAAE,OAAO,EAAE,CAAC;QACzB,MAAA,IAAI,CAAC,UAAU,0CAAE,OAAO,EAAE,CAAC;QAC3B,IAAI,CAAC,KAAK,CAAC,OAAO,EAAE,CAAC;IACtB,CAAC;IACF,4BAAC;AAAD,CAAC,AAlPD,CAOU,kBAAkB,GA2O3B","sourcesContent":["/*\n * Copyright (C) 2019 Toshiba Corporation\n * SPDX-License-Identifier: Apache-2.0\n */\n\nimport { DApplications } from \"./d-applications\";\nimport { DBase } from \"./d-base\";\nimport { DThemeChartPlotArea, DChartPlotAreaOptions } from \"./d-chart-plot-area\";\nimport { DChartPlotAreaContainer } from \"./d-chart-plot-area-container\";\nimport { DChartPlotAreaBase } from \"./d-chart-plot-area-base\";\nimport { DChartSeriesContainer } from \"./d-chart-series-container\";\nimport { DChartCoordinateContainer } from \"./d-chart-coordinate-container\";\nimport { DChartAxisContainer, DChartAxisContainerOptions } from \"./d-chart-axis-container\";\nimport { DAnimationTimings } from \"./d-animation-timings\";\nimport { DChartPlotAreaTwofoldCoorinateContainer } from \"./d-chart-plot-area-twofold-coordinate-container\";\nimport { DChartPlotAreaTwofoldSeriesContainer } from \"./d-chart-plot-area-twofold-series-container\";\nimport { DChartPlotAreaTwofoldAxisContainer } from \"./d-chart-plot-area-twofold-axis-container\";\nimport { DChartSelection } from \"./d-chart-selection\";\nimport { DChartPlotAreaTwofoldSubOptions } from \"./d-chart-plot-area-twofold-sub\";\nimport { DChartPlotAreaTwofoldSubPrimary } from \"./d-chart-plot-area-twofold-sub-primary\";\nimport { DChartPlotAreaTwofoldSubSecondary } from \"./d-chart-plot-area-twofold-sub-secondary\";\nimport { DChartSeries } from \"./d-chart-series\";\nimport { DChartAxis } from \"./d-chart-axis\";\nimport { DViewImpl } from \"./d-view-impl\";\nimport { DChartPlotAreaTwofoldViewTarget } from \"./d-chart-plot-area-twofold-view-target\";\nimport { EShapeContainer } from \"./shape\";\n\nexport interface DChartPlotAreaTwofoldOptions<\n\tCHART extends DBase = DBase,\n\tTHEME extends DThemeChartPlotArea = DThemeChartPlotArea\n> extends DChartPlotAreaOptions<CHART, THEME> {\n\tprimary?: DChartPlotAreaTwofoldSubOptions<CHART>;\n\tsecondary?: DChartPlotAreaTwofoldSubOptions<CHART>;\n\tselection?: DChartSelection<CHART>;\n\taxis?: DChartAxisContainerOptions<CHART>;\n\tmargin?: number;\n}\n\nexport class DChartPlotAreaTwofold<\n\tCHART extends DBase = DBase,\n\tTHEME extends DThemeChartPlotArea = DThemeChartPlotArea,\n\tOPTIONS extends DChartPlotAreaTwofoldOptions<CHART, THEME> = DChartPlotAreaTwofoldOptions<\n\t\tCHART,\n\t\tTHEME\n\t>\n> extends DChartPlotAreaBase<CHART, THEME, OPTIONS> {\n\tprotected _primary: DChartPlotAreaTwofoldSubPrimary<CHART>;\n\tprotected _secondary: DChartPlotAreaTwofoldSubSecondary<CHART>;\n\tprotected _margin: number;\n\n\tprotected _coordinate: DChartCoordinateContainer<CHART>;\n\tprotected _series: DChartPlotAreaTwofoldSeriesContainer<CHART>;\n\tprotected _axis: DChartPlotAreaTwofoldAxisContainer<CHART>;\n\n\tconstructor(chart: CHART, options?: OPTIONS) {\n\t\tsuper(chart, options);\n\n\t\t// Margin\n\t\tconst theme = this.theme;\n\t\tconst margin = options?.margin ?? theme.getMargin();\n\t\tthis._margin = margin;\n\n\t\t// Primary\n\t\tconst axisShapeContainer = new EShapeContainer();\n\t\tconst onContainerChangeBound = (): void => {\n\t\t\tthis.onContainerChange();\n\t\t};\n\t\tconst mask = options?.mask ?? theme.isOverflowMaskEnabled();\n\t\tconst primaryOptions = options?.primary;\n\t\tconst primary = new DChartPlotAreaTwofoldSubPrimary<CHART>(\n\t\t\tthis,\n\t\t\tonContainerChangeBound,\n\t\t\tmask,\n\t\t\tmargin,\n\t\t\taxisShapeContainer,\n\t\t\tprimaryOptions\n\t\t);\n\t\tthis._primary = primary;\n\n\t\t// Secondary\n\t\tconst secondaryOptions = options?.secondary;\n\t\tconst secondary = new DChartPlotAreaTwofoldSubSecondary<CHART>(\n\t\t\tthis,\n\t\t\tonContainerChangeBound,\n\t\t\tmask,\n\t\t\tmargin,\n\t\t\taxisShapeContainer,\n\t\t\tsecondaryOptions\n\t\t);\n\t\tthis._secondary = secondary;\n\n\t\t// Container\n\t\tthis.addChild(primary.container);\n\t\tthis.addChild(secondary.container);\n\n\t\t// Coordinate\n\t\tthis._coordinate = new DChartPlotAreaTwofoldCoorinateContainer<CHART>(\n\t\t\tthis,\n\t\t\tprimary.coordinate,\n\t\t\tsecondary.coordinate\n\t\t);\n\n\t\t// Series\n\t\tconst primarySeries = primary.series;\n\t\tconst secondarySeries = secondary.series;\n\t\tconst series = new DChartPlotAreaTwofoldSeriesContainer<CHART>(\n\t\t\tthis,\n\t\t\tprimarySeries,\n\t\t\tsecondarySeries\n\t\t);\n\t\tthis._series = series;\n\n\t\t// Axis\n\t\tconst primaryAxis = primary.axis;\n\t\tconst secondaryAxis = secondary.axis;\n\t\tthis.addChild(axisShapeContainer);\n\t\tconst axis = new DChartPlotAreaTwofoldAxisContainer<CHART>(\n\t\t\tthis,\n\t\t\taxisShapeContainer,\n\t\t\tprimaryAxis,\n\t\t\tsecondaryAxis\n\t\t);\n\t\tthis._axis = axis;\n\n\t\t// Add Series\n\t\tthis.addSeries(primarySeries, primaryOptions?.series?.list);\n\t\tthis.addSeries(secondarySeries, secondaryOptions?.series?.list);\n\n\t\t// Add Axes\n\t\tthis.addAxes(primaryAxis, primaryOptions?.axis?.list);\n\t\tthis.addAxes(secondaryAxis, secondaryOptions?.axis?.list);\n\t\tthis.addAxes(axis, options?.axis?.list);\n\n\t\t// Selection\n\t\tconst selection = options?.selection;\n\t\tif (selection != null) {\n\t\t\tprimarySeries.selection = selection;\n\t\t\tsecondarySeries.selection = selection;\n\t\t\tselection.bind(series);\n\t\t}\n\t}\n\n\toverride onResize(\n\t\tnewWidth: number,\n\t\tnewHeight: number,\n\t\toldWidth: number,\n\t\toldHeight: number\n\t): void {\n\t\tthis._primary.toBoundsDirty();\n\t\tthis._secondary.toBoundsDirty();\n\t\tsuper.onResize(newWidth, newHeight, oldWidth, oldHeight);\n\t}\n\n\tprotected addSeries(series: DChartSeriesContainer<CHART>, list?: DChartSeries<CHART>[]): void {\n\t\tif (list != null) {\n\t\t\tconst listLength = list.length;\n\t\t\tif (0 < listLength) {\n\t\t\t\tfor (let i = 0; i < listLength; ++i) {\n\t\t\t\t\tseries.add(list[i]);\n\t\t\t\t}\n\t\t\t\tseries.update();\n\t\t\t}\n\t\t}\n\t}\n\n\tprotected addAxes(axis: DChartAxisContainer<CHART>, list?: DChartAxis<CHART>[]): void {\n\t\tif (list != null) {\n\t\t\tfor (let i = 0, imax = list.length; i < imax; ++i) {\n\t\t\t\taxis.add(list[i]);\n\t\t\t}\n\t\t}\n\t}\n\n\tget primary(): DChartPlotAreaTwofoldSubPrimary<CHART> {\n\t\treturn this._primary;\n\t}\n\n\tget secondary(): DChartPlotAreaTwofoldSubSecondary<CHART> {\n\t\treturn this._secondary;\n\t}\n\n\toverride get container(): DChartPlotAreaContainer {\n\t\treturn this.secondary.container;\n\t}\n\n\tprotected onContainerChange(): void {\n\t\tthis._isViewDirty = true;\n\t\tthis._isContainerBoundsDirty = true;\n\t\tthis._primary.toBoundsDirty();\n\t\tthis._secondary.toBoundsDirty();\n\t\tDApplications.update(this);\n\t}\n\n\toverride get coordinate(): DChartCoordinateContainer<CHART> {\n\t\treturn this._coordinate;\n\t}\n\n\toverride get series(): DChartSeriesContainer<CHART> {\n\t\treturn this._series;\n\t}\n\n\toverride get axis(): DChartAxisContainer<CHART> {\n\t\treturn this._axis;\n\t}\n\n\toverride newView(options?: OPTIONS): DViewImpl {\n\t\tlet viewTarget: DChartPlotAreaTwofoldViewTarget<CHART> | undefined;\n\t\tconst toViewTarget = () => {\n\t\t\treturn (viewTarget ??= new DChartPlotAreaTwofoldViewTarget<CHART>(\n\t\t\t\tthis._primary.container,\n\t\t\t\tthis._secondary.container\n\t\t\t));\n\t\t};\n\t\treturn new DViewImpl(this, toViewTarget, options?.view);\n\t}\n\n\tprotected override onViewDirty(): void {\n\t\tthis._coordinate.fit();\n\t\tthis._axis.onRender();\n\t\tthis._series.onRender();\n\t}\n\n\toverride fit(\n\t\tduration?: number,\n\t\tdomainFrom?: number,\n\t\tdomainTo?: number,\n\t\trangeFrom?: number,\n\t\trangeTo?: number\n\t): this {\n\t\tif (duration != null && duration <= 0) {\n\t\t\tconst primary = this.primary;\n\t\t\tprimary.coordinate.fit(domainFrom, domainTo, rangeFrom, rangeTo);\n\t\t\tprimary.axis.update();\n\t\t\tprimary.series.update();\n\n\t\t\tconst secondary = this.secondary;\n\t\t\tsecondary.coordinate.fit(domainFrom, domainTo, rangeFrom, rangeTo);\n\t\t\tsecondary.axis.update();\n\t\t\tsecondary.series.update();\n\t\t} else {\n\t\t\tthis._blendDuration = duration != null ? duration : 200;\n\t\t\tthis._blendStartTime = Date.now();\n\t\t\tthis.primary.coordinate.mark(domainFrom, domainTo, rangeFrom, rangeTo);\n\t\t\tthis.secondary.coordinate.mark(domainFrom, domainTo, rangeFrom, rangeTo);\n\t\t\tconst blendTimeout = this._blendTimeout;\n\t\t\tif (blendTimeout != null) {\n\t\t\t\twindow.clearTimeout(blendTimeout);\n\t\t\t}\n\t\t\tthis._blendTimeout = window.setTimeout(this._onBlendBound, 0);\n\t\t}\n\t\treturn this;\n\t}\n\n\tprotected onBlend(): void {\n\t\tconst now = Date.now();\n\t\tlet ratio = (now - this._blendStartTime) / this._blendDuration;\n\t\tif (ratio < 1) {\n\t\t\tthis._blendTimeout = window.setTimeout(this._onBlendBound, 0);\n\t\t} else {\n\t\t\tthis._blendTimeout = null;\n\t\t\tratio = 1;\n\t\t}\n\n\t\tconst t = DAnimationTimings.ELASTIC(ratio);\n\t\tconst primary = this.primary;\n\t\tprimary.coordinate.blend(t);\n\t\tprimary.axis.update();\n\t\tprimary.series.update();\n\n\t\tconst secondary = this.secondary;\n\t\tsecondary.coordinate.blend(t);\n\t\tsecondary.axis.update();\n\t\tsecondary.series.update();\n\t}\n\n\toverride destroy(): void {\n\t\tthis._primary?.destroy();\n\t\tthis._secondary?.destroy();\n\t\tthis._axis.destroy();\n\t}\n}\n"]}
@@ -1,5 +1,5 @@
1
1
  /*
2
- Winter Cardinal UI v0.423.0
2
+ Winter Cardinal UI v0.425.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.423.0
2
+ Winter Cardinal UI v0.425.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.423.0
2
+ Winter Cardinal UI v0.425.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.423.0
2
+ Winter Cardinal UI v0.425.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.423.0
2
+ Winter Cardinal UI v0.425.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.423.0
2
+ Winter Cardinal UI v0.425.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.423.0
2
+ Winter Cardinal UI v0.425.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.423.0
2
+ Winter Cardinal UI v0.425.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.423.0
2
+ Winter Cardinal UI v0.425.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.423.0
2
+ Winter Cardinal UI v0.425.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.423.0
2
+ Winter Cardinal UI v0.425.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.423.0
2
+ Winter Cardinal UI v0.425.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.423.0
2
+ Winter Cardinal UI v0.425.0
3
3
  Copyright (C) 2019 Toshiba Corporation
4
4
  SPDX-License-Identifier: Apache-2.0
5
5
 
@@ -80498,11 +80498,17 @@ var DChartAxisGuideSimpleShapeImpl = /** @class */ (function () {
80498
80498
 
80499
80499
  var DChartAxisGuideSimple = /** @class */ (function () {
80500
80500
  function DChartAxisGuideSimple(options) {
80501
- var _a;
80501
+ var _a, _b;
80502
80502
  this._options = options;
80503
80503
  this._index = 0;
80504
- this._position = (_a = options === null || options === void 0 ? void 0 : options.position) !== null && _a !== void 0 ? _a : 0;
80505
- this._work = new pixi_js.Point();
80504
+ if (options != null) {
80505
+ this._position = (_a = options.position) !== null && _a !== void 0 ? _a : 0;
80506
+ this._fixed = (_b = options.fixed) !== null && _b !== void 0 ? _b : false;
80507
+ }
80508
+ else {
80509
+ this._position = 0;
80510
+ this._fixed = false;
80511
+ }
80506
80512
  this._isShown = true;
80507
80513
  }
80508
80514
  Object.defineProperty(DChartAxisGuideSimple.prototype, "shape", {
@@ -80571,42 +80577,63 @@ var DChartAxisGuideSimple = /** @class */ (function () {
80571
80577
  var plotAreaY = plotAreaBounds.y;
80572
80578
  var plotAreaWidth = plotAreaBounds.width;
80573
80579
  var plotAreaHeight = plotAreaBounds.height;
80574
- var transform = plotArea.container.transform.localTransform;
80575
80580
  var offset = axis.padding * index;
80576
80581
  switch (axis.position) {
80577
80582
  case DChartAxisPosition.TOP:
80578
80583
  case DChartAxisPosition.BOTTOM:
80579
- var coordinateX = plotArea.coordinate.x.get(axis.coordinate);
80580
- if (coordinateX) {
80581
- var work = this._work;
80582
- work.set(coordinateX.transform.map(coordinateX.map(this._position)), 0);
80583
- transform.apply(work, work);
80584
- var x = work.x;
80585
- shape.update(axis.position, x, plotAreaY + plotAreaHeight * 0.5, this._isShown && plotAreaX <= x && x <= plotAreaX + plotAreaWidth, plotAreaWidth, plotAreaHeight, offset);
80586
- }
80587
- else {
80588
- shape.update(axis.position, plotAreaX, plotAreaY + plotAreaHeight * 0.5, false, plotAreaWidth, plotAreaHeight, offset);
80589
- }
80584
+ var x = this.getPositionX(axis, plotArea, plotAreaX);
80585
+ shape.update(axis.position, x, plotAreaY + plotAreaHeight * 0.5, this._isShown && plotAreaX <= x && x <= plotAreaX + plotAreaWidth, plotAreaWidth, plotAreaHeight, offset);
80590
80586
  break;
80591
80587
  case DChartAxisPosition.LEFT:
80592
80588
  case DChartAxisPosition.RIGHT:
80593
- var coordinateY = plotArea.coordinate.y.get(axis.coordinate);
80594
- if (coordinateY) {
80595
- var work = this._work;
80596
- work.set(0, coordinateY.transform.map(coordinateY.map(this._position)));
80597
- transform.apply(work, work);
80598
- var y = work.y;
80599
- shape.update(axis.position, plotAreaX + plotAreaWidth * 0.5, y, this._isShown && plotAreaY <= y && y <= plotAreaY + plotAreaHeight, plotAreaWidth, plotAreaHeight, offset);
80600
- }
80601
- else {
80602
- shape.update(axis.position, plotAreaX + plotAreaWidth * 0.5, plotAreaY, false, plotAreaWidth, plotAreaHeight, offset);
80603
- }
80589
+ var y = this.getPositionY(axis, plotArea, plotAreaY);
80590
+ shape.update(axis.position, plotAreaX + plotAreaWidth * 0.5, y, this._isShown && plotAreaY <= y && y <= plotAreaY + plotAreaHeight, plotAreaWidth, plotAreaHeight, offset);
80604
80591
  break;
80605
80592
  }
80606
80593
  return true;
80607
80594
  }
80608
80595
  return false;
80609
80596
  };
80597
+ DChartAxisGuideSimple.prototype.getPositionX = function (axis, plotArea, plotAreaX) {
80598
+ var _a, _b;
80599
+ if (this._fixed) {
80600
+ var work = ((_a = DChartAxisGuideSimple.WORK_REGION) !== null && _a !== void 0 ? _a : (DChartAxisGuideSimple.WORK_REGION = new DChartRegionImpl(0, 0)));
80601
+ plotArea.getPixelDomain(work);
80602
+ return work.from + this._position * (work.to - work.from);
80603
+ }
80604
+ else {
80605
+ var coordinateX = plotArea.coordinate.x.get(axis.coordinate);
80606
+ if (coordinateX) {
80607
+ var work = ((_b = DChartAxisGuideSimple.WORK_POINT) !== null && _b !== void 0 ? _b : (DChartAxisGuideSimple.WORK_POINT = new pixi_js.Point()));
80608
+ work.set(coordinateX.transform.map(coordinateX.map(this._position)), 0);
80609
+ plotArea.container.transform.localTransform.apply(work, work);
80610
+ return work.x;
80611
+ }
80612
+ else {
80613
+ return plotAreaX - 100;
80614
+ }
80615
+ }
80616
+ };
80617
+ DChartAxisGuideSimple.prototype.getPositionY = function (axis, plotArea, plotAreaY) {
80618
+ var _a, _b;
80619
+ if (this._fixed) {
80620
+ var work = ((_a = DChartAxisGuideSimple.WORK_REGION) !== null && _a !== void 0 ? _a : (DChartAxisGuideSimple.WORK_REGION = new DChartRegionImpl(0, 0)));
80621
+ plotArea.getPixelRange(work);
80622
+ return work.to + (1 - this._position) * (work.from - work.to);
80623
+ }
80624
+ else {
80625
+ var coordinateY = plotArea.coordinate.y.get(axis.coordinate);
80626
+ if (coordinateY) {
80627
+ var work = ((_b = DChartAxisGuideSimple.WORK_POINT) !== null && _b !== void 0 ? _b : (DChartAxisGuideSimple.WORK_POINT = new pixi_js.Point()));
80628
+ work.set(0, coordinateY.transform.map(coordinateY.map(this._position)));
80629
+ plotArea.container.transform.localTransform.apply(work, work);
80630
+ return work.y;
80631
+ }
80632
+ else {
80633
+ return plotAreaY - 100;
80634
+ }
80635
+ }
80636
+ };
80610
80637
  DChartAxisGuideSimple.prototype.destroy = function () {
80611
80638
  var shape = this._shape;
80612
80639
  if (shape != null) {
@@ -83132,6 +83159,11 @@ var DChartPlotAreaTwofold = /** @class */ (function (_super) {
83132
83159
  }
83133
83160
  return _this;
83134
83161
  }
83162
+ DChartPlotAreaTwofold.prototype.onResize = function (newWidth, newHeight, oldWidth, oldHeight) {
83163
+ this._primary.toBoundsDirty();
83164
+ this._secondary.toBoundsDirty();
83165
+ _super.prototype.onResize.call(this, newWidth, newHeight, oldWidth, oldHeight);
83166
+ };
83135
83167
  DChartPlotAreaTwofold.prototype.addSeries = function (series, list) {
83136
83168
  if (list != null) {
83137
83169
  var listLength = list.length;