@wcardinal/wcardinal-ui 0.424.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
  }
@@ -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-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;AAMxF;IAUC,+BAAY,OAAsC;;QACjD,IAAI,CAAC,QAAQ,GAAG,OAAO,CAAC;QACxB,IAAI,CAAC,MAAM,GAAG,CAAC,CAAC;QAChB,IAAI,CAAC,SAAS,GAAG,MAAA,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,QAAQ,mCAAI,CAAC,CAAC;QACxC,IA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AAC,GAAG,IAAI,CAAC,CAAC,CAAC;wBACjB,KAAK,CAAC,MAAM,CACX,IAAI,CAAC,QAAQ,EACb,SAAS,GAAG,aAAa,GAAG,GAAG,EAC/B,CAAC,EACD,IAAI,CAAC,QAAQ,IAAI,SAAS,IAAI,CAAC,IAAI,CAAC,IAAI,SAAS,GAAG,cAAc,EAClE,aAAa,EACb,cAAc,EACd,MAAM,CACN,CAAC;qBACF;yBAAM;wBACN,KAAK,CAAC,MAAM,CACX,IAAI,CAAC,QAAQ,EACb,SAAS,GAAG,aAAa,GAAG,GAAG,EAC/B,SAAS,EACT,KAAK,EACL,aAAa,EACb,cAAc,EACd,MAAM,CACN,CAAC;qBACF;oBACD,MAAM;aACP;YACD,OAAO,IAAI,CAAC;SACZ;QACD,OAAO,KAAK,CAAC;IACd,CAAC;IAED,uCAAO,GAAP;QACC,IAAM,KAAK,GAAG,IAAI,CAAC,MAAM,CAAC;QAC1B,IAAI,KAAK,IAAI,IAAI,EAAE;YAClB,KAAK,CAAC,OAAO,EAAE,CAAC;SAChB;QACD,IAAI,CAAC,MAAM,GAAG,CAAC,CAAC;QAChB,IAAI,CAAC,UAAU,GAAG,SAAS,CAAC;IAC7B,CAAC;IACF,4BAAC;AAAD,CAAC,AAjKD,IAiKC","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\";\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,EA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CAAC;SAC9D;aAAM;YACN,IAAM,WAAW,GAAG,QAAQ,CAAC,UAAU,CAAC,CAAC,CAAC,GAAG,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC;YAC/D,IAAI,WAAW,EAAE;gBAChB,IAAM,IAAI,GAAG,OAAC,qBAAqB,CAAC,UAAU,oCAAhC,qBAAqB,CAAC,UAAU,GAAK,IAAI,KAAK,EAAE,EAAC,CAAC;gBAChE,IAAI,CAAC,GAAG,CAAC,CAAC,EAAE,WAAW,CAAC,SAAS,CAAC,GAAG,CAAC,WAAW,CAAC,GAAG,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC;gBACxE,QAAQ,CAAC,SAAS,CAAC,SAAS,CAAC,cAAc,CAAC,KAAK,CAAC,IAAI,EAAE,IAAI,CAAC,CAAC;gBAC9D,OAAO,IAAI,CAAC,CAAC,CAAC;aACd;iBAAM;gBACN,OAAO,SAAS,GAAG,GAAG,CAAC;aACvB;SACD;IACF,CAAC;IAED,uCAAO,GAAP;QACC,IAAM,KAAK,GAAG,IAAI,CAAC,MAAM,CAAC;QAC1B,IAAI,KAAK,IAAI,IAAI,EAAE;YAClB,KAAK,CAAC,OAAO,EAAE,CAAC;SAChB;QACD,IAAI,CAAC,MAAM,GAAG,CAAC,CAAC;QAChB,IAAI,CAAC,UAAU,GAAG,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,5 +1,5 @@
1
1
  /*
2
- Winter Cardinal UI v0.424.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.424.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.424.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.424.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.424.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.424.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.424.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.424.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.424.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.424.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.424.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.424.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.424.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) {
@@ -1,5 +1,5 @@
1
1
  /*
2
- Winter Cardinal UI v0.424.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
 
@@ -59337,11 +59337,17 @@
59337
59337
 
59338
59338
  var DChartAxisGuideSimple = /** @class */ (function () {
59339
59339
  function DChartAxisGuideSimple(options) {
59340
- var _a;
59340
+ var _a, _b;
59341
59341
  this._options = options;
59342
59342
  this._index = 0;
59343
- this._position = (_a = options === null || options === void 0 ? void 0 : options.position) !== null && _a !== void 0 ? _a : 0;
59344
- this._work = new pixi_js.Point();
59343
+ if (options != null) {
59344
+ this._position = (_a = options.position) !== null && _a !== void 0 ? _a : 0;
59345
+ this._fixed = (_b = options.fixed) !== null && _b !== void 0 ? _b : false;
59346
+ }
59347
+ else {
59348
+ this._position = 0;
59349
+ this._fixed = false;
59350
+ }
59345
59351
  this._isShown = true;
59346
59352
  }
59347
59353
  Object.defineProperty(DChartAxisGuideSimple.prototype, "shape", {
@@ -59410,42 +59416,63 @@
59410
59416
  var plotAreaY = plotAreaBounds.y;
59411
59417
  var plotAreaWidth = plotAreaBounds.width;
59412
59418
  var plotAreaHeight = plotAreaBounds.height;
59413
- var transform = plotArea.container.transform.localTransform;
59414
59419
  var offset = axis.padding * index;
59415
59420
  switch (axis.position) {
59416
59421
  case DChartAxisPosition.TOP:
59417
59422
  case DChartAxisPosition.BOTTOM:
59418
- var coordinateX = plotArea.coordinate.x.get(axis.coordinate);
59419
- if (coordinateX) {
59420
- var work = this._work;
59421
- work.set(coordinateX.transform.map(coordinateX.map(this._position)), 0);
59422
- transform.apply(work, work);
59423
- var x = work.x;
59424
- shape.update(axis.position, x, plotAreaY + plotAreaHeight * 0.5, this._isShown && plotAreaX <= x && x <= plotAreaX + plotAreaWidth, plotAreaWidth, plotAreaHeight, offset);
59425
- }
59426
- else {
59427
- shape.update(axis.position, plotAreaX, plotAreaY + plotAreaHeight * 0.5, false, plotAreaWidth, plotAreaHeight, offset);
59428
- }
59423
+ var x = this.getPositionX(axis, plotArea, plotAreaX);
59424
+ shape.update(axis.position, x, plotAreaY + plotAreaHeight * 0.5, this._isShown && plotAreaX <= x && x <= plotAreaX + plotAreaWidth, plotAreaWidth, plotAreaHeight, offset);
59429
59425
  break;
59430
59426
  case DChartAxisPosition.LEFT:
59431
59427
  case DChartAxisPosition.RIGHT:
59432
- var coordinateY = plotArea.coordinate.y.get(axis.coordinate);
59433
- if (coordinateY) {
59434
- var work = this._work;
59435
- work.set(0, coordinateY.transform.map(coordinateY.map(this._position)));
59436
- transform.apply(work, work);
59437
- var y = work.y;
59438
- shape.update(axis.position, plotAreaX + plotAreaWidth * 0.5, y, this._isShown && plotAreaY <= y && y <= plotAreaY + plotAreaHeight, plotAreaWidth, plotAreaHeight, offset);
59439
- }
59440
- else {
59441
- shape.update(axis.position, plotAreaX + plotAreaWidth * 0.5, plotAreaY, false, plotAreaWidth, plotAreaHeight, offset);
59442
- }
59428
+ var y = this.getPositionY(axis, plotArea, plotAreaY);
59429
+ shape.update(axis.position, plotAreaX + plotAreaWidth * 0.5, y, this._isShown && plotAreaY <= y && y <= plotAreaY + plotAreaHeight, plotAreaWidth, plotAreaHeight, offset);
59443
59430
  break;
59444
59431
  }
59445
59432
  return true;
59446
59433
  }
59447
59434
  return false;
59448
59435
  };
59436
+ DChartAxisGuideSimple.prototype.getPositionX = function (axis, plotArea, plotAreaX) {
59437
+ var _a, _b;
59438
+ if (this._fixed) {
59439
+ var work = ((_a = DChartAxisGuideSimple.WORK_REGION) !== null && _a !== void 0 ? _a : (DChartAxisGuideSimple.WORK_REGION = new DChartRegionImpl(0, 0)));
59440
+ plotArea.getPixelDomain(work);
59441
+ return work.from + this._position * (work.to - work.from);
59442
+ }
59443
+ else {
59444
+ var coordinateX = plotArea.coordinate.x.get(axis.coordinate);
59445
+ if (coordinateX) {
59446
+ var work = ((_b = DChartAxisGuideSimple.WORK_POINT) !== null && _b !== void 0 ? _b : (DChartAxisGuideSimple.WORK_POINT = new pixi_js.Point()));
59447
+ work.set(coordinateX.transform.map(coordinateX.map(this._position)), 0);
59448
+ plotArea.container.transform.localTransform.apply(work, work);
59449
+ return work.x;
59450
+ }
59451
+ else {
59452
+ return plotAreaX - 100;
59453
+ }
59454
+ }
59455
+ };
59456
+ DChartAxisGuideSimple.prototype.getPositionY = function (axis, plotArea, plotAreaY) {
59457
+ var _a, _b;
59458
+ if (this._fixed) {
59459
+ var work = ((_a = DChartAxisGuideSimple.WORK_REGION) !== null && _a !== void 0 ? _a : (DChartAxisGuideSimple.WORK_REGION = new DChartRegionImpl(0, 0)));
59460
+ plotArea.getPixelRange(work);
59461
+ return work.to + (1 - this._position) * (work.from - work.to);
59462
+ }
59463
+ else {
59464
+ var coordinateY = plotArea.coordinate.y.get(axis.coordinate);
59465
+ if (coordinateY) {
59466
+ var work = ((_b = DChartAxisGuideSimple.WORK_POINT) !== null && _b !== void 0 ? _b : (DChartAxisGuideSimple.WORK_POINT = new pixi_js.Point()));
59467
+ work.set(0, coordinateY.transform.map(coordinateY.map(this._position)));
59468
+ plotArea.container.transform.localTransform.apply(work, work);
59469
+ return work.y;
59470
+ }
59471
+ else {
59472
+ return plotAreaY - 100;
59473
+ }
59474
+ }
59475
+ };
59449
59476
  DChartAxisGuideSimple.prototype.destroy = function () {
59450
59477
  var shape = this._shape;
59451
59478
  if (shape != null) {