@amcharts/amcharts5 5.2.31 → 5.2.32
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.internal/charts/map/MapChart.d.ts.map +1 -1
- package/.internal/charts/map/MapChart.js +4 -0
- package/.internal/charts/map/MapChart.js.map +1 -1
- package/.internal/charts/map/MapLine.d.ts.map +1 -1
- package/.internal/charts/map/MapLine.js +6 -5
- package/.internal/charts/map/MapLine.js.map +1 -1
- package/.internal/charts/map/MapLineSeries.d.ts +15 -0
- package/.internal/charts/map/MapLineSeries.d.ts.map +1 -1
- package/.internal/charts/map/MapLineSeries.js +10 -0
- package/.internal/charts/map/MapLineSeries.js.map +1 -1
- package/.internal/charts/stock/StockChart.d.ts +9 -1
- package/.internal/charts/stock/StockChart.d.ts.map +1 -1
- package/.internal/charts/stock/StockChart.js +9 -1
- package/.internal/charts/stock/StockChart.js.map +1 -1
- package/.internal/charts/stock/toolbar/PeriodSelector.d.ts +1 -0
- package/.internal/charts/stock/toolbar/PeriodSelector.d.ts.map +1 -1
- package/.internal/charts/stock/toolbar/PeriodSelector.js +21 -0
- package/.internal/charts/stock/toolbar/PeriodSelector.js.map +1 -1
- package/.internal/charts/xy/axes/Axis.d.ts +2 -0
- package/.internal/charts/xy/axes/Axis.d.ts.map +1 -1
- package/.internal/charts/xy/axes/Axis.js +17 -0
- package/.internal/charts/xy/axes/Axis.js.map +1 -1
- package/.internal/charts/xy/axes/AxisRendererX.js +2 -2
- package/.internal/charts/xy/axes/AxisRendererX.js.map +1 -1
- package/.internal/charts/xy/axes/AxisRendererY.d.ts.map +1 -1
- package/.internal/charts/xy/axes/AxisRendererY.js +2 -3
- package/.internal/charts/xy/axes/AxisRendererY.js.map +1 -1
- package/.internal/core/Registry.d.ts +4 -0
- package/.internal/core/Registry.d.ts.map +1 -1
- package/.internal/core/Registry.js +9 -0
- package/.internal/core/Registry.js.map +1 -1
- package/.internal/core/render/Container.js +3 -3
- package/.internal/core/render/Container.js.map +1 -1
- package/.internal/core/render/Graphics.d.ts +5 -0
- package/.internal/core/render/Graphics.d.ts.map +1 -1
- package/.internal/core/render/Graphics.js +4 -1
- package/.internal/core/render/Graphics.js.map +1 -1
- package/.internal/core/render/PointedRectangle.d.ts.map +1 -1
- package/.internal/core/render/PointedRectangle.js +1 -0
- package/.internal/core/render/PointedRectangle.js.map +1 -1
- package/.internal/core/render/RoundedRectangle.d.ts.map +1 -1
- package/.internal/core/render/RoundedRectangle.js +11 -9
- package/.internal/core/render/RoundedRectangle.js.map +1 -1
- package/.internal/core/render/Star.d.ts.map +1 -1
- package/.internal/core/render/Star.js +1 -0
- package/.internal/core/render/Star.js.map +1 -1
- package/.internal/core/render/Text.d.ts +6 -0
- package/.internal/core/render/Text.d.ts.map +1 -1
- package/.internal/core/render/Text.js +39 -0
- package/.internal/core/render/Text.js.map +1 -1
- package/.internal/core/render/Triangle.d.ts.map +1 -1
- package/.internal/core/render/Triangle.js +1 -0
- package/.internal/core/render/Triangle.js.map +1 -1
- package/.internal/core/render/backend/CanvasRenderer.d.ts.map +1 -1
- package/.internal/core/render/backend/CanvasRenderer.js +94 -56
- package/.internal/core/render/backend/CanvasRenderer.js.map +1 -1
- package/.internal/core/util/List.d.ts.map +1 -1
- package/.internal/core/util/List.js.map +1 -1
- package/.internal/themes/DefaultTheme.js +1 -1
- package/.internal/themes/DefaultTheme.js.map +1 -1
- package/CHANGELOG.md +13 -0
- package/examples/javascript/flow-chord/package.json +1 -1
- package/examples/javascript/flow-chord-directed/package.json +1 -1
- package/examples/javascript/flow-chord-non-ribbon/package.json +1 -1
- package/examples/javascript/flow-sankey/package.json +1 -1
- package/examples/javascript/gauge/package.json +1 -1
- package/examples/javascript/gauge-bands/package.json +1 -1
- package/examples/javascript/hierarchy-force-directed/package.json +1 -1
- package/examples/javascript/hierarchy-pack/package.json +1 -1
- package/examples/javascript/hierarchy-partition/package.json +1 -1
- package/examples/javascript/hierarchy-sunburst/package.json +1 -1
- package/examples/javascript/hierarchy-tree/package.json +1 -1
- package/examples/javascript/hierarchy-treemap/package.json +1 -1
- package/examples/javascript/jest/package.json +1 -1
- package/examples/javascript/json/package.json +1 -1
- package/examples/javascript/map-animating-along-lines/package.json +1 -1
- package/examples/javascript/map-day-and-night/package.json +1 -1
- package/examples/javascript/map-globe-rotate-to-country/package.json +1 -1
- package/examples/javascript/map-globe-with-projected-circles/package.json +1 -1
- package/examples/javascript/map-with-bubbles/package.json +1 -1
- package/examples/javascript/map-zoom-to-country/package.json +1 -1
- package/examples/javascript/misc-40-charts/package.json +1 -1
- package/examples/javascript/misc-microchart-grid/package.json +1 -1
- package/examples/javascript/pie-chart/package.json +1 -1
- package/examples/javascript/pie-donut-chart/package.json +1 -1
- package/examples/javascript/pie-variable-radius/package.json +1 -1
- package/examples/javascript/radar-column-iwatch-style/package.json +1 -1
- package/examples/javascript/radar-heat-map/package.json +1 -1
- package/examples/javascript/radar-line/package.json +1 -1
- package/examples/javascript/radar-time-line/package.json +1 -1
- package/examples/javascript/sliced-funnel/package.json +1 -1
- package/examples/javascript/sliced-pictorial-stacked/package.json +1 -1
- package/examples/javascript/sliced-pyramid/package.json +1 -1
- package/examples/javascript/stock-chart/package.json +1 -1
- package/examples/javascript/stock-chart-comparing-stocks/package.json +1 -1
- package/examples/javascript/stock-chart-data-granularity/package.json +1 -1
- package/examples/javascript/stock-chart-data-grouping/package.json +1 -1
- package/examples/javascript/stock-chart-intraday/package.json +1 -1
- package/examples/javascript/stock-chart-live/package.json +1 -1
- package/examples/javascript/stock-chart-volume-separate-panel/package.json +1 -1
- package/examples/javascript/venn-diagram/package.json +1 -1
- package/examples/javascript/wordcloud-with-data/package.json +1 -1
- package/examples/javascript/wordcloud-with-text/package.json +1 -1
- package/examples/javascript/xy-100-percent-stacked-column/package.json +1 -1
- package/examples/javascript/xy-animated-bullet-at-the-end-of-the-series/package.json +1 -1
- package/examples/javascript/xy-bubble/package.json +1 -1
- package/examples/javascript/xy-candlestick/package.json +1 -1
- package/examples/javascript/xy-clustered-column/package.json +1 -1
- package/examples/javascript/xy-column/package.json +1 -1
- package/examples/javascript/xy-comparing-series-google-analytics-style/package.json +1 -1
- package/examples/javascript/xy-data-grouping/package.json +1 -1
- package/examples/javascript/xy-draggable-range/package.json +1 -1
- package/examples/javascript/xy-drawing-series-with-mouse-or-touch/package.json +1 -1
- package/examples/javascript/xy-dumbbell plot/package.json +1 -1
- package/examples/javascript/xy-evenly-spaced-date-axis/package.json +1 -1
- package/examples/javascript/xy-line/package.json +1 -1
- package/examples/javascript/xy-line-highlight-on-legend-hover/package.json +1 -1
- package/examples/javascript/xy-live-data/package.json +1 -1
- package/examples/javascript/xy-multiple-synced-value-axes/package.json +1 -1
- package/examples/javascript/xy-ohlc/package.json +1 -1
- package/examples/javascript/xy-real-time-data-sorting/package.json +1 -1
- package/examples/javascript/xy-smoothed-line/package.json +1 -1
- package/examples/javascript/xy-stacked-and-clustered-column/package.json +1 -1
- package/examples/javascript/xy-stacked-column/package.json +1 -1
- package/examples/javascript/xy-stacked-step/package.json +1 -1
- package/examples/javascript/xy-stock/package.json +1 -1
- package/examples/javascript/xy-stock-comparing/package.json +1 -1
- package/examples/typescript/flow-chord/package.json +1 -1
- package/examples/typescript/flow-chord-directed/package.json +1 -1
- package/examples/typescript/flow-chord-non-ribbon/package.json +1 -1
- package/examples/typescript/flow-sankey/package.json +1 -1
- package/examples/typescript/gauge/package.json +1 -1
- package/examples/typescript/gauge-bands/package.json +1 -1
- package/examples/typescript/hierarchy-force-directed/package.json +1 -1
- package/examples/typescript/hierarchy-pack/package.json +1 -1
- package/examples/typescript/hierarchy-partition/package.json +1 -1
- package/examples/typescript/hierarchy-sunburst/package.json +1 -1
- package/examples/typescript/hierarchy-tree/package.json +1 -1
- package/examples/typescript/hierarchy-treemap/package.json +1 -1
- package/examples/typescript/jest/package.json +1 -1
- package/examples/typescript/json/package.json +1 -1
- package/examples/typescript/map-animating-along-lines/package.json +1 -1
- package/examples/typescript/map-day-and-night/package.json +1 -1
- package/examples/typescript/map-globe-rotate-to-country/package.json +1 -1
- package/examples/typescript/map-globe-with-projected-circles/package.json +1 -1
- package/examples/typescript/map-with-bubbles/package.json +1 -1
- package/examples/typescript/map-zoom-to-country/package.json +1 -1
- package/examples/typescript/misc-40-charts/package.json +1 -1
- package/examples/typescript/misc-microchart-grid/package.json +1 -1
- package/examples/typescript/pie-chart/package.json +1 -1
- package/examples/typescript/pie-donut-chart/package.json +1 -1
- package/examples/typescript/pie-variable-radius/package.json +1 -1
- package/examples/typescript/radar-column-iwatch-style/package.json +1 -1
- package/examples/typescript/radar-heat-map/package.json +1 -1
- package/examples/typescript/radar-line/package.json +1 -1
- package/examples/typescript/radar-time-line/package.json +1 -1
- package/examples/typescript/sliced-funnel/package.json +1 -1
- package/examples/typescript/sliced-pictorial-stacked/package.json +1 -1
- package/examples/typescript/sliced-pyramid/package.json +1 -1
- package/examples/typescript/stock-chart/package.json +1 -1
- package/examples/typescript/stock-chart-comparing-stocks/package.json +1 -1
- package/examples/typescript/stock-chart-data-granularity/package.json +1 -1
- package/examples/typescript/stock-chart-data-grouping/package.json +1 -1
- package/examples/typescript/stock-chart-intraday/package.json +1 -1
- package/examples/typescript/stock-chart-live/package.json +1 -1
- package/examples/typescript/stock-chart-volume-separate-panel/package.json +1 -1
- package/examples/typescript/venn-diagram/package.json +1 -1
- package/examples/typescript/wordcloud-with-data/package.json +1 -1
- package/examples/typescript/wordcloud-with-text/package.json +1 -1
- package/examples/typescript/xy-100-percent-stacked-column/package.json +1 -1
- package/examples/typescript/xy-animated-bullet-at-the-end-of-the-series/package.json +1 -1
- package/examples/typescript/xy-bubble/package.json +1 -1
- package/examples/typescript/xy-candlestick/package.json +1 -1
- package/examples/typescript/xy-clustered-column/package.json +1 -1
- package/examples/typescript/xy-column/package.json +1 -1
- package/examples/typescript/xy-comparing-series-google-analytics-style/package.json +1 -1
- package/examples/typescript/xy-data-grouping/package.json +1 -1
- package/examples/typescript/xy-draggable-range/package.json +1 -1
- package/examples/typescript/xy-drawing-series-with-mouse-or-touch/package.json +1 -1
- package/examples/typescript/xy-dumbbell plot/package.json +1 -1
- package/examples/typescript/xy-evenly-spaced-date-axis/package.json +1 -1
- package/examples/typescript/xy-line/package.json +1 -1
- package/examples/typescript/xy-line-highlight-on-legend-hover/package.json +1 -1
- package/examples/typescript/xy-live-data/package.json +1 -1
- package/examples/typescript/xy-multiple-synced-value-axes/package.json +1 -1
- package/examples/typescript/xy-ohlc/package.json +1 -1
- package/examples/typescript/xy-real-time-data-sorting/package.json +1 -1
- package/examples/typescript/xy-smoothed-line/package.json +1 -1
- package/examples/typescript/xy-stacked-and-clustered-column/package.json +1 -1
- package/examples/typescript/xy-stacked-column/package.json +1 -1
- package/examples/typescript/xy-stacked-step/package.json +1 -1
- package/examples/typescript/xy-stock/package.json +1 -1
- package/examples/typescript/xy-stock-comparing/package.json +1 -1
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Registry.d.ts","sourceRoot":"","sources":["../../../../src/.internal/core/Registry.ts"],"names":[],"mappings":"AACA;;GAEG;AACH,qBAAa,QAAQ;
|
|
1
|
+
{"version":3,"file":"Registry.d.ts","sourceRoot":"","sources":["../../../../src/.internal/core/Registry.ts"],"names":[],"mappings":"AACA;;GAEG;AACH,qBAAa,QAAQ;IACpB;;OAEG;IACH,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAY;IAEpC;;;OAGG;IACH,QAAQ,EAAE,MAAM,EAAE,CAAM;IAExB;;OAEG;IACH,YAAY,EAAE;QAAE,CAAC,KAAK,EAAE,MAAM,GAAG,GAAG,CAAA;KAAE,CAAM;IAE5C;;OAEG;IACH,YAAY,EAAE,GAAG,EAAE,CAAM;CAEzB;AAED;;GAEG;AACH,eAAO,MAAM,QAAQ,UAAiB,CAAC;AAEvC;;;;;;;;;;;;;GAaG;AACH,wBAAgB,UAAU,CAAC,OAAO,EAAE,MAAM,GAAG,IAAI,CAEhD;AAGD;;GAEG;AACH,wBAAgB,sBAAsB,IAAI,IAAI,CAK7C"}
|
|
@@ -3,6 +3,15 @@
|
|
|
3
3
|
*/
|
|
4
4
|
var Registry = /** @class */ (function () {
|
|
5
5
|
function Registry() {
|
|
6
|
+
/**
|
|
7
|
+
* Currently running version of amCharts.
|
|
8
|
+
*/
|
|
9
|
+
Object.defineProperty(this, "version", {
|
|
10
|
+
enumerable: true,
|
|
11
|
+
configurable: true,
|
|
12
|
+
writable: true,
|
|
13
|
+
value: "5.2.32"
|
|
14
|
+
});
|
|
6
15
|
/**
|
|
7
16
|
* List of applied licenses.
|
|
8
17
|
* @ignore
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Registry.js","sourceRoot":"","sources":["../../../../src/.internal/core/Registry.ts"],"names":[],"mappings":"AACA;;GAEG;AACH;IAAA;
|
|
1
|
+
{"version":3,"file":"Registry.js","sourceRoot":"","sources":["../../../../src/.internal/core/Registry.ts"],"names":[],"mappings":"AACA;;GAEG;AACH;IAAA;QACC;;WAEG;QACH;;;;mBAA2B,QAAQ;WAAC;QAEpC;;;WAGG;QACH;;;;mBAAqB,EAAE;WAAC;QAExB;;WAEG;QACH;;;;mBAAyC,EAAE;WAAC;QAE5C;;WAEG;QACH;;;;mBAAsB,EAAE;WAAC;IAE1B,CAAC;IAAD,eAAC;AAAD,CAAC,AAtBD,IAsBC;;AAED;;GAEG;AACH,MAAM,CAAC,IAAM,QAAQ,GAAG,IAAI,QAAQ,EAAE,CAAC;AAEvC;;;;;;;;;;;;;GAaG;AACH,MAAM,UAAU,UAAU,CAAC,OAAe;IACzC,QAAQ,CAAC,QAAQ,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;AACjC,CAAC;AAGD;;GAEG;AACH,MAAM,UAAU,sBAAsB;IACrC,IAAI,IAAI,CAAC;IACT,OAAM,IAAI,GAAG,QAAQ,CAAC,YAAY,CAAC,GAAG,EAAE,EAAE;QACzC,IAAI,CAAC,OAAO,EAAE,CAAC;KACf;AACF,CAAC","sourcesContent":["\r\n/**\r\n * @ignore\r\n */\r\nexport class Registry {\r\n\t/**\r\n\t * Currently running version of amCharts.\r\n\t */\r\n\treadonly version: string = \"5.2.32\";\r\n\r\n\t/**\r\n\t * List of applied licenses.\r\n\t * @ignore\r\n\t */\r\n\tlicenses: String[] = [];\r\n\r\n\t/**\r\n\t * Entities that have their `id` setting set.\r\n\t */\r\n\tentitiesById: { [index: string]: any } = {};\r\n\r\n\t/**\r\n\t * All created [[Root]] elements.\r\n\t */\r\n\trootElements: any[] = [];\r\n\r\n}\r\n\r\n/**\r\n\t* @ignore\r\n */\r\nexport const registry = new Registry();\r\n\r\n/**\r\n * Adds a license, e.g.:\r\n *\r\n * ```TypeScript\r\n * am5.addLicense(\"xxxxxxxx\");\r\n * ```\r\n * ```JavaScript\r\n * am5.addLicense(\"xxxxxxxx\");\r\n * ```\r\n *\r\n * Multiple licenses can be added to cover for multiple products.\r\n *\r\n * @param license License key\r\n */\r\nexport function addLicense(license: string): void {\r\n\tregistry.licenses.push(license);\r\n}\r\n\r\n\r\n/**\r\n * Disposes all [[Root]] elements.\r\n */\r\nexport function disposeAllRootElements(): void {\r\n\tlet root;\r\n\twhile(root = registry.rootElements.pop()) {\r\n\t\troot.dispose();\r\n\t}\r\n}\r\n"]}
|
|
@@ -155,8 +155,8 @@ var Container = /** @class */ (function (_super) {
|
|
|
155
155
|
if (this.get("maskContent")) {
|
|
156
156
|
if (!contentMask) {
|
|
157
157
|
contentMask = Rectangle.new(this._root, {
|
|
158
|
-
width: this.width(),
|
|
159
|
-
height: this.height()
|
|
158
|
+
width: this.width() + .5,
|
|
159
|
+
height: this.height() + .5
|
|
160
160
|
});
|
|
161
161
|
this._contentMask = contentMask;
|
|
162
162
|
childrenDisplay.addChildAt(contentMask._display, 0);
|
|
@@ -224,7 +224,7 @@ var Container = /** @class */ (function (_super) {
|
|
|
224
224
|
}
|
|
225
225
|
var contentMask = this._contentMask;
|
|
226
226
|
if (contentMask) {
|
|
227
|
-
contentMask.setAll({ width: width, height: height });
|
|
227
|
+
contentMask.setAll({ width: width + .5, height: height + .5 });
|
|
228
228
|
}
|
|
229
229
|
var verticalScrollbar = this.get("verticalScrollbar");
|
|
230
230
|
if (verticalScrollbar) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Container.js","sourceRoot":"","sources":["../../../../../src/.internal/core/render/Container.ts"],"names":[],"mappings":";AAOA,OAAO,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAC5C,OAAO,EAAE,OAAO,EAAE,MAAM,iBAAiB,CAAC;AAC1C,OAAO,EAAE,MAAM,EAAkD,MAAM,UAAU,CAAC;AAClF,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AACxC,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AACtD,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAClD,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC1C,OAAO,EAAE,cAAc,EAAE,MAAM,wBAAwB,CAAC;AAGxD,OAAO,KAAK,MAAM,MAAM,eAAe,CAAC;AACxC,OAAO,KAAK,KAAK,MAAM,cAAc,CAAC;AACtC,OAAO,KAAK,MAAM,MAAM,eAAe,CAAC;AAyGxC;;;;;;;;;GASG;AACH;IAA+B,6BAAM;IAArC;QAAA,qEAkmBC;QA5lBA;;;;mBAA8B,KAAI,CAAC,KAAK,CAAC,SAAS,CAAC,aAAa,EAAE;WAAC;QAEnE;;;;mBAAsC,KAAI,CAAC,KAAK,CAAC,SAAS,CAAC,aAAa,EAAE;WAAC;QAE3E;;WAEG;QACH;;;;mBAAoC,IAAI,QAAQ,CAAC,KAAI,CAAC;WAAC;QAEvD;;;;mBAAgD,EAAE;WAAC;QACnD;;;;mBAAoD,EAAE;WAAC;QAKvD;;;;mBAA4B,CAAC;WAAC;QAC9B;;;;mBAA6B,CAAC;WAAC;QAE/B;;;;mBAAkC,CAAC;WAAC;QAC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OAAO,GAAG,CAAC,QAAQ,KAAK,IAAI,CAAC,SAAS,CAAC,CAAC;YAC9C,iBAAM,YAAY,YAAC,QAAQ,CAAC,CAAC;YAC7B,IAAM,IAAI,GAAG,IAAI,CAAC,GAAG,CAAC,MAAM,EAAE,EAAE,CAAC,CAAC;YAClC,IAAI,IAAI,IAAI,IAAI,KAAK,EAAE,IAAI,OAAO,EAAE;gBACnC,IAAI,CAAC,KAAK,CAAC,eAAe,CAAC,IAAI,EAAE,cAAc,CAAC,IAAI,EAAE,IAAI,CAAC,CAAC,CAAC;aAC7D;QACF,CAAC;;IA/kBD;;;;eAAkC,WAAW;OAAC;IAC9C;;;;eAA0C,MAAM,CAAC,UAAU,CAAC,MAAM,CAAC,CAAC,SAAS,CAAC,SAAS,CAAC,CAAC;OAAC;IA+kB3F,gBAAC;CAAA,AAlmBD,CAA+B,MAAM,GAkmBpC;SAlmBY,SAAS","sourcesContent":["import type { Graphics } from \"./Graphics\";\nimport type { Layout } from \"./Layout\";\nimport type { IContainer } from \"./backend/Renderer\";\nimport type { IBounds } from \"../util/IBounds\";\nimport type { Scrollbar } from \"./Scrollbar\";\nimport type { DataItem, IComponentDataItem } from \"./Component\";\n\nimport { Children } from \"../util/Children\";\nimport { Percent } from \"../util/Percent\";\nimport { Sprite, ISpriteSettings, ISpritePrivate, ISpriteEvents } from \"./Sprite\";\nimport { Rectangle } from \"./Rectangle\";\nimport { HorizontalLayout } from \"./HorizontalLayout\";\nimport { VerticalLayout } from \"./VerticalLayout\";\nimport { GridLayout } from \"./GridLayout\";\nimport { populateString } from \"../util/PopulateString\";\nimport type { IDisposer } from \"../util/Disposer\";\n\nimport * as $array from \"../util/Array\";\nimport * as $type from \"../util/Type\";\nimport * as $utils from \"../util/Utils\";\n\nexport interface IContainerSettings extends ISpriteSettings {\n\n\t/**\n\t * Left padding in pixels.\n\t */\n\tpaddingLeft?: number;\n\n\t/**\n\t * Right padding in pixels.\n\t */\n\tpaddingRight?: number;\n\n\t/**\n\t * Top padding in pixels.\n\t */\n\tpaddingTop?: number;\n\n\t/**\n\t * Bottom padding in pixels.\n\t */\n\tpaddingBottom?: number;\n\n\t/**\n\t * Background element.\n\t *\n\t * @see {@link https://www.amcharts.com/docs/v5/concepts/containers/#Background} for more info\n\t */\n\tbackground?: Graphics;\n\n\t/**\n\t * A method to layout\n\t *\n\t * @see {@link https://www.amcharts.com/docs/v5/concepts/containers/#Layout} for more info\n\t */\n\tlayout?: Layout | null;\n\n\t/**\n\t * An element to use as a container's mask (clipping region).\n\t *\n\t * @see {@link https://www.amcharts.com/docs/v5/concepts/containers/#Masks} for more info\n\t */\n\tmask?: Graphics | null;\n\n\t/**\n\t * If set to `true` all content going outside the bounds of the container\n\t * will be clipped.\n\t */\n\tmaskContent?: boolean;\n\n\t/**\n\t * If set to `true` all descendants - not just direct children, but every\n\t * element in it - will become \"interactive\".\n\t */\n\tinteractiveChildren?: boolean;\n\n\t/**\n\t * If set to `true`, applying a state on a container will also apply the same\n\t * state on its children.\n\t *\n\t * @see {@link https://www.amcharts.com/docs/v5/concepts/containers/#States} for more info\n\t */\n\tsetStateOnChildren?: boolean;\n\n\t/**\n\t * Setting this to an instance of [[Scrollbar]] will enable vertical\n\t * scrolling of content if it does not fit into the Container.\n\t * \n\t * @see {@link https://www.amcharts.com/docs/v5/concepts/containers/#Scrollbar} for more info\n\t */\n\tverticalScrollbar?: Scrollbar;\n\n\t/**\n\t * If set to `true` its children will be laid out in opposite order.\n\t *\n\t * @since 5.1.1\n\t */\n\treverseChildren?: boolean;\n\n\t/**\n\t * HTML content of the container.\n\t *\n\t * @see {@link https://www.amcharts.com/docs/v5/concepts/common-elements/html-content/} for more info\n\t * @since 5.2.11\n\t */\n\thtml?: string;\n\n}\n\nexport interface IContainerEvents extends ISpriteEvents {\n}\n\nexport interface IContainerPrivate extends ISpritePrivate {\n\n\t/**\n\t * A `<div>` element used for HTML content of the `Container`.\n\t */\n\thtmlElement?: HTMLDivElement;\n\n}\n\nexport interface IContainerEvents extends ISpriteEvents {\n}\n\n/**\n * A basic element that can have child elements, maintain their layout, and\n * have a background.\n *\n * It can have any [[Sprite]] element as a child, from very basic shapes, to\n * full-fledged charts.\n *\n * @see {@link https://www.amcharts.com/docs/v5/concepts/common-elements/containers/} for more info\n * @important\n */\nexport class Container extends Sprite {\n\n\tdeclare public _settings: IContainerSettings;\n\tdeclare public _privateSettings: IContainerPrivate;\n\tdeclare public _events: IContainerEvents;\n\n\tpublic _display: IContainer = this._root._renderer.makeContainer();\n\n\tpublic _childrenDisplay: IContainer = this._root._renderer.makeContainer();\n\n\t/**\n\t * List of Container's child elements.\n\t */\n\tpublic children: Children<Sprite> = new Children(this);\n\n\tpublic _percentageSizeChildren: Array<Sprite> = [];\n\tpublic _percentagePositionChildren: Array<Sprite> = [];\n\n\tpublic static className: string = \"Container\";\n\tpublic static classNames: Array<string> = Sprite.classNames.concat([Container.className]);\n\n\tpublic _prevWidth: number = 0;\n\tpublic _prevHeight: number = 0;\n\n\tprotected _contentWidth: number = 0;\n\tprotected _contentHeight: number = 0;\n\n\tprotected _contentMask: Rectangle | undefined;\n\n\tprotected _vsbd0: IDisposer | undefined;\n\tprotected _vsbd1: IDisposer | undefined;\n\n\tprotected _afterNew() {\n\t\tsuper._afterNew();\n\t\tthis._display.addChild(this._childrenDisplay);\n\t}\n\n\tprotected _dispose() {\n\t\t$array.eachReverse(this.allChildren(), (child) => {\n\t\t\tchild.dispose();\n\t\t});\n\n\t\tif (this.getPrivate(\"htmlElement\")) {\n\t\t\tthis._root._removeHTMLContent(this);\n\t\t}\n\n\t\tsuper._dispose();\n\t}\n\n\tpublic _changed() {\n\t\tsuper._changed();\n\n\t\tif (this.isDirty(\"interactiveChildren\")) {\n\t\t\tthis._display.interactiveChildren = this.get(\"interactiveChildren\", false);\n\t\t}\n\n\t\tif (this.isDirty(\"layout\")) {\n\t\t\tthis._prevWidth = 0;\n\t\t\tthis._prevHeight = 0;\n\t\t\tthis.markDirtyBounds();\n\t\t\tif (this._prevSettings.layout) {\n\t\t\t\tthis.children.each((child) => {\n\t\t\t\t\tchild.removePrivate(\"x\");\n\t\t\t\t\tchild.removePrivate(\"y\");\n\t\t\t\t})\n\t\t\t}\n\t\t}\n\n\t\tif (this.isDirty(\"paddingTop\") || this.isDirty(\"paddingBottom\") || this.isDirty(\"paddingLeft\") || this.isDirty(\"paddingRight\")) {\n\t\t\tthis.children.each((child) => {\n\t\t\t\tchild.markDirtyPosition();\n\t\t\t})\n\t\t}\n\n\t\tif (this.isDirty(\"maskContent\")) {\n\n\t\t\tconst childrenDisplay = this._childrenDisplay;\n\n\t\t\tlet contentMask = this._contentMask;\n\t\t\tif (this.get(\"maskContent\")) {\n\t\t\t\tif (!contentMask) {\n\t\t\t\t\tcontentMask = Rectangle.new(this._root, {\n\t\t\t\t\t\twidth: this.width(),\n\t\t\t\t\t\theight: this.height()\n\t\t\t\t\t});\n\t\t\t\t\tthis._contentMask = contentMask;\n\t\t\t\t\tchildrenDisplay.addChildAt(contentMask._display, 0);\n\t\t\t\t\tchildrenDisplay.mask = contentMask._display;\n\t\t\t\t}\n\t\t\t}\n\t\t\telse {\n\t\t\t\tif (contentMask) {\n\t\t\t\t\tchildrenDisplay.removeChild(contentMask._display);\n\t\t\t\t\tchildrenDisplay.mask = null;\t\t\t\t\t\n\t\t\t\t\tcontentMask.dispose();\n\t\t\t\t\tthis._contentMask = undefined;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\tpublic _updateSize() {\n\t\tsuper._updateSize();\n\n\t\t$array.each(this._percentageSizeChildren, (child) => {\n\t\t\tchild._updateSize();\n\t\t});\n\n\t\t$array.each(this._percentagePositionChildren, (child) => {\n\t\t\tchild.markDirtyPosition();\n\t\t\tchild._updateSize();\n\t\t});\n\n\t\tthis.updateBackground();\n\t}\n\n\tprotected updateBackground() {\n\t\tconst background = this.get(\"background\");\n\t\tlet bounds = this._localBounds;\n\n\t\tif (bounds && !this.isHidden()) {\n\t\t\tlet x = bounds.left;\n\t\t\tlet y = bounds.top;\n\t\t\tlet w = bounds.right - x;\n\t\t\tlet h = bounds.bottom - y;\n\n\t\t\tlet maxWidth = this.get(\"maxWidth\");\n\t\t\tlet maxHeight = this.get(\"maxHeight\");\n\n\t\t\tif (maxHeight) {\n\t\t\t\tif (h > maxHeight) {\n\t\t\t\t\th = maxHeight;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif (maxWidth) {\n\t\t\t\tif (w > maxWidth) {\n\t\t\t\t\tw = maxWidth;\n\t\t\t\t}\n\t\t\t}\t\t\t\n\n\t\t\tlet width = this.width();\n\t\t\tlet height = this.height();\n\n\t\t\tif (background) {\n\t\t\t\tbackground.setAll({ width: w, height: h, x: x, y: y });\n\t\t\t\tif (this._display.interactive) {\n\t\t\t\t\tbackground._display.interactive = true;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tconst contentMask = this._contentMask;\n\t\t\tif (contentMask) {\n\t\t\t\tcontentMask.setAll({ width, height });\n\t\t\t}\n\n\t\t\tconst verticalScrollbar = this.get(\"verticalScrollbar\")!;\n\t\t\tif (verticalScrollbar) {\n\t\t\t\tverticalScrollbar.set(\"height\", height);\n\t\t\t\tverticalScrollbar.set(\"x\", width - verticalScrollbar.width() - verticalScrollbar.get(\"marginRight\", 0));\n\t\t\t\tverticalScrollbar.set(\"end\", verticalScrollbar.get(\"start\", 0) + height / this._contentHeight);\n\n\t\t\t\tconst bg = verticalScrollbar.get(\"background\");\n\t\t\t\tif (bg) {\n\t\t\t\t\tbg.setAll({ width: verticalScrollbar.width(), height: height })\n\t\t\t\t}\n\n\t\t\t\tlet visible = true;\n\t\t\t\tif (this._contentHeight <= height) {\n\t\t\t\t\tvisible = false;\n\t\t\t\t}\n\t\t\t\tverticalScrollbar.setPrivate(\"visible\", visible);\n\t\t\t}\n\t\t}\n\t}\n\n\tpublic _applyThemes(): boolean {\n\t\tif (super._applyThemes()) {\n\t\t\tthis.eachChildren((child) => {\n\t\t\t\tchild._applyThemes();\n\t\t\t});\n\n\t\t\treturn true;\n\n\t\t} else {\n\t\t\treturn false;\n\t\t}\n\t}\n\n\tpublic _applyState(name: string): void {\n\t\tsuper._applyState(name);\n\n\t\tif (this.get(\"setStateOnChildren\")) {\n\t\t\tthis.eachChildren((child) => {\n\t\t\t\tchild.states.apply(name);\n\t\t\t});\n\t\t}\n\t}\n\n\tpublic _applyStateAnimated(name: string, duration?: number): void {\n\t\tsuper._applyStateAnimated(name, duration);\n\n\t\tif (this.get(\"setStateOnChildren\")) {\n\t\t\tthis.eachChildren((child) => {\n\t\t\t\tchild.states.applyAnimate(name, duration);\n\t\t\t});\n\t\t}\n\t}\n\n\t/**\n\t * Returns container's inner width (width without padding) in pixels.\n\t *\n\t * @return Inner width (px)\n\t */\n\tpublic innerWidth(): number {\n\t\treturn this.width() - this.get(\"paddingRight\", 0) - this.get(\"paddingLeft\", 0);\n\t}\n\n\t/**\n\t * Returns container's inner height (height without padding) in pixels.\n\t *\n\t * @return Inner height (px)\n\t */\n\tpublic innerHeight(): number {\n\t\treturn this.height() - this.get(\"paddingTop\", 0) - this.get(\"paddingBottom\", 0);\n\t}\n\n\tprotected _getBounds() {\n\n\t\tlet width = this.get(\"width\");\n\t\tlet height = this.get(\"height\");\n\t\tlet pWidth = this.getPrivate(\"width\");\n\t\tlet pHeight = this.getPrivate(\"height\");\n\n\t\tlet bounds: IBounds = {\n\t\t\tleft: 0,\n\t\t\ttop: 0,\n\t\t\tright: this.width(),\n\t\t\tbottom: this.height(),\n\t\t};\n\n\t\tlet layout = this.get(\"layout\");\n\t\tlet horizontal = false;\n\t\tlet vertical = false;\n\t\tif (layout instanceof HorizontalLayout || layout instanceof GridLayout) {\n\t\t\thorizontal = true;\n\t\t}\n\n\t\tif (layout instanceof VerticalLayout) {\n\t\t\tvertical = true;\n\t\t}\n\n\t\tif ((width != null || pWidth != null) && (height != null || pHeight != null) && !this.get(\"verticalScrollbar\")) {\n\t\t\t// void\n\t\t}\n\t\telse {\n\t\t\tlet m = Number.MAX_VALUE;\n\n\t\t\tlet l = m;\n\t\t\tlet r = -m;\n\t\t\tlet t = m;\n\t\t\tlet b = -m;\n\n\t\t\tconst paddingLeft = this.get(\"paddingLeft\", 0);\n\t\t\tconst paddingTop = this.get(\"paddingTop\", 0);\n\t\t\tconst paddingRight = this.get(\"paddingRight\", 0);\n\t\t\tconst paddingBottom = this.get(\"paddingBottom\", 0);\n\n\t\t\tthis.children.each((child) => {\n\t\t\t\tif (child.get(\"position\") != \"absolute\" && child.get(\"isMeasured\")) {\n\t\t\t\t\tlet childBounds = child.adjustedLocalBounds();\n\t\t\t\t\tlet childX = child.x();\n\t\t\t\t\tlet childY = child.y();\n\t\t\t\t\tlet cl = childX + childBounds.left;\n\t\t\t\t\tlet cr = childX + childBounds.right;\n\t\t\t\t\tlet ct = childY + childBounds.top;\n\t\t\t\t\tlet cb = childY + childBounds.bottom;\n\n\t\t\t\t\tif (horizontal) {\n\t\t\t\t\t\tcl -= child.get(\"marginLeft\", 0);\n\t\t\t\t\t\tcr += child.get(\"marginRight\", 0);\n\t\t\t\t\t}\n\n\t\t\t\t\tif (vertical) {\n\t\t\t\t\t\tct -= child.get(\"marginTop\", 0);\n\t\t\t\t\t\tcb += child.get(\"marginBottom\", 0);\n\t\t\t\t\t}\n\n\t\t\t\t\tif (cl < l) {\n\t\t\t\t\t\tl = cl;\n\t\t\t\t\t}\n\t\t\t\t\tif (cr > r) {\n\t\t\t\t\t\tr = cr;\n\t\t\t\t\t}\n\t\t\t\t\tif (ct < t) {\n\t\t\t\t\t\tt = ct;\n\t\t\t\t\t}\n\t\t\t\t\tif (cb > b) {\n\t\t\t\t\t\tb = cb;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t})\n\n\t\t\tif (l == m) {\n\t\t\t\tl = 0;\n\t\t\t}\n\n\t\t\tif (r == -m) {\n\t\t\t\tr = 0;\n\t\t\t}\n\n\t\t\tif (t == m) {\n\t\t\t\tt = 0;\n\t\t\t}\n\n\t\t\tif (b == -m) {\n\t\t\t\tb = 0;\n\t\t\t}\n\n\t\t\tbounds.left = l - paddingLeft;\n\t\t\tbounds.top = t - paddingTop;\n\t\t\tbounds.right = r + paddingRight;\n\t\t\tbounds.bottom = b + paddingBottom;\n\t\t}\n\n\t\tthis._contentWidth = bounds.right - bounds.left;\n\t\tthis._contentHeight = bounds.bottom - bounds.top;\n\n\t\tif ($type.isNumber(width)) {\n\t\t\tbounds.left = 0;\n\t\t\tbounds.right = width;\n\t\t}\n\n\t\tif ($type.isNumber(pWidth)) {\n\t\t\tbounds.left = 0;\n\t\t\tbounds.right = pWidth;\n\t\t}\n\n\t\tif ($type.isNumber(height)) {\n\t\t\tbounds.top = 0;\n\t\t\tbounds.bottom = height;\n\t\t}\n\n\t\tif ($type.isNumber(pHeight)) {\n\t\t\tbounds.top = 0;\n\t\t\tbounds.bottom = pHeight;\n\t\t}\n\n\t\tthis._localBounds = bounds;\n\t}\n\n\tpublic _updateBounds() {\n\t\tconst layout = this.get(\"layout\");\n\n\t\tif (layout) {\n\t\t\tlayout.updateContainer(this);\n\t\t}\n\n\t\tsuper._updateBounds();\n\n\t\tthis.updateBackground();\n\t}\n\n\t/**\n\t * @ignore\n\t */\n\tpublic markDirty(): void {\n\t\tsuper.markDirty();\n\t\tthis._root._addDirtyParent(this);\n\t}\n\n\tpublic _prepareChildren() {\n\t\tconst innerWidth = this.innerWidth();\n\t\tconst innerHeight = this.innerHeight();\n\n\t\tif (innerWidth != this._prevWidth || innerHeight != this._prevHeight) {\n\t\t\tlet layout = this.get(\"layout\");\n\t\t\tlet horizontal = false;\n\t\t\tlet vertical = false;\n\t\t\tif (layout) {\n\t\t\t\tif (layout instanceof HorizontalLayout || layout instanceof GridLayout) {\n\t\t\t\t\thorizontal = true;\n\t\t\t\t}\n\t\t\t\tif (layout instanceof VerticalLayout) {\n\t\t\t\t\tvertical = true;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t$array.each(this._percentageSizeChildren, (child) => {\n\t\t\t\tif (!horizontal) {\n\t\t\t\t\tlet width = child.get(\"width\");\n\t\t\t\t\tif (width instanceof Percent) {\n\t\t\t\t\t\tchild.setPrivate(\"width\", width.value * innerWidth);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif (!vertical) {\n\t\t\t\t\tlet height = child.get(\"height\");\n\t\t\t\t\tif (height instanceof Percent) {\n\t\t\t\t\t\tchild.setPrivate(\"height\", height.value * innerHeight);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t})\n\n\t\t\t$array.each(this._percentagePositionChildren, (child) => {\n\t\t\t\tchild.markDirtyPosition();\n\t\t\t\tchild.markDirtyBounds();\n\t\t\t})\n\n\t\t\tthis._prevWidth = innerWidth;\n\t\t\tthis._prevHeight = innerHeight;\n\n\t\t\tthis._sizeDirty = true;\n\t\t\tthis.updateBackground();\n\t\t}\n\n\t\tthis._handleStates();\n\t}\n\n\tpublic _updateChildren() {\n\n\t\tif(this.isDirty(\"html\")){\n\t\t\tconst html = this.get(\"html\");\n\t\t\tif (html && html !== \"\") {\n\t\t\t\tthis._root._setHTMLContent(this, populateString(this, this.get(\"html\", \"\")));\n\t\t\t}\n\t\t\telse {\n\t\t\t\tthis._root._removeHTMLContent(this);\n\t\t\t}\n\t\t\tthis._root._positionHTMLElement(this);\n\t\t}\t\t\n\n\t\tif (this.isDirty(\"verticalScrollbar\")) {\n\t\t\tconst verticalScrollbar = this.get(\"verticalScrollbar\")!;\n\t\t\tif (verticalScrollbar) {\n\t\t\t\tverticalScrollbar._setParent(this);\n\t\t\t\tverticalScrollbar.children.removeValue(verticalScrollbar.startGrip);\n\t\t\t\tverticalScrollbar.children.removeValue(verticalScrollbar.endGrip);\n\n\t\t\t\tthis.set(\"maskContent\", true);\n\t\t\t\tthis.set(\"paddingRight\", verticalScrollbar.width() + verticalScrollbar.get(\"marginRight\", 0) + verticalScrollbar.get(\"marginLeft\", 0));\n\n\t\t\t\tlet background = this.get(\"background\");\n\n\t\t\t\tif (!background) {\n\t\t\t\t\tbackground = this.set(\"background\", Rectangle.new(this._root, {\n\t\t\t\t\t\tthemeTags: [\"background\"],\n\t\t\t\t\t\tfillOpacity: 0,\n\t\t\t\t\t\tfill: this._root.interfaceColors.get(\"alternativeBackground\")\n\t\t\t\t\t}));\n\t\t\t\t}\n\n\t\t\t\tthis._vsbd0 = this.events.on(\"wheel\", (event) => {\n\t\t\t\t\tconst wheelEvent = event.originalEvent;\n\n\t\t\t\t\t// Ignore wheel event if it is happening on a non-chart element, e.g. if\n\t\t\t\t\t// some page element is over the chart.\n\t\t\t\t\tif ($utils.isLocalEvent(wheelEvent, this)) {\n\t\t\t\t\t\twheelEvent.preventDefault();\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\n\t\t\t\t\tconst shiftY = wheelEvent.deltaY / 5000;\n\t\t\t\t\tconst start = verticalScrollbar.get(\"start\", 0);\n\t\t\t\t\tconst end = verticalScrollbar.get(\"end\", 1);\n\t\t\t\t\tif (start + shiftY > 0 && end + shiftY < 1) {\n\t\t\t\t\t\tverticalScrollbar.set(\"start\", start + shiftY);\n\t\t\t\t\t\tverticalScrollbar.set(\"end\", end + shiftY);\n\t\t\t\t\t}\n\t\t\t\t})\n\n\t\t\t\tthis._disposers.push(this._vsbd0);\n\n\t\t\t\tthis._vsbd1 = verticalScrollbar.events.on(\"rangechanged\", () => {\n\t\t\t\t\tlet h = this._contentHeight;\n\t\t\t\t\tconst childrenDisplay = this._childrenDisplay;\n\t\t\t\t\tconst contentMask = this._contentMask;\n\n\t\t\t\t\tchildrenDisplay.y = -verticalScrollbar.get(\"start\") * h;\n\t\t\t\t\tchildrenDisplay.markDirtyLayer();\n\n\t\t\t\t\tif (contentMask) {\n\t\t\t\t\t\tcontentMask._display.y = -childrenDisplay.y;\n\t\t\t\t\t\tchildrenDisplay.mask = contentMask._display;\n\t\t\t\t\t}\n\t\t\t\t})\n\n\t\t\t\tthis._disposers.push(this._vsbd1);\n\n\t\t\t\tthis._display.addChild(verticalScrollbar._display);\n\t\t\t}\n\t\t\telse {\n\t\t\t\tconst previous = this._prevSettings.verticalScrollbar\n\t\t\t\tif (previous) {\n\t\t\t\t\tthis._display.removeChild(previous._display);\n\t\t\t\t\tif (this._vsbd0) {\n\t\t\t\t\t\tthis._vsbd0.dispose();\n\t\t\t\t\t}\n\t\t\t\t\tif (this._vsbd1) {\n\t\t\t\t\t\tthis._vsbd1.dispose();\n\t\t\t\t\t}\n\t\t\t\t\tconst childrenDisplay = this._childrenDisplay;\n\t\t\t\t\tchildrenDisplay.y = 0;\n\n\t\t\t\t\tthis.setPrivate(\"height\", undefined);\n\t\t\t\t\tthis.set(\"maskContent\", false);\n\t\t\t\t\tthis.set(\"paddingRight\", undefined);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tif (this.isDirty(\"background\")) {\n\t\t\t// TODO maybe this should dispose ?\n\t\t\tconst previous = this._prevSettings[\"background\"];\n\t\t\tif (previous) {\n\t\t\t\tthis._display.removeChild(previous._display);\n\t\t\t}\n\n\t\t\tconst background = this.get(\"background\");\n\t\t\tif (background instanceof Sprite) {\n\t\t\t\tbackground.set(\"isMeasured\", false);\n\t\t\t\tbackground._setParent(this);\n\t\t\t\tthis._display.addChildAt(background._display, 0);\n\t\t\t}\n\t\t}\n\n\t\tif (this.isDirty(\"mask\")) {\n\n\t\t\tconst mask = this.get(\"mask\");\n\n\t\t\tconst previous = this._prevSettings[\"mask\"];\n\t\t\tif (previous) {\n\t\t\t\tthis._display.removeChild(previous._display);\n\t\t\t\tif (previous != mask) {\n\t\t\t\t\tprevious.dispose();\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif (mask) {\n\t\t\t\tvar parent = mask.parent;\n\t\t\t\tif (parent) {\n\t\t\t\t\tparent.children.removeValue(mask);\n\t\t\t\t}\n\n\t\t\t\tmask._setParent(this);\n\t\t\t\tthis._display.addChildAt(mask._display, 0);\n\t\t\t\tthis._childrenDisplay.mask = mask._display;\n\t\t\t}\n\t\t}\n\t}\n\n\tpublic _processTemplateField(): void {\n\t\tsuper._processTemplateField();\n\t\tthis.children.each((child) => {\n\t\t\tchild._processTemplateField();\n\t\t})\n\t}\n\n\t/**\n\t * @ignore\n\t */\n\tpublic walkChildren(f: (child: Sprite) => void): void {\n\t\tthis.children.each((child) => {\n\t\t\tif (child instanceof Container) {\n\t\t\t\tchild.walkChildren(f);\n\t\t\t}\n\t\t\tf(child);\n\t\t});\n\t}\n\n\tpublic eachChildren(f: (child: Sprite) => void): void {\n\t\tconst background = this.get(\"background\");\n\t\tif (background) {\n\t\t\tf(background);\n\t\t}\n\n\t\tconst verticalScrollbar = this.get(\"verticalScrollbar\");\n\t\tif (verticalScrollbar) {\n\t\t\tf(verticalScrollbar);\n\t\t}\n\n\t\tconst mask = this.get(\"mask\");\n\t\tif (mask) {\n\t\t\tf(mask);\n\t\t}\n\n\t\tthis.children.values.forEach((child) => {\n\t\t\tf(child);\n\t\t});\n\t}\n\n\tpublic allChildren(): Array<Sprite> {\n\t\tconst output: Array<Sprite> = [];\n\n\t\tthis.eachChildren((x) => {\n\t\t\toutput.push(x);\n\t\t});\n\n\t\treturn output;\n\t}\n\n\tpublic _setDataItem(dataItem?: DataItem<IComponentDataItem>): void {\n\t\tconst updated = (dataItem !== this._dataItem);\n\t\tsuper._setDataItem(dataItem);\n\t\tconst html = this.get(\"html\", \"\");\n\t\tif (html && html !== \"\" && updated) {\n\t\t\tthis._root._setHTMLContent(this, populateString(this, html));\n\t\t}\n\t}\n}"]}
|
|
1
|
+
{"version":3,"file":"Container.js","sourceRoot":"","sources":["../../../../../src/.internal/core/render/Container.ts"],"names":[],"mappings":";AAOA,OAAO,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAC5C,OAAO,EAAE,OAAO,EAAE,MAAM,iBAAiB,CAAC;AAC1C,OAAO,EAAE,MAAM,EAAkD,MAAM,UAAU,CAAC;AAClF,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AACxC,OA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;;eAA0C,MAAM,CAAC,UAAU,CAAC,MAAM,CAAC,CAAC,SAAS,CAAC,SAAS,CAAC,CAAC;OAAC;IA+kB3F,gBAAC;CAAA,AAlmBD,CAA+B,MAAM,GAkmBpC;SAlmBY,SAAS","sourcesContent":["import type { Graphics } from \"./Graphics\";\nimport type { Layout } from \"./Layout\";\nimport type { IContainer } from \"./backend/Renderer\";\nimport type { IBounds } from \"../util/IBounds\";\nimport type { Scrollbar } from \"./Scrollbar\";\nimport type { DataItem, IComponentDataItem } from \"./Component\";\n\nimport { Children } from \"../util/Children\";\nimport { Percent } from \"../util/Percent\";\nimport { Sprite, ISpriteSettings, ISpritePrivate, ISpriteEvents } from \"./Sprite\";\nimport { Rectangle } from \"./Rectangle\";\nimport { HorizontalLayout } from \"./HorizontalLayout\";\nimport { VerticalLayout } from \"./VerticalLayout\";\nimport { GridLayout } from \"./GridLayout\";\nimport { populateString } from \"../util/PopulateString\";\nimport type { IDisposer } from \"../util/Disposer\";\n\nimport * as $array from \"../util/Array\";\nimport * as $type from \"../util/Type\";\nimport * as $utils from \"../util/Utils\";\n\nexport interface IContainerSettings extends ISpriteSettings {\n\n\t/**\n\t * Left padding in pixels.\n\t */\n\tpaddingLeft?: number;\n\n\t/**\n\t * Right padding in pixels.\n\t */\n\tpaddingRight?: number;\n\n\t/**\n\t * Top padding in pixels.\n\t */\n\tpaddingTop?: number;\n\n\t/**\n\t * Bottom padding in pixels.\n\t */\n\tpaddingBottom?: number;\n\n\t/**\n\t * Background element.\n\t *\n\t * @see {@link https://www.amcharts.com/docs/v5/concepts/containers/#Background} for more info\n\t */\n\tbackground?: Graphics;\n\n\t/**\n\t * A method to layout\n\t *\n\t * @see {@link https://www.amcharts.com/docs/v5/concepts/containers/#Layout} for more info\n\t */\n\tlayout?: Layout | null;\n\n\t/**\n\t * An element to use as a container's mask (clipping region).\n\t *\n\t * @see {@link https://www.amcharts.com/docs/v5/concepts/containers/#Masks} for more info\n\t */\n\tmask?: Graphics | null;\n\n\t/**\n\t * If set to `true` all content going outside the bounds of the container\n\t * will be clipped.\n\t */\n\tmaskContent?: boolean;\n\n\t/**\n\t * If set to `true` all descendants - not just direct children, but every\n\t * element in it - will become \"interactive\".\n\t */\n\tinteractiveChildren?: boolean;\n\n\t/**\n\t * If set to `true`, applying a state on a container will also apply the same\n\t * state on its children.\n\t *\n\t * @see {@link https://www.amcharts.com/docs/v5/concepts/containers/#States} for more info\n\t */\n\tsetStateOnChildren?: boolean;\n\n\t/**\n\t * Setting this to an instance of [[Scrollbar]] will enable vertical\n\t * scrolling of content if it does not fit into the Container.\n\t * \n\t * @see {@link https://www.amcharts.com/docs/v5/concepts/containers/#Scrollbar} for more info\n\t */\n\tverticalScrollbar?: Scrollbar;\n\n\t/**\n\t * If set to `true` its children will be laid out in opposite order.\n\t *\n\t * @since 5.1.1\n\t */\n\treverseChildren?: boolean;\n\n\t/**\n\t * HTML content of the container.\n\t *\n\t * @see {@link https://www.amcharts.com/docs/v5/concepts/common-elements/html-content/} for more info\n\t * @since 5.2.11\n\t */\n\thtml?: string;\n\n}\n\nexport interface IContainerEvents extends ISpriteEvents {\n}\n\nexport interface IContainerPrivate extends ISpritePrivate {\n\n\t/**\n\t * A `<div>` element used for HTML content of the `Container`.\n\t */\n\thtmlElement?: HTMLDivElement;\n\n}\n\nexport interface IContainerEvents extends ISpriteEvents {\n}\n\n/**\n * A basic element that can have child elements, maintain their layout, and\n * have a background.\n *\n * It can have any [[Sprite]] element as a child, from very basic shapes, to\n * full-fledged charts.\n *\n * @see {@link https://www.amcharts.com/docs/v5/concepts/common-elements/containers/} for more info\n * @important\n */\nexport class Container extends Sprite {\n\n\tdeclare public _settings: IContainerSettings;\n\tdeclare public _privateSettings: IContainerPrivate;\n\tdeclare public _events: IContainerEvents;\n\n\tpublic _display: IContainer = this._root._renderer.makeContainer();\n\n\tpublic _childrenDisplay: IContainer = this._root._renderer.makeContainer();\n\n\t/**\n\t * List of Container's child elements.\n\t */\n\tpublic children: Children<Sprite> = new Children(this);\n\n\tpublic _percentageSizeChildren: Array<Sprite> = [];\n\tpublic _percentagePositionChildren: Array<Sprite> = [];\n\n\tpublic static className: string = \"Container\";\n\tpublic static classNames: Array<string> = Sprite.classNames.concat([Container.className]);\n\n\tpublic _prevWidth: number = 0;\n\tpublic _prevHeight: number = 0;\n\n\tprotected _contentWidth: number = 0;\n\tprotected _contentHeight: number = 0;\n\n\tprotected _contentMask: Rectangle | undefined;\n\n\tprotected _vsbd0: IDisposer | undefined;\n\tprotected _vsbd1: IDisposer | undefined;\n\n\tprotected _afterNew() {\n\t\tsuper._afterNew();\n\t\tthis._display.addChild(this._childrenDisplay);\n\t}\n\n\tprotected _dispose() {\n\t\t$array.eachReverse(this.allChildren(), (child) => {\n\t\t\tchild.dispose();\n\t\t});\n\n\t\tif (this.getPrivate(\"htmlElement\")) {\n\t\t\tthis._root._removeHTMLContent(this);\n\t\t}\n\n\t\tsuper._dispose();\n\t}\n\n\tpublic _changed() {\n\t\tsuper._changed();\n\n\t\tif (this.isDirty(\"interactiveChildren\")) {\n\t\t\tthis._display.interactiveChildren = this.get(\"interactiveChildren\", false);\n\t\t}\n\n\t\tif (this.isDirty(\"layout\")) {\n\t\t\tthis._prevWidth = 0;\n\t\t\tthis._prevHeight = 0;\n\t\t\tthis.markDirtyBounds();\n\t\t\tif (this._prevSettings.layout) {\n\t\t\t\tthis.children.each((child) => {\n\t\t\t\t\tchild.removePrivate(\"x\");\n\t\t\t\t\tchild.removePrivate(\"y\");\n\t\t\t\t})\n\t\t\t}\n\t\t}\n\n\t\tif (this.isDirty(\"paddingTop\") || this.isDirty(\"paddingBottom\") || this.isDirty(\"paddingLeft\") || this.isDirty(\"paddingRight\")) {\n\t\t\tthis.children.each((child) => {\n\t\t\t\tchild.markDirtyPosition();\n\t\t\t})\n\t\t}\n\n\t\tif (this.isDirty(\"maskContent\")) {\n\n\t\t\tconst childrenDisplay = this._childrenDisplay;\n\n\t\t\tlet contentMask = this._contentMask;\n\t\t\tif (this.get(\"maskContent\")) {\n\t\t\t\tif (!contentMask) {\n\t\t\t\t\tcontentMask = Rectangle.new(this._root, {\n\t\t\t\t\t\twidth: this.width() + .5,\n\t\t\t\t\t\theight: this.height() + .5\n\t\t\t\t\t});\n\t\t\t\t\tthis._contentMask = contentMask;\n\t\t\t\t\tchildrenDisplay.addChildAt(contentMask._display, 0);\n\t\t\t\t\tchildrenDisplay.mask = contentMask._display;\n\t\t\t\t}\n\t\t\t}\n\t\t\telse {\n\t\t\t\tif (contentMask) {\n\t\t\t\t\tchildrenDisplay.removeChild(contentMask._display);\n\t\t\t\t\tchildrenDisplay.mask = null;\t\t\t\t\t\n\t\t\t\t\tcontentMask.dispose();\n\t\t\t\t\tthis._contentMask = undefined;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\tpublic _updateSize() {\n\t\tsuper._updateSize();\n\n\t\t$array.each(this._percentageSizeChildren, (child) => {\n\t\t\tchild._updateSize();\n\t\t});\n\n\t\t$array.each(this._percentagePositionChildren, (child) => {\n\t\t\tchild.markDirtyPosition();\n\t\t\tchild._updateSize();\n\t\t});\n\n\t\tthis.updateBackground();\n\t}\n\n\tprotected updateBackground() {\n\t\tconst background = this.get(\"background\");\n\t\tlet bounds = this._localBounds;\n\n\t\tif (bounds && !this.isHidden()) {\n\t\t\tlet x = bounds.left;\n\t\t\tlet y = bounds.top;\n\t\t\tlet w = bounds.right - x;\n\t\t\tlet h = bounds.bottom - y;\n\n\t\t\tlet maxWidth = this.get(\"maxWidth\");\n\t\t\tlet maxHeight = this.get(\"maxHeight\");\n\n\t\t\tif (maxHeight) {\n\t\t\t\tif (h > maxHeight) {\n\t\t\t\t\th = maxHeight;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif (maxWidth) {\n\t\t\t\tif (w > maxWidth) {\n\t\t\t\t\tw = maxWidth;\n\t\t\t\t}\n\t\t\t}\t\t\t\n\n\t\t\tlet width = this.width();\n\t\t\tlet height = this.height();\n\n\t\t\tif (background) {\n\t\t\t\tbackground.setAll({ width: w, height: h, x: x, y: y });\n\t\t\t\tif (this._display.interactive) {\n\t\t\t\t\tbackground._display.interactive = true;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tconst contentMask = this._contentMask;\n\t\t\tif (contentMask) {\n\t\t\t\tcontentMask.setAll({ width:width + .5, height:height + .5 });\n\t\t\t}\n\n\t\t\tconst verticalScrollbar = this.get(\"verticalScrollbar\")!;\n\t\t\tif (verticalScrollbar) {\n\t\t\t\tverticalScrollbar.set(\"height\", height);\n\t\t\t\tverticalScrollbar.set(\"x\", width - verticalScrollbar.width() - verticalScrollbar.get(\"marginRight\", 0));\n\t\t\t\tverticalScrollbar.set(\"end\", verticalScrollbar.get(\"start\", 0) + height / this._contentHeight);\n\n\t\t\t\tconst bg = verticalScrollbar.get(\"background\");\n\t\t\t\tif (bg) {\n\t\t\t\t\tbg.setAll({ width: verticalScrollbar.width(), height: height })\n\t\t\t\t}\n\n\t\t\t\tlet visible = true;\n\t\t\t\tif (this._contentHeight <= height) {\n\t\t\t\t\tvisible = false;\n\t\t\t\t}\n\t\t\t\tverticalScrollbar.setPrivate(\"visible\", visible);\n\t\t\t}\n\t\t}\n\t}\n\n\tpublic _applyThemes(): boolean {\n\t\tif (super._applyThemes()) {\n\t\t\tthis.eachChildren((child) => {\n\t\t\t\tchild._applyThemes();\n\t\t\t});\n\n\t\t\treturn true;\n\n\t\t} else {\n\t\t\treturn false;\n\t\t}\n\t}\n\n\tpublic _applyState(name: string): void {\n\t\tsuper._applyState(name);\n\n\t\tif (this.get(\"setStateOnChildren\")) {\n\t\t\tthis.eachChildren((child) => {\n\t\t\t\tchild.states.apply(name);\n\t\t\t});\n\t\t}\n\t}\n\n\tpublic _applyStateAnimated(name: string, duration?: number): void {\n\t\tsuper._applyStateAnimated(name, duration);\n\n\t\tif (this.get(\"setStateOnChildren\")) {\n\t\t\tthis.eachChildren((child) => {\n\t\t\t\tchild.states.applyAnimate(name, duration);\n\t\t\t});\n\t\t}\n\t}\n\n\t/**\n\t * Returns container's inner width (width without padding) in pixels.\n\t *\n\t * @return Inner width (px)\n\t */\n\tpublic innerWidth(): number {\n\t\treturn this.width() - this.get(\"paddingRight\", 0) - this.get(\"paddingLeft\", 0);\n\t}\n\n\t/**\n\t * Returns container's inner height (height without padding) in pixels.\n\t *\n\t * @return Inner height (px)\n\t */\n\tpublic innerHeight(): number {\n\t\treturn this.height() - this.get(\"paddingTop\", 0) - this.get(\"paddingBottom\", 0);\n\t}\n\n\tprotected _getBounds() {\n\n\t\tlet width = this.get(\"width\");\n\t\tlet height = this.get(\"height\");\n\t\tlet pWidth = this.getPrivate(\"width\");\n\t\tlet pHeight = this.getPrivate(\"height\");\n\n\t\tlet bounds: IBounds = {\n\t\t\tleft: 0,\n\t\t\ttop: 0,\n\t\t\tright: this.width(),\n\t\t\tbottom: this.height(),\n\t\t};\n\n\t\tlet layout = this.get(\"layout\");\n\t\tlet horizontal = false;\n\t\tlet vertical = false;\n\t\tif (layout instanceof HorizontalLayout || layout instanceof GridLayout) {\n\t\t\thorizontal = true;\n\t\t}\n\n\t\tif (layout instanceof VerticalLayout) {\n\t\t\tvertical = true;\n\t\t}\n\n\t\tif ((width != null || pWidth != null) && (height != null || pHeight != null) && !this.get(\"verticalScrollbar\")) {\n\t\t\t// void\n\t\t}\n\t\telse {\n\t\t\tlet m = Number.MAX_VALUE;\n\n\t\t\tlet l = m;\n\t\t\tlet r = -m;\n\t\t\tlet t = m;\n\t\t\tlet b = -m;\n\n\t\t\tconst paddingLeft = this.get(\"paddingLeft\", 0);\n\t\t\tconst paddingTop = this.get(\"paddingTop\", 0);\n\t\t\tconst paddingRight = this.get(\"paddingRight\", 0);\n\t\t\tconst paddingBottom = this.get(\"paddingBottom\", 0);\n\n\t\t\tthis.children.each((child) => {\n\t\t\t\tif (child.get(\"position\") != \"absolute\" && child.get(\"isMeasured\")) {\n\t\t\t\t\tlet childBounds = child.adjustedLocalBounds();\n\t\t\t\t\tlet childX = child.x();\n\t\t\t\t\tlet childY = child.y();\n\t\t\t\t\tlet cl = childX + childBounds.left;\n\t\t\t\t\tlet cr = childX + childBounds.right;\n\t\t\t\t\tlet ct = childY + childBounds.top;\n\t\t\t\t\tlet cb = childY + childBounds.bottom;\n\n\t\t\t\t\tif (horizontal) {\n\t\t\t\t\t\tcl -= child.get(\"marginLeft\", 0);\n\t\t\t\t\t\tcr += child.get(\"marginRight\", 0);\n\t\t\t\t\t}\n\n\t\t\t\t\tif (vertical) {\n\t\t\t\t\t\tct -= child.get(\"marginTop\", 0);\n\t\t\t\t\t\tcb += child.get(\"marginBottom\", 0);\n\t\t\t\t\t}\n\n\t\t\t\t\tif (cl < l) {\n\t\t\t\t\t\tl = cl;\n\t\t\t\t\t}\n\t\t\t\t\tif (cr > r) {\n\t\t\t\t\t\tr = cr;\n\t\t\t\t\t}\n\t\t\t\t\tif (ct < t) {\n\t\t\t\t\t\tt = ct;\n\t\t\t\t\t}\n\t\t\t\t\tif (cb > b) {\n\t\t\t\t\t\tb = cb;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t})\n\n\t\t\tif (l == m) {\n\t\t\t\tl = 0;\n\t\t\t}\n\n\t\t\tif (r == -m) {\n\t\t\t\tr = 0;\n\t\t\t}\n\n\t\t\tif (t == m) {\n\t\t\t\tt = 0;\n\t\t\t}\n\n\t\t\tif (b == -m) {\n\t\t\t\tb = 0;\n\t\t\t}\n\n\t\t\tbounds.left = l - paddingLeft;\n\t\t\tbounds.top = t - paddingTop;\n\t\t\tbounds.right = r + paddingRight;\n\t\t\tbounds.bottom = b + paddingBottom;\n\t\t}\n\n\t\tthis._contentWidth = bounds.right - bounds.left;\n\t\tthis._contentHeight = bounds.bottom - bounds.top;\n\n\t\tif ($type.isNumber(width)) {\n\t\t\tbounds.left = 0;\n\t\t\tbounds.right = width;\n\t\t}\n\n\t\tif ($type.isNumber(pWidth)) {\n\t\t\tbounds.left = 0;\n\t\t\tbounds.right = pWidth;\n\t\t}\n\n\t\tif ($type.isNumber(height)) {\n\t\t\tbounds.top = 0;\n\t\t\tbounds.bottom = height;\n\t\t}\n\n\t\tif ($type.isNumber(pHeight)) {\n\t\t\tbounds.top = 0;\n\t\t\tbounds.bottom = pHeight;\n\t\t}\n\n\t\tthis._localBounds = bounds;\n\t}\n\n\tpublic _updateBounds() {\n\t\tconst layout = this.get(\"layout\");\n\n\t\tif (layout) {\n\t\t\tlayout.updateContainer(this);\n\t\t}\n\n\t\tsuper._updateBounds();\n\n\t\tthis.updateBackground();\n\t}\n\n\t/**\n\t * @ignore\n\t */\n\tpublic markDirty(): void {\n\t\tsuper.markDirty();\n\t\tthis._root._addDirtyParent(this);\n\t}\n\n\tpublic _prepareChildren() {\n\t\tconst innerWidth = this.innerWidth();\n\t\tconst innerHeight = this.innerHeight();\n\n\t\tif (innerWidth != this._prevWidth || innerHeight != this._prevHeight) {\n\t\t\tlet layout = this.get(\"layout\");\n\t\t\tlet horizontal = false;\n\t\t\tlet vertical = false;\n\t\t\tif (layout) {\n\t\t\t\tif (layout instanceof HorizontalLayout || layout instanceof GridLayout) {\n\t\t\t\t\thorizontal = true;\n\t\t\t\t}\n\t\t\t\tif (layout instanceof VerticalLayout) {\n\t\t\t\t\tvertical = true;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t$array.each(this._percentageSizeChildren, (child) => {\n\t\t\t\tif (!horizontal) {\n\t\t\t\t\tlet width = child.get(\"width\");\n\t\t\t\t\tif (width instanceof Percent) {\n\t\t\t\t\t\tchild.setPrivate(\"width\", width.value * innerWidth);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif (!vertical) {\n\t\t\t\t\tlet height = child.get(\"height\");\n\t\t\t\t\tif (height instanceof Percent) {\n\t\t\t\t\t\tchild.setPrivate(\"height\", height.value * innerHeight);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t})\n\n\t\t\t$array.each(this._percentagePositionChildren, (child) => {\n\t\t\t\tchild.markDirtyPosition();\n\t\t\t\tchild.markDirtyBounds();\n\t\t\t})\n\n\t\t\tthis._prevWidth = innerWidth;\n\t\t\tthis._prevHeight = innerHeight;\n\n\t\t\tthis._sizeDirty = true;\n\t\t\tthis.updateBackground();\n\t\t}\n\n\t\tthis._handleStates();\n\t}\n\n\tpublic _updateChildren() {\n\n\t\tif(this.isDirty(\"html\")){\n\t\t\tconst html = this.get(\"html\");\n\t\t\tif (html && html !== \"\") {\n\t\t\t\tthis._root._setHTMLContent(this, populateString(this, this.get(\"html\", \"\")));\n\t\t\t}\n\t\t\telse {\n\t\t\t\tthis._root._removeHTMLContent(this);\n\t\t\t}\n\t\t\tthis._root._positionHTMLElement(this);\n\t\t}\t\t\n\n\t\tif (this.isDirty(\"verticalScrollbar\")) {\n\t\t\tconst verticalScrollbar = this.get(\"verticalScrollbar\")!;\n\t\t\tif (verticalScrollbar) {\n\t\t\t\tverticalScrollbar._setParent(this);\n\t\t\t\tverticalScrollbar.children.removeValue(verticalScrollbar.startGrip);\n\t\t\t\tverticalScrollbar.children.removeValue(verticalScrollbar.endGrip);\n\n\t\t\t\tthis.set(\"maskContent\", true);\n\t\t\t\tthis.set(\"paddingRight\", verticalScrollbar.width() + verticalScrollbar.get(\"marginRight\", 0) + verticalScrollbar.get(\"marginLeft\", 0));\n\n\t\t\t\tlet background = this.get(\"background\");\n\n\t\t\t\tif (!background) {\n\t\t\t\t\tbackground = this.set(\"background\", Rectangle.new(this._root, {\n\t\t\t\t\t\tthemeTags: [\"background\"],\n\t\t\t\t\t\tfillOpacity: 0,\n\t\t\t\t\t\tfill: this._root.interfaceColors.get(\"alternativeBackground\")\n\t\t\t\t\t}));\n\t\t\t\t}\n\n\t\t\t\tthis._vsbd0 = this.events.on(\"wheel\", (event) => {\n\t\t\t\t\tconst wheelEvent = event.originalEvent;\n\n\t\t\t\t\t// Ignore wheel event if it is happening on a non-chart element, e.g. if\n\t\t\t\t\t// some page element is over the chart.\n\t\t\t\t\tif ($utils.isLocalEvent(wheelEvent, this)) {\n\t\t\t\t\t\twheelEvent.preventDefault();\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\n\t\t\t\t\tconst shiftY = wheelEvent.deltaY / 5000;\n\t\t\t\t\tconst start = verticalScrollbar.get(\"start\", 0);\n\t\t\t\t\tconst end = verticalScrollbar.get(\"end\", 1);\n\t\t\t\t\tif (start + shiftY > 0 && end + shiftY < 1) {\n\t\t\t\t\t\tverticalScrollbar.set(\"start\", start + shiftY);\n\t\t\t\t\t\tverticalScrollbar.set(\"end\", end + shiftY);\n\t\t\t\t\t}\n\t\t\t\t})\n\n\t\t\t\tthis._disposers.push(this._vsbd0);\n\n\t\t\t\tthis._vsbd1 = verticalScrollbar.events.on(\"rangechanged\", () => {\n\t\t\t\t\tlet h = this._contentHeight;\n\t\t\t\t\tconst childrenDisplay = this._childrenDisplay;\n\t\t\t\t\tconst contentMask = this._contentMask;\n\n\t\t\t\t\tchildrenDisplay.y = -verticalScrollbar.get(\"start\") * h;\n\t\t\t\t\tchildrenDisplay.markDirtyLayer();\n\n\t\t\t\t\tif (contentMask) {\n\t\t\t\t\t\tcontentMask._display.y = -childrenDisplay.y;\n\t\t\t\t\t\tchildrenDisplay.mask = contentMask._display;\n\t\t\t\t\t}\n\t\t\t\t})\n\n\t\t\t\tthis._disposers.push(this._vsbd1);\n\n\t\t\t\tthis._display.addChild(verticalScrollbar._display);\n\t\t\t}\n\t\t\telse {\n\t\t\t\tconst previous = this._prevSettings.verticalScrollbar\n\t\t\t\tif (previous) {\n\t\t\t\t\tthis._display.removeChild(previous._display);\n\t\t\t\t\tif (this._vsbd0) {\n\t\t\t\t\t\tthis._vsbd0.dispose();\n\t\t\t\t\t}\n\t\t\t\t\tif (this._vsbd1) {\n\t\t\t\t\t\tthis._vsbd1.dispose();\n\t\t\t\t\t}\n\t\t\t\t\tconst childrenDisplay = this._childrenDisplay;\n\t\t\t\t\tchildrenDisplay.y = 0;\n\n\t\t\t\t\tthis.setPrivate(\"height\", undefined);\n\t\t\t\t\tthis.set(\"maskContent\", false);\n\t\t\t\t\tthis.set(\"paddingRight\", undefined);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tif (this.isDirty(\"background\")) {\n\t\t\t// TODO maybe this should dispose ?\n\t\t\tconst previous = this._prevSettings[\"background\"];\n\t\t\tif (previous) {\n\t\t\t\tthis._display.removeChild(previous._display);\n\t\t\t}\n\n\t\t\tconst background = this.get(\"background\");\n\t\t\tif (background instanceof Sprite) {\n\t\t\t\tbackground.set(\"isMeasured\", false);\n\t\t\t\tbackground._setParent(this);\n\t\t\t\tthis._display.addChildAt(background._display, 0);\n\t\t\t}\n\t\t}\n\n\t\tif (this.isDirty(\"mask\")) {\n\n\t\t\tconst mask = this.get(\"mask\");\n\n\t\t\tconst previous = this._prevSettings[\"mask\"];\n\t\t\tif (previous) {\n\t\t\t\tthis._display.removeChild(previous._display);\n\t\t\t\tif (previous != mask) {\n\t\t\t\t\tprevious.dispose();\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif (mask) {\n\t\t\t\tvar parent = mask.parent;\n\t\t\t\tif (parent) {\n\t\t\t\t\tparent.children.removeValue(mask);\n\t\t\t\t}\n\n\t\t\t\tmask._setParent(this);\n\t\t\t\tthis._display.addChildAt(mask._display, 0);\n\t\t\t\tthis._childrenDisplay.mask = mask._display;\n\t\t\t}\n\t\t}\n\t}\n\n\tpublic _processTemplateField(): void {\n\t\tsuper._processTemplateField();\n\t\tthis.children.each((child) => {\n\t\t\tchild._processTemplateField();\n\t\t})\n\t}\n\n\t/**\n\t * @ignore\n\t */\n\tpublic walkChildren(f: (child: Sprite) => void): void {\n\t\tthis.children.each((child) => {\n\t\t\tif (child instanceof Container) {\n\t\t\t\tchild.walkChildren(f);\n\t\t\t}\n\t\t\tf(child);\n\t\t});\n\t}\n\n\tpublic eachChildren(f: (child: Sprite) => void): void {\n\t\tconst background = this.get(\"background\");\n\t\tif (background) {\n\t\t\tf(background);\n\t\t}\n\n\t\tconst verticalScrollbar = this.get(\"verticalScrollbar\");\n\t\tif (verticalScrollbar) {\n\t\t\tf(verticalScrollbar);\n\t\t}\n\n\t\tconst mask = this.get(\"mask\");\n\t\tif (mask) {\n\t\t\tf(mask);\n\t\t}\n\n\t\tthis.children.values.forEach((child) => {\n\t\t\tf(child);\n\t\t});\n\t}\n\n\tpublic allChildren(): Array<Sprite> {\n\t\tconst output: Array<Sprite> = [];\n\n\t\tthis.eachChildren((x) => {\n\t\t\toutput.push(x);\n\t\t});\n\n\t\treturn output;\n\t}\n\n\tpublic _setDataItem(dataItem?: DataItem<IComponentDataItem>): void {\n\t\tconst updated = (dataItem !== this._dataItem);\n\t\tsuper._setDataItem(dataItem);\n\t\tconst html = this.get(\"html\", \"\");\n\t\tif (html && html !== \"\" && updated) {\n\t\t\tthis._root._setHTMLContent(this, populateString(this, html));\n\t\t}\n\t}\n}"]}
|
|
@@ -65,6 +65,11 @@ export interface IGraphicsSettings extends ISpriteSettings {
|
|
|
65
65
|
* Width of the stroke (border or line) in pixels.
|
|
66
66
|
*/
|
|
67
67
|
strokeWidth?: number;
|
|
68
|
+
/**
|
|
69
|
+
* Indicates if stroke of a Graphics should stay the same when it's scale changes. Note, this doesn't take into account parent container scale changes.
|
|
70
|
+
* @default false
|
|
71
|
+
*/
|
|
72
|
+
nonScalingStroke?: boolean;
|
|
68
73
|
/**
|
|
69
74
|
* Drawing function.
|
|
70
75
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Graphics.d.ts","sourceRoot":"","sources":["../../../../../src/.internal/core/render/Graphics.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,eAAe,CAAC;AAC3C,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,4BAA4B,CAAC;AAC1D,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,8BAA8B,CAAC;AAG7D,OAAO,EAAE,eAAe,EAAE,cAAc,EAAE,aAAa,EAAE,MAAM,EAAE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EjC,QAAQ,EAAE,SAAS,CAAuC;IAEjE,SAAS,CAAC,MAAM,UAAS;IAEzB,OAAc,SAAS,EAAE,MAAM,CAAc;IAC7C,OAAc,UAAU,EAAE,KAAK,CAAC,MAAM,CAAC,CAAkD;IAElF,cAAc;IA+Cd,QAAQ;IAuCR,aAAa;CAqJpB"}
|
|
@@ -39,7 +39,7 @@ var Graphics = /** @class */ (function (_super) {
|
|
|
39
39
|
if (this.isDirty("draw") || this.isDirty("svgPath")) {
|
|
40
40
|
this.markDirtyBounds();
|
|
41
41
|
}
|
|
42
|
-
if (this.isDirty("fill") || this.isDirty("stroke") || this.isDirty("visible") || this.isDirty("forceHidden") || this.isDirty("fillGradient") || this.isDirty("strokeGradient") || this.isDirty("fillPattern") || this.isDirty("strokePattern") || this.isDirty("fillOpacity") || this.isDirty("strokeOpacity") || this.isDirty("strokeWidth") || this.isDirty("draw") || this.isDirty("blendMode") || this.isDirty("strokeDasharray") || this.isDirty("strokeDashoffset") || this.isDirty("svgPath") || this.isDirty("lineJoin") || this.isDirty("shadowColor") || this.isDirty("shadowBlur") || this.isDirty("shadowOffsetX") || this.isDirty("shadowOffsetY")) {
|
|
42
|
+
if (this.isDirty("fill") || this.isDirty("stroke") || this.isDirty("visible") || this.isDirty("forceHidden") || this.isDirty("scale") || this.isDirty("fillGradient") || this.isDirty("strokeGradient") || this.isDirty("fillPattern") || this.isDirty("strokePattern") || this.isDirty("fillOpacity") || this.isDirty("strokeOpacity") || this.isDirty("strokeWidth") || this.isDirty("draw") || this.isDirty("blendMode") || this.isDirty("strokeDasharray") || this.isDirty("strokeDashoffset") || this.isDirty("svgPath") || this.isDirty("lineJoin") || this.isDirty("shadowColor") || this.isDirty("shadowBlur") || this.isDirty("shadowOffsetX") || this.isDirty("shadowOffsetY")) {
|
|
43
43
|
this._clear = true;
|
|
44
44
|
}
|
|
45
45
|
if (this.isDirty("fillGradient")) {
|
|
@@ -192,6 +192,9 @@ var Graphics = /** @class */ (function (_super) {
|
|
|
192
192
|
if (stroke_1 || strokeGradient || strokePattern) {
|
|
193
193
|
var strokeOpacity_1 = this.get("strokeOpacity");
|
|
194
194
|
var strokeWidth = this.get("strokeWidth", 1);
|
|
195
|
+
if (this.get("nonScalingStroke")) {
|
|
196
|
+
strokeWidth = strokeWidth / this.get("scale", 1);
|
|
197
|
+
}
|
|
195
198
|
var lineJoin = this.get("lineJoin");
|
|
196
199
|
if (strokePattern) {
|
|
197
200
|
var changed = false;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Graphics.js","sourceRoot":"","sources":["../../../../../src/.internal/core/render/Graphics.ts"],"names":[],"mappings":";AAIA,OAAO,EAAE,cAAc,EAAE,MAAM,mCAAmC,CAAC;AACnE,OAAO,EAAkD,MAAM,EAAE,MAAM,UAAU,CAAC;AAClF,OAAO,EAAa,SAAS,EAAE,MAAM,oBAAoB,CAAC;AAE1D,OAAO,KAAK,KAAK,MAAM,cAAc,CAAC;AACtC,OAAO,KAAK,MAAM,MAAM,eAAe,CAAC;AAGxC,MAAM,CAAC,IAAM,cAAc,GAAG,CAAC,MAAM,EAAE,aAAa,EAAE,QAAQ,EAAE,aAAa,EAAE,eAAe,EAAE,aAAa,EAAE,eAAe,EAAE,cAAc,EAAE,gBAAgB,EAAE,iBAAiB,EAAE,kBAAkB,CAAC,CAAC;AA+JzM;;;;;GAKG;AACH;IAA8B,4BAAM;IAApC;QAAA,qEAoPC;QA9OA;;;;mBAA6B,KAAI,CAAC,KAAK,CAAC,SAAS,CAAC,YAAY,EAAE;WAAC;QAEjE;;;;mBAAmB,KAAK;WAAC;;IA4O1B,CAAC;;;;;eAvOA;YAAA,iBA6CC;YA5CA,iBAAM,cAAc,WAAE,CAAC;YAEvB,IAAI,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC,IAAI,IAAI,CAAC,OAAO,CAAC,SAAS,CAAC,EAAE;gBACpD,IAAI,CAAC,eAAe,EAAE,CAAC;aACvB;YAED,IAAI,IAAI,CAAC,OAA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AE;4BACb,IAAI,CAAC,QAAQ,CAAC,SAAS,CAAC,WAAW,EAAE,QAAQ,EAAE,eAAa,EAAE,QAAQ,CAAC,CAAC;4BACxE,IAAI,CAAC,QAAQ,CAAC,SAAS,EAAE,CAAC;yBAC1B;qBACD;yBACI,IAAI,QAAM,EAAE;wBAChB,IAAI,CAAC,QAAQ,CAAC,SAAS,CAAC,WAAW,EAAE,QAAM,EAAE,eAAa,EAAE,QAAQ,CAAC,CAAC;wBACtE,IAAI,CAAC,QAAQ,CAAC,SAAS,EAAE,CAAC;qBAC1B;iBAED;aAED;YACD,IAAI,CAAC,MAAM,GAAG,KAAK,CAAC;QACrB,CAAC;;IAxOD;;;;eAAkC,UAAU;OAAC;IAC7C;;;;eAA0C,MAAM,CAAC,UAAU,CAAC,MAAM,CAAC,CAAC,QAAQ,CAAC,SAAS,CAAC,CAAC;OAAC;IAyO1F,eAAC;CAAA,AApPD,CAA8B,MAAM,GAoPnC;SApPY,QAAQ","sourcesContent":["import type { Color } from \"../util/Color\";\nimport type { Pattern } from \"../render/patterns/Pattern\";\nimport type { Gradient } from \"../render/gradients/Gradient\";\n\nimport { PicturePattern } from \"../render/patterns/PicturePattern\";\nimport { ISpriteSettings, ISpritePrivate, ISpriteEvents, Sprite } from \"./Sprite\";\nimport { IGraphics, BlendMode } from \"./backend/Renderer\";\n\nimport * as $type from \"../util/Type\";\nimport * as $array from \"../util/Array\";\n\n\nexport const visualSettings = [\"fill\", \"fillOpacity\", \"stroke\", \"strokeWidth\", \"strokeOpacity\", \"fillPattern\", \"strokePattern\", \"fillGradient\", \"strokeGradient\", \"strokeDasharray\", \"strokeDashoffset\"];\n\nexport interface IGraphicsSettings extends ISpriteSettings {\n\n\t/**\n\t * Fill color.\n\t *\n\t * @see {@link https://www.amcharts.com/docs/v5/concepts/colors-gradients-and-patterns/} for more information\n\t */\n\tfill?: Color;\n\n\t/**\n\t * Stroke (border or line) color.\n\t *\n\t * @see {@link https://www.amcharts.com/docs/v5/concepts/colors-gradients-and-patterns/} for more information\n\t */\n\tstroke?: Color;\n\n\t/**\n\t * Fill pattern.\n\t *\n\t * @see {@link https://www.amcharts.com/docs/v5/concepts/colors-gradients-and-patterns/patterns/} for more information\n\t */\n\tfillPattern?: Pattern;\n\n\t/**\n\t * Stroke (border or line) pattern.\n\t *\n\t * @see {@link https://www.amcharts.com/docs/v5/concepts/colors-gradients-and-patterns/patterns/} for more information\n\t */\n\tstrokePattern?: Pattern;\n\n\t/**\n\t * Fill gradient.\n\t *\n\t * @see {@link https://www.amcharts.com/docs/v5/concepts/colors-gradients-and-patterns/gradients/} for more information\n\t */\n\tfillGradient?: Gradient;\n\n\t/**\n\t * Stroke (border or line) gradient.\n\t *\n\t * @see {@link https://www.amcharts.com/docs/v5/concepts/colors-gradients-and-patterns/gradients/} for more information\n\t */\n\tstrokeGradient?: Gradient;\n\n\t/**\n\t * Stroke (border or line) dash settings.\n\t *\n\t * @see {@link https://www.amcharts.com/docs/v5/concepts/colors-gradients-and-patterns/#Dashed_lines} for more information\n\t */\n\tstrokeDasharray?: number[] | number;\n\n\t/**\n\t * Stroke (border or line) dash offset.\n\t *\n\t * @see {@link https://www.amcharts.com/docs/v5/concepts/colors-gradients-and-patterns/#Dashed_lines} for more information\n\t */\n\tstrokeDashoffset?: number;\n\n\t/**\n\t * Opacity of the fill. 0 - fully transparent; 1 - fully opaque.\n\t */\n\tfillOpacity?: number;\n\n\t/**\n\t * Opacity of the stroke (border or line). 0 - fully transparent; 1 - fully opaque.\n\t */\n\tstrokeOpacity?: number;\n\n\t/**\n\t * Width of the stroke (border or line) in pixels.\n\t */\n\tstrokeWidth?: number;\n\n\t/**\n\t * Drawing function.\n\t *\n\t * Must use renderer (`display` parameter) methods to draw.\n\t *\n\t * @see {@link https://www.amcharts.com/docs/v5/concepts/common-elements/graphics/#Custom_draw_functions} for more info\n\t */\n\tdraw?: (display: IGraphics, graphics: Graphics) => void;\n\n\t/**\n\t * Rendering mode.\n\t *\n\t * @default BlendMode.NORMAL (\"source-over\")\n\t * @see {@link https://developer.mozilla.org/en-US/docs/Web/API/CanvasRenderingContext2D/globalCompositeOperation} for more information\n\t * @ignore\n\t */\n\tblendMode?: BlendMode;\n\n\t/**\n\t * Draw a shape using an SVG path.\n\t *\n\t * @see {@link https://developer.mozilla.org/en-US/docs/Web/SVG/Tutorial/Paths} for more information\n\t */\n\tsvgPath?: string;\n\n\t/**\n\t * Color of the element's shadow.\n\t *\n\t * For this to work at least one of the following needs to be set as well:\n\t * `shadowBlur`, `shadowOffsetX`, `shadowOffsetY`.\n\t *\n\t * @see {@link https://www.amcharts.com/docs/v5/concepts/colors-gradients-and-patterns/shadows/} for more info\n\t */\n\tshadowColor?: Color | null;\n\n\t/**\n\t * Blurriness of the the shadow.\n\t *\n\t * The bigger the number, the more blurry shadow will be.\n\t *\n\t * @see {@link https://www.amcharts.com/docs/v5/concepts/colors-gradients-and-patterns/shadows/} for more info\n\t */\n\tshadowBlur?: number;\n\n\t/**\n\t * Horizontal shadow offset in pixels.\n\t *\n\t * @see {@link https://www.amcharts.com/docs/v5/concepts/colors-gradients-and-patterns/shadows/} for more info\n\t */\n\tshadowOffsetX?: number;\n\n\t/**\n\t * Vertical shadow offset in pixels.\n\t *\n\t * @see {@link https://www.amcharts.com/docs/v5/concepts/colors-gradients-and-patterns/shadows/} for more info\n\t */\n\tshadowOffsetY?: number;\n\n\t/**\n\t * Opacity of the shadow (0-1).\n\t *\n\t * If not set, will use the same as `fillOpacity` of the element.\n\t *\n\t * @see {@link https://www.amcharts.com/docs/v5/concepts/colors-gradients-and-patterns/shadows/} for more info\n\t */\n\tshadowOpacity?: number;\n\n\t/**\n\t * A method to be used on anchor points (joints) of the multi-point line.\n\t *\n\t * @see {@link https://developer.mozilla.org/en-US/docs/Web/API/CanvasRenderingContext2D/lineJoin} for more info\n\t * @default \"miter\"\n\t * @since 5.2.10\n\t */\n\tlineJoin?: \"miter\" | \"round\" | \"bevel\";\n\n}\n\nexport interface IGraphicsPrivate extends ISpritePrivate {\n}\n\nexport interface IGraphicsEvents extends ISpriteEvents {\n}\n\n/**\n * Base class used for drawing shapes.\n *\n * @see {@link https://www.amcharts.com/docs/v5/concepts/common-elements/graphics/} for more info\n * @important\n */\nexport class Graphics extends Sprite {\n\n\tdeclare public _settings: IGraphicsSettings;\n\tdeclare public _privateSettings: IGraphicsPrivate;\n\tdeclare public _events: IGraphicsEvents;\n\n\tpublic _display: IGraphics = this._root._renderer.makeGraphics();\n\n\tprotected _clear = false;\n\n\tpublic static className: string = \"Graphics\";\n\tpublic static classNames: Array<string> = Sprite.classNames.concat([Graphics.className]);\n\n\tpublic _beforeChanged() {\n\t\tsuper._beforeChanged();\n\n\t\tif (this.isDirty(\"draw\") || this.isDirty(\"svgPath\")) {\n\t\t\tthis.markDirtyBounds();\n\t\t}\n\n\t\tif (this.isDirty(\"fill\") || this.isDirty(\"stroke\") || this.isDirty(\"visible\") || this.isDirty(\"forceHidden\") || this.isDirty(\"fillGradient\") || this.isDirty(\"strokeGradient\") || this.isDirty(\"fillPattern\") || this.isDirty(\"strokePattern\") || this.isDirty(\"fillOpacity\") || this.isDirty(\"strokeOpacity\") || this.isDirty(\"strokeWidth\") || this.isDirty(\"draw\") || this.isDirty(\"blendMode\") || this.isDirty(\"strokeDasharray\") || this.isDirty(\"strokeDashoffset\") || this.isDirty(\"svgPath\") || this.isDirty(\"lineJoin\") || this.isDirty(\"shadowColor\") || this.isDirty(\"shadowBlur\") || this.isDirty(\"shadowOffsetX\") || this.isDirty(\"shadowOffsetY\")) {\n\t\t\tthis._clear = true;\n\t\t}\n\n\t\tif (this.isDirty(\"fillGradient\")) {\n\t\t\tconst gradient = this.get(\"fillGradient\");\n\t\t\tif (gradient) {\n\t\t\t\tthis._display.isMeasured = true;\n\t\t\t\tconst gradientTarget = gradient.get(\"target\");\n\t\t\t\tif (gradientTarget) {\n\t\t\t\t\tthis._disposers.push(gradientTarget.events.on(\"boundschanged\", () => {\n\t\t\t\t\t\tthis._markDirtyKey(\"fill\");\n\t\t\t\t\t}))\n\t\t\t\t\tthis._disposers.push(\n\t\t\t\t\t\tgradientTarget.events.on(\"positionchanged\", () => {\n\t\t\t\t\t\t\tthis._markDirtyKey(\"fill\");\n\t\t\t\t\t\t}))\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tif (this.isDirty(\"strokeGradient\")) {\n\t\t\tconst gradient = this.get(\"strokeGradient\");\n\t\t\tif (gradient) {\n\t\t\t\tthis._display.isMeasured = true;\n\t\t\t\tconst gradientTarget = gradient.get(\"target\");\n\t\t\t\tif (gradientTarget) {\n\t\t\t\t\tthis._disposers.push(\n\t\t\t\t\t\tgradientTarget.events.on(\"boundschanged\", () => {\n\t\t\t\t\t\t\tthis._markDirtyKey(\"stroke\");\n\t\t\t\t\t\t}))\n\t\t\t\t\tthis._disposers.push(\n\t\t\t\t\t\tgradientTarget.events.on(\"positionchanged\", () => {\n\t\t\t\t\t\t\tthis._markDirtyKey(\"stroke\");\n\t\t\t\t\t\t}))\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\tpublic _changed() {\n\t\tsuper._changed();\n\n\t\tif (this._clear) {\n\t\t\tthis.markDirtyBounds();\n\t\t\tthis.markDirtyLayer();\n\t\t\tthis._display.clear();\n\n\t\t\tlet strokeDasharray = this.get(\"strokeDasharray\");\n\t\t\tif ($type.isNumber(strokeDasharray)) {\n\t\t\t\tif (strokeDasharray < 0.5) {\n\t\t\t\t\tstrokeDasharray = [0];\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tstrokeDasharray = [strokeDasharray]\n\t\t\t\t}\n\t\t\t}\n\t\t\tthis._display.setLineDash(strokeDasharray as number[]);\n\n\t\t\tconst strokeDashoffset = this.get(\"strokeDashoffset\");\n\t\t\tif (strokeDashoffset) {\n\t\t\t\tthis._display.setLineDashOffset(strokeDashoffset);\n\t\t\t}\n\n\t\t\tconst blendMode = this.get(\"blendMode\", BlendMode.NORMAL);\n\t\t\tthis._display.blendMode = blendMode;\n\n\t\t\tconst draw = this.get(\"draw\");\n\t\t\tif (draw) {\n\t\t\t\tdraw(this._display, this);\n\t\t\t}\n\n\t\t\tconst svgPath = this.get(\"svgPath\");\n\t\t\tif (svgPath != null) {\n\t\t\t\tthis._display.svgPath(svgPath!);\n\t\t\t}\n\t\t}\n\t}\n\n\tpublic _afterChanged() {\n\t\tsuper._afterChanged();\n\n\t\tif (this._clear) {\n\t\t\tconst fill = this.get(\"fill\");\n\t\t\tconst fillGradient = this.get(\"fillGradient\");\n\t\t\tconst fillPattern = this.get(\"fillPattern\");\n\t\t\tconst fillOpacity = this.get(\"fillOpacity\");\n\n\t\t\tconst stroke = this.get(\"stroke\");\n\t\t\tconst strokeGradient = this.get(\"strokeGradient\");\n\t\t\tconst strokePattern = this.get(\"strokePattern\");\n\n\t\t\tconst shadowColor = this.get(\"shadowColor\");\n\t\t\tconst shadowBlur = this.get(\"shadowBlur\");\n\t\t\tconst shadowOffsetX = this.get(\"shadowOffsetX\");\n\t\t\tconst shadowOffsetY = this.get(\"shadowOffsetY\");\n\t\t\tconst shadowOpacity = this.get(\"shadowOpacity\");\n\n\t\t\t//const bounds = this._display.getLocalBounds();\n\n\t\t\tif (shadowColor && (shadowBlur || shadowOffsetX || shadowOffsetY)) {\n\t\t\t\tthis._display.shadow(shadowColor, shadowBlur, shadowOffsetX, shadowOffsetY, shadowOpacity);\n\t\t\t}\n\n\t\t\tif (fillPattern) {\n\t\t\t\tlet changed = false;\n\t\t\t\tif (fill && (!fillPattern.get(\"fill\") || fillPattern.get(\"fillInherited\"))) {\n\t\t\t\t\tfillPattern.set(\"fill\", fill);\n\t\t\t\t\tfillPattern.set(\"fillInherited\", true)\n\t\t\t\t\tchanged = true;\n\t\t\t\t}\n\t\t\t\tif (stroke && (!fillPattern.get(\"color\") || fillPattern.get(\"colorInherited\"))) {\n\t\t\t\t\tfillPattern.set(\"color\", stroke);\n\t\t\t\t\tfillPattern.set(\"colorInherited\", true)\n\t\t\t\t\tchanged = true;\n\t\t\t\t}\n\t\t\t\tif (changed) {\n\t\t\t\t\t// @todo: is this OK?\n\t\t\t\t\tfillPattern._changed();\n\t\t\t\t}\n\t\t\t\tconst pattern = fillPattern.pattern;\n\t\t\t\tif (pattern) {\n\t\t\t\t\tthis._display.beginFill(pattern, fillOpacity);\n\t\t\t\t\tthis._display.endFill();\n\n\t\t\t\t\tif (fillPattern instanceof PicturePattern) {\n\t\t\t\t\t\tfillPattern.events.once(\"loaded\", () => {\n\t\t\t\t\t\t\tthis._clear = true;\n\t\t\t\t\t\t\tthis.markDirty();\n\t\t\t\t\t\t});\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\telse if (fillGradient) {\n\t\t\t\tif (fill) {\n\t\t\t\t\tconst stops = fillGradient.get(\"stops\", []);\n\t\t\t\t\tif (stops.length) {\n\t\t\t\t\t\t$array.each(stops, (stop: any) => {\n\t\t\t\t\t\t\tif ((!stop.color || stop.colorInherited) && fill) {\n\t\t\t\t\t\t\t\tstop.color = fill;\n\t\t\t\t\t\t\t\tstop.colorInherited = true;\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\tif (stop.opacity == null || stop.opacityInherited) {\n\t\t\t\t\t\t\t\tstop.opacity = fillOpacity;\n\t\t\t\t\t\t\t\tstop.opacityInherited = true;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t})\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tconst gradient = fillGradient.getFill(this);\n\t\t\t\tif (gradient) {\n\t\t\t\t\tthis._display.beginFill(gradient, fillOpacity);\n\t\t\t\t\tthis._display.endFill();\n\t\t\t\t}\n\t\t\t}\n\t\t\telse if (fill) {\n\t\t\t\tthis._display.beginFill(fill, fillOpacity);\n\t\t\t\tthis._display.endFill();\n\t\t\t}\n\n\t\t\tif (stroke || strokeGradient || strokePattern) {\n\t\t\t\tconst strokeOpacity = this.get(\"strokeOpacity\");\n\t\t\t\tconst strokeWidth = this.get(\"strokeWidth\", 1);\n\t\t\t\tconst lineJoin = this.get(\"lineJoin\");\n\n\t\t\t\tif (strokePattern) {\n\t\t\t\t\tlet changed = false;\n\t\t\t\t\tif (stroke && (!strokePattern.get(\"color\") || strokePattern.get(\"colorInherited\"))) {\n\t\t\t\t\t\tstrokePattern.set(\"color\", stroke);\n\t\t\t\t\t\tstrokePattern.set(\"colorInherited\", true);\n\t\t\t\t\t\tchanged = true;\n\t\t\t\t\t}\n\t\t\t\t\tif (changed) {\n\t\t\t\t\t\t// @todo: is this OK?\n\t\t\t\t\t\tstrokePattern._changed();\n\t\t\t\t\t}\n\t\t\t\t\tconst pattern = strokePattern.pattern;\n\t\t\t\t\tif (pattern) {\n\t\t\t\t\t\tthis._display.lineStyle(strokeWidth, pattern, strokeOpacity, lineJoin);\n\t\t\t\t\t\tthis._display.endStroke();\n\n\t\t\t\t\t\tif (strokePattern instanceof PicturePattern) {\n\t\t\t\t\t\t\tstrokePattern.events.once(\"loaded\", () => {\n\t\t\t\t\t\t\t\tthis._clear = true;\n\t\t\t\t\t\t\t\tthis.markDirty();\n\t\t\t\t\t\t\t});\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telse if (strokeGradient) {\n\n\t\t\t\t\tconst stops = strokeGradient.get(\"stops\", []);\n\t\t\t\t\tif (stops.length) {\n\t\t\t\t\t\t$array.each(stops, (stop: any) => {\n\t\t\t\t\t\t\tif ((!stop.color || stop.colorInherited) && stroke) {\n\t\t\t\t\t\t\t\tstop.color = stroke;\n\t\t\t\t\t\t\t\tstop.colorInherited = true;\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\tif (stop.opacity == null || stop.opacityInherited) {\n\t\t\t\t\t\t\t\tstop.opacity = strokeOpacity;\n\t\t\t\t\t\t\t\tstop.opacityInherited = true;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t})\n\t\t\t\t\t}\n\n\t\t\t\t\tconst gradient = strokeGradient.getFill(this);\n\t\t\t\t\tif (gradient) {\n\t\t\t\t\t\tthis._display.lineStyle(strokeWidth, gradient, strokeOpacity, lineJoin);\n\t\t\t\t\t\tthis._display.endStroke();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telse if (stroke) {\n\t\t\t\t\tthis._display.lineStyle(strokeWidth, stroke, strokeOpacity, lineJoin);\n\t\t\t\t\tthis._display.endStroke();\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t}\n\t\tthis._clear = false;\n\t}\n\n}\n"]}
|
|
1
|
+
{"version":3,"file":"Graphics.js","sourceRoot":"","sources":["../../../../../src/.internal/core/render/Graphics.ts"],"names":[],"mappings":";AAIA,OAAO,EAAE,cAAc,EAAE,MAAM,mCAAmC,CAAC;AACnE,OAAO,EAAkD,MAAM,EAAE,MAAM,UAAU,CAAC;AAClF,OAAO,EAAa,SAAS,EAAE,MAAM,oBAAoB,CAAC;AAE1D,OAAO,KAAK,KAAK,MAAM,cAAc,CAAC;AACtC,OAAO,KAAK,MAAM,MAAM,eAAe,CAAC;AAGxC,MAAM,CAAC,IAAM,cAAc,GAAG,CAAC,MAAM,EAAE,aAAa,EAAE,QAAQ,EAAE,aAAa,EAAE,eAAe,EAAE,aAAa,EAAE,eAAe,EAAE,cAAc,EAAE,gBAAgB,EAAE,iBAAiB,EAAE,kBAAkB,CAAC,CAAC;AAqKzM;;;;;GAKG;AACH;IAA8B,4BAAM;IAApC;QAAA,qEAwPC;QAlPA;;;;mBAA6B,KAAI,CAAC,KAAK,CAAC,SAAS,CAAC,YAAY,EAAE;WAAC;QAEjE;;;;mBAAmB,KAAK;WAAC;;IAgP1B,CAAC;;;;;eA3OA;YAAA,iBA6CC;YA5CA,iBAAM,cAAc,WAAE,CAAC;YAEvB,IAAI,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC,IAAI,IAAI,CAAC,OAAO,CAAC,SAAS,CAAC,EAAE;gBACpD,IAAI,CAAC,eAAe,EAAE,CAAC;aACvB;YAED,IAAI,IAAI,CAAC,OAAO,CAAC,MAAM,C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CAC7B,IAAI,CAAC,gBAAgB,GAAG,IAAI,CAAC;iCAC7B;4BACF,CAAC,CAAC,CAAA;yBACF;wBAED,IAAM,QAAQ,GAAG,cAAc,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC;wBAC9C,IAAI,QAAQ,EAAE;4BACb,IAAI,CAAC,QAAQ,CAAC,SAAS,CAAC,WAAW,EAAE,QAAQ,EAAE,eAAa,EAAE,QAAQ,CAAC,CAAC;4BACxE,IAAI,CAAC,QAAQ,CAAC,SAAS,EAAE,CAAC;yBAC1B;qBACD;yBACI,IAAI,QAAM,EAAE;wBAChB,IAAI,CAAC,QAAQ,CAAC,SAAS,CAAC,WAAW,EAAE,QAAM,EAAE,eAAa,EAAE,QAAQ,CAAC,CAAC;wBACtE,IAAI,CAAC,QAAQ,CAAC,SAAS,EAAE,CAAC;qBAC1B;iBAED;aAED;YACD,IAAI,CAAC,MAAM,GAAG,KAAK,CAAC;QACrB,CAAC;;IA5OD;;;;eAAkC,UAAU;OAAC;IAC7C;;;;eAA0C,MAAM,CAAC,UAAU,CAAC,MAAM,CAAC,CAAC,QAAQ,CAAC,SAAS,CAAC,CAAC;OAAC;IA6O1F,eAAC;CAAA,AAxPD,CAA8B,MAAM,GAwPnC;SAxPY,QAAQ","sourcesContent":["import type { Color } from \"../util/Color\";\nimport type { Pattern } from \"../render/patterns/Pattern\";\nimport type { Gradient } from \"../render/gradients/Gradient\";\n\nimport { PicturePattern } from \"../render/patterns/PicturePattern\";\nimport { ISpriteSettings, ISpritePrivate, ISpriteEvents, Sprite } from \"./Sprite\";\nimport { IGraphics, BlendMode } from \"./backend/Renderer\";\n\nimport * as $type from \"../util/Type\";\nimport * as $array from \"../util/Array\";\n\n\nexport const visualSettings = [\"fill\", \"fillOpacity\", \"stroke\", \"strokeWidth\", \"strokeOpacity\", \"fillPattern\", \"strokePattern\", \"fillGradient\", \"strokeGradient\", \"strokeDasharray\", \"strokeDashoffset\"];\n\nexport interface IGraphicsSettings extends ISpriteSettings {\n\n\t/**\n\t * Fill color.\n\t *\n\t * @see {@link https://www.amcharts.com/docs/v5/concepts/colors-gradients-and-patterns/} for more information\n\t */\n\tfill?: Color;\n\n\t/**\n\t * Stroke (border or line) color.\n\t *\n\t * @see {@link https://www.amcharts.com/docs/v5/concepts/colors-gradients-and-patterns/} for more information\n\t */\n\tstroke?: Color;\n\n\t/**\n\t * Fill pattern.\n\t *\n\t * @see {@link https://www.amcharts.com/docs/v5/concepts/colors-gradients-and-patterns/patterns/} for more information\n\t */\n\tfillPattern?: Pattern;\n\n\t/**\n\t * Stroke (border or line) pattern.\n\t *\n\t * @see {@link https://www.amcharts.com/docs/v5/concepts/colors-gradients-and-patterns/patterns/} for more information\n\t */\n\tstrokePattern?: Pattern;\n\n\t/**\n\t * Fill gradient.\n\t *\n\t * @see {@link https://www.amcharts.com/docs/v5/concepts/colors-gradients-and-patterns/gradients/} for more information\n\t */\n\tfillGradient?: Gradient;\n\n\t/**\n\t * Stroke (border or line) gradient.\n\t *\n\t * @see {@link https://www.amcharts.com/docs/v5/concepts/colors-gradients-and-patterns/gradients/} for more information\n\t */\n\tstrokeGradient?: Gradient;\n\n\t/**\n\t * Stroke (border or line) dash settings.\n\t *\n\t * @see {@link https://www.amcharts.com/docs/v5/concepts/colors-gradients-and-patterns/#Dashed_lines} for more information\n\t */\n\tstrokeDasharray?: number[] | number;\n\n\t/**\n\t * Stroke (border or line) dash offset.\n\t *\n\t * @see {@link https://www.amcharts.com/docs/v5/concepts/colors-gradients-and-patterns/#Dashed_lines} for more information\n\t */\n\tstrokeDashoffset?: number;\n\n\t/**\n\t * Opacity of the fill. 0 - fully transparent; 1 - fully opaque.\n\t */\n\tfillOpacity?: number;\n\n\t/**\n\t * Opacity of the stroke (border or line). 0 - fully transparent; 1 - fully opaque.\n\t */\n\tstrokeOpacity?: number;\n\n\t/**\n\t * Width of the stroke (border or line) in pixels.\n\t */\n\tstrokeWidth?: number;\n\n\t/**\n\t * Indicates if stroke of a Graphics should stay the same when it's scale changes. Note, this doesn't take into account parent container scale changes.\n\t * @default false\n\t */\n\tnonScalingStroke?: boolean;\n\n\t/**\n\t * Drawing function.\n\t *\n\t * Must use renderer (`display` parameter) methods to draw.\n\t *\n\t * @see {@link https://www.amcharts.com/docs/v5/concepts/common-elements/graphics/#Custom_draw_functions} for more info\n\t */\n\tdraw?: (display: IGraphics, graphics: Graphics) => void;\n\n\t/**\n\t * Rendering mode.\n\t *\n\t * @default BlendMode.NORMAL (\"source-over\")\n\t * @see {@link https://developer.mozilla.org/en-US/docs/Web/API/CanvasRenderingContext2D/globalCompositeOperation} for more information\n\t * @ignore\n\t */\n\tblendMode?: BlendMode;\n\n\t/**\n\t * Draw a shape using an SVG path.\n\t *\n\t * @see {@link https://developer.mozilla.org/en-US/docs/Web/SVG/Tutorial/Paths} for more information\n\t */\n\tsvgPath?: string;\n\n\t/**\n\t * Color of the element's shadow.\n\t *\n\t * For this to work at least one of the following needs to be set as well:\n\t * `shadowBlur`, `shadowOffsetX`, `shadowOffsetY`.\n\t *\n\t * @see {@link https://www.amcharts.com/docs/v5/concepts/colors-gradients-and-patterns/shadows/} for more info\n\t */\n\tshadowColor?: Color | null;\n\n\t/**\n\t * Blurriness of the the shadow.\n\t *\n\t * The bigger the number, the more blurry shadow will be.\n\t *\n\t * @see {@link https://www.amcharts.com/docs/v5/concepts/colors-gradients-and-patterns/shadows/} for more info\n\t */\n\tshadowBlur?: number;\n\n\t/**\n\t * Horizontal shadow offset in pixels.\n\t *\n\t * @see {@link https://www.amcharts.com/docs/v5/concepts/colors-gradients-and-patterns/shadows/} for more info\n\t */\n\tshadowOffsetX?: number;\n\n\t/**\n\t * Vertical shadow offset in pixels.\n\t *\n\t * @see {@link https://www.amcharts.com/docs/v5/concepts/colors-gradients-and-patterns/shadows/} for more info\n\t */\n\tshadowOffsetY?: number;\n\n\t/**\n\t * Opacity of the shadow (0-1).\n\t *\n\t * If not set, will use the same as `fillOpacity` of the element.\n\t *\n\t * @see {@link https://www.amcharts.com/docs/v5/concepts/colors-gradients-and-patterns/shadows/} for more info\n\t */\n\tshadowOpacity?: number;\n\n\t/**\n\t * A method to be used on anchor points (joints) of the multi-point line.\n\t *\n\t * @see {@link https://developer.mozilla.org/en-US/docs/Web/API/CanvasRenderingContext2D/lineJoin} for more info\n\t * @default \"miter\"\n\t * @since 5.2.10\n\t */\n\tlineJoin?: \"miter\" | \"round\" | \"bevel\";\n\n}\n\nexport interface IGraphicsPrivate extends ISpritePrivate {\n}\n\nexport interface IGraphicsEvents extends ISpriteEvents {\n}\n\n/**\n * Base class used for drawing shapes.\n *\n * @see {@link https://www.amcharts.com/docs/v5/concepts/common-elements/graphics/} for more info\n * @important\n */\nexport class Graphics extends Sprite {\n\n\tdeclare public _settings: IGraphicsSettings;\n\tdeclare public _privateSettings: IGraphicsPrivate;\n\tdeclare public _events: IGraphicsEvents;\n\n\tpublic _display: IGraphics = this._root._renderer.makeGraphics();\n\n\tprotected _clear = false;\n\n\tpublic static className: string = \"Graphics\";\n\tpublic static classNames: Array<string> = Sprite.classNames.concat([Graphics.className]);\n\n\tpublic _beforeChanged() {\n\t\tsuper._beforeChanged();\n\n\t\tif (this.isDirty(\"draw\") || this.isDirty(\"svgPath\")) {\n\t\t\tthis.markDirtyBounds();\n\t\t}\n\n\t\tif (this.isDirty(\"fill\") || this.isDirty(\"stroke\") || this.isDirty(\"visible\") || this.isDirty(\"forceHidden\") || this.isDirty(\"scale\") || this.isDirty(\"fillGradient\") || this.isDirty(\"strokeGradient\") || this.isDirty(\"fillPattern\") || this.isDirty(\"strokePattern\") || this.isDirty(\"fillOpacity\") || this.isDirty(\"strokeOpacity\") || this.isDirty(\"strokeWidth\") || this.isDirty(\"draw\") || this.isDirty(\"blendMode\") || this.isDirty(\"strokeDasharray\") || this.isDirty(\"strokeDashoffset\") || this.isDirty(\"svgPath\") || this.isDirty(\"lineJoin\") || this.isDirty(\"shadowColor\") || this.isDirty(\"shadowBlur\") || this.isDirty(\"shadowOffsetX\") || this.isDirty(\"shadowOffsetY\")) {\n\t\t\tthis._clear = true;\n\t\t}\n\n\t\tif (this.isDirty(\"fillGradient\")) {\n\t\t\tconst gradient = this.get(\"fillGradient\");\n\t\t\tif (gradient) {\n\t\t\t\tthis._display.isMeasured = true;\n\t\t\t\tconst gradientTarget = gradient.get(\"target\");\n\t\t\t\tif (gradientTarget) {\n\t\t\t\t\tthis._disposers.push(gradientTarget.events.on(\"boundschanged\", () => {\n\t\t\t\t\t\tthis._markDirtyKey(\"fill\");\n\t\t\t\t\t}))\n\t\t\t\t\tthis._disposers.push(\n\t\t\t\t\t\tgradientTarget.events.on(\"positionchanged\", () => {\n\t\t\t\t\t\t\tthis._markDirtyKey(\"fill\");\n\t\t\t\t\t\t}))\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tif (this.isDirty(\"strokeGradient\")) {\n\t\t\tconst gradient = this.get(\"strokeGradient\");\n\t\t\tif (gradient) {\n\t\t\t\tthis._display.isMeasured = true;\n\t\t\t\tconst gradientTarget = gradient.get(\"target\");\n\t\t\t\tif (gradientTarget) {\n\t\t\t\t\tthis._disposers.push(\n\t\t\t\t\t\tgradientTarget.events.on(\"boundschanged\", () => {\n\t\t\t\t\t\t\tthis._markDirtyKey(\"stroke\");\n\t\t\t\t\t\t}))\n\t\t\t\t\tthis._disposers.push(\n\t\t\t\t\t\tgradientTarget.events.on(\"positionchanged\", () => {\n\t\t\t\t\t\t\tthis._markDirtyKey(\"stroke\");\n\t\t\t\t\t\t}))\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\tpublic _changed() {\n\t\tsuper._changed();\n\n\t\tif (this._clear) {\n\t\t\tthis.markDirtyBounds();\n\t\t\tthis.markDirtyLayer();\n\t\t\tthis._display.clear();\n\n\t\t\tlet strokeDasharray = this.get(\"strokeDasharray\");\n\t\t\tif ($type.isNumber(strokeDasharray)) {\n\t\t\t\tif (strokeDasharray < 0.5) {\n\t\t\t\t\tstrokeDasharray = [0];\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tstrokeDasharray = [strokeDasharray]\n\t\t\t\t}\n\t\t\t}\n\t\t\tthis._display.setLineDash(strokeDasharray as number[]);\n\n\t\t\tconst strokeDashoffset = this.get(\"strokeDashoffset\");\n\t\t\tif (strokeDashoffset) {\n\t\t\t\tthis._display.setLineDashOffset(strokeDashoffset);\n\t\t\t}\n\n\t\t\tconst blendMode = this.get(\"blendMode\", BlendMode.NORMAL);\n\t\t\tthis._display.blendMode = blendMode;\n\n\t\t\tconst draw = this.get(\"draw\");\n\t\t\tif (draw) {\n\t\t\t\tdraw(this._display, this);\n\t\t\t}\n\n\t\t\tconst svgPath = this.get(\"svgPath\");\n\t\t\tif (svgPath != null) {\n\t\t\t\tthis._display.svgPath(svgPath!);\n\t\t\t}\n\t\t}\n\t}\n\n\tpublic _afterChanged() {\n\t\tsuper._afterChanged();\n\n\t\tif (this._clear) {\n\t\t\tconst fill = this.get(\"fill\");\n\t\t\tconst fillGradient = this.get(\"fillGradient\");\n\t\t\tconst fillPattern = this.get(\"fillPattern\");\n\t\t\tconst fillOpacity = this.get(\"fillOpacity\");\n\n\t\t\tconst stroke = this.get(\"stroke\");\n\t\t\tconst strokeGradient = this.get(\"strokeGradient\");\n\t\t\tconst strokePattern = this.get(\"strokePattern\");\n\n\t\t\tconst shadowColor = this.get(\"shadowColor\");\n\t\t\tconst shadowBlur = this.get(\"shadowBlur\");\n\t\t\tconst shadowOffsetX = this.get(\"shadowOffsetX\");\n\t\t\tconst shadowOffsetY = this.get(\"shadowOffsetY\");\n\t\t\tconst shadowOpacity = this.get(\"shadowOpacity\");\n\n\t\t\t//const bounds = this._display.getLocalBounds();\n\n\t\t\tif (shadowColor && (shadowBlur || shadowOffsetX || shadowOffsetY)) {\n\t\t\t\tthis._display.shadow(shadowColor, shadowBlur, shadowOffsetX, shadowOffsetY, shadowOpacity);\n\t\t\t}\n\n\t\t\tif (fillPattern) {\n\t\t\t\tlet changed = false;\n\t\t\t\tif (fill && (!fillPattern.get(\"fill\") || fillPattern.get(\"fillInherited\"))) {\n\t\t\t\t\tfillPattern.set(\"fill\", fill);\n\t\t\t\t\tfillPattern.set(\"fillInherited\", true)\n\t\t\t\t\tchanged = true;\n\t\t\t\t}\n\t\t\t\tif (stroke && (!fillPattern.get(\"color\") || fillPattern.get(\"colorInherited\"))) {\n\t\t\t\t\tfillPattern.set(\"color\", stroke);\n\t\t\t\t\tfillPattern.set(\"colorInherited\", true)\n\t\t\t\t\tchanged = true;\n\t\t\t\t}\n\t\t\t\tif (changed) {\n\t\t\t\t\t// @todo: is this OK?\n\t\t\t\t\tfillPattern._changed();\n\t\t\t\t}\n\t\t\t\tconst pattern = fillPattern.pattern;\n\t\t\t\tif (pattern) {\n\t\t\t\t\tthis._display.beginFill(pattern, fillOpacity);\n\t\t\t\t\tthis._display.endFill();\n\n\t\t\t\t\tif (fillPattern instanceof PicturePattern) {\n\t\t\t\t\t\tfillPattern.events.once(\"loaded\", () => {\n\t\t\t\t\t\t\tthis._clear = true;\n\t\t\t\t\t\t\tthis.markDirty();\n\t\t\t\t\t\t});\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\telse if (fillGradient) {\n\t\t\t\tif (fill) {\n\t\t\t\t\tconst stops = fillGradient.get(\"stops\", []);\n\t\t\t\t\tif (stops.length) {\n\t\t\t\t\t\t$array.each(stops, (stop: any) => {\n\t\t\t\t\t\t\tif ((!stop.color || stop.colorInherited) && fill) {\n\t\t\t\t\t\t\t\tstop.color = fill;\n\t\t\t\t\t\t\t\tstop.colorInherited = true;\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\tif (stop.opacity == null || stop.opacityInherited) {\n\t\t\t\t\t\t\t\tstop.opacity = fillOpacity;\n\t\t\t\t\t\t\t\tstop.opacityInherited = true;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t})\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tconst gradient = fillGradient.getFill(this);\n\t\t\t\tif (gradient) {\n\t\t\t\t\tthis._display.beginFill(gradient, fillOpacity);\n\t\t\t\t\tthis._display.endFill();\n\t\t\t\t}\n\t\t\t}\n\t\t\telse if (fill) {\n\t\t\t\tthis._display.beginFill(fill, fillOpacity);\n\t\t\t\tthis._display.endFill();\n\t\t\t}\n\n\t\t\tif (stroke || strokeGradient || strokePattern) {\n\t\t\t\tconst strokeOpacity = this.get(\"strokeOpacity\");\n\t\t\t\tlet strokeWidth = this.get(\"strokeWidth\", 1);\n\n\t\t\t\tif (this.get(\"nonScalingStroke\")) {\n\t\t\t\t\tstrokeWidth = strokeWidth / this.get(\"scale\", 1)\n\t\t\t\t}\n\t\t\t\tconst lineJoin = this.get(\"lineJoin\");\n\n\t\t\t\tif (strokePattern) {\n\t\t\t\t\tlet changed = false;\n\t\t\t\t\tif (stroke && (!strokePattern.get(\"color\") || strokePattern.get(\"colorInherited\"))) {\n\t\t\t\t\t\tstrokePattern.set(\"color\", stroke);\n\t\t\t\t\t\tstrokePattern.set(\"colorInherited\", true);\n\t\t\t\t\t\tchanged = true;\n\t\t\t\t\t}\n\t\t\t\t\tif (changed) {\n\t\t\t\t\t\t// @todo: is this OK?\n\t\t\t\t\t\tstrokePattern._changed();\n\t\t\t\t\t}\n\t\t\t\t\tconst pattern = strokePattern.pattern;\n\t\t\t\t\tif (pattern) {\n\t\t\t\t\t\tthis._display.lineStyle(strokeWidth, pattern, strokeOpacity, lineJoin);\n\t\t\t\t\t\tthis._display.endStroke();\n\n\t\t\t\t\t\tif (strokePattern instanceof PicturePattern) {\n\t\t\t\t\t\t\tstrokePattern.events.once(\"loaded\", () => {\n\t\t\t\t\t\t\t\tthis._clear = true;\n\t\t\t\t\t\t\t\tthis.markDirty();\n\t\t\t\t\t\t\t});\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telse if (strokeGradient) {\n\n\t\t\t\t\tconst stops = strokeGradient.get(\"stops\", []);\n\t\t\t\t\tif (stops.length) {\n\t\t\t\t\t\t$array.each(stops, (stop: any) => {\n\t\t\t\t\t\t\tif ((!stop.color || stop.colorInherited) && stroke) {\n\t\t\t\t\t\t\t\tstop.color = stroke;\n\t\t\t\t\t\t\t\tstop.colorInherited = true;\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\tif (stop.opacity == null || stop.opacityInherited) {\n\t\t\t\t\t\t\t\tstop.opacity = strokeOpacity;\n\t\t\t\t\t\t\t\tstop.opacityInherited = true;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t})\n\t\t\t\t\t}\n\n\t\t\t\t\tconst gradient = strokeGradient.getFill(this);\n\t\t\t\t\tif (gradient) {\n\t\t\t\t\t\tthis._display.lineStyle(strokeWidth, gradient, strokeOpacity, lineJoin);\n\t\t\t\t\t\tthis._display.endStroke();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telse if (stroke) {\n\t\t\t\t\tthis._display.lineStyle(strokeWidth, stroke, strokeOpacity, lineJoin);\n\t\t\t\t\tthis._display.endStroke();\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t}\n\t\tthis._clear = false;\n\t}\n\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PointedRectangle.d.ts","sourceRoot":"","sources":["../../../../../src/.internal/core/render/PointedRectangle.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,iBAAiB,EAAE,gBAAgB,EAAE,MAAM,YAAY,CAAC;AAG3E,MAAM,WAAW,yBAA0B,SAAQ,iBAAiB;IAEnE;;OAEG;IACH,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAE1B;;OAEG;IACH,aAAa,CAAC,EAAE,MAAM,CAAC;IAEvB;;OAEG;IACH,QAAQ,CAAC,EAAE,MAAM,CAAC;IAElB;;OAEG;IACH,QAAQ,CAAC,EAAE,MAAM,CAAC;IAElB;;OAEG;IACH,YAAY,CAAC,EAAE,MAAM,CAAC;CACtB;AAED,MAAM,WAAW,wBAAyB,SAAQ,gBAAgB;CACjE;AAED;;;;;GAKG;AACH,qBAAa,gBAAiB,SAAQ,QAAQ;IAE9B,SAAS,EAAE,yBAAyB,CAAC;IACrC,gBAAgB,EAAE,wBAAwB,CAAC;IAE1D,OAAc,SAAS,EAAE,MAAM,CAAsB;IACrD,OAAc,UAAU,EAAE,KAAK,CAAC,MAAM,CAAC,CAA4D;IAE5F,cAAc;IAQd,QAAQ;
|
|
1
|
+
{"version":3,"file":"PointedRectangle.d.ts","sourceRoot":"","sources":["../../../../../src/.internal/core/render/PointedRectangle.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,iBAAiB,EAAE,gBAAgB,EAAE,MAAM,YAAY,CAAC;AAG3E,MAAM,WAAW,yBAA0B,SAAQ,iBAAiB;IAEnE;;OAEG;IACH,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAE1B;;OAEG;IACH,aAAa,CAAC,EAAE,MAAM,CAAC;IAEvB;;OAEG;IACH,QAAQ,CAAC,EAAE,MAAM,CAAC;IAElB;;OAEG;IACH,QAAQ,CAAC,EAAE,MAAM,CAAC;IAElB;;OAEG;IACH,YAAY,CAAC,EAAE,MAAM,CAAC;CACtB;AAED,MAAM,WAAW,wBAAyB,SAAQ,gBAAgB;CACjE;AAED;;;;;GAKG;AACH,qBAAa,gBAAiB,SAAQ,QAAQ;IAE9B,SAAS,EAAE,yBAAyB,CAAC;IACrC,gBAAgB,EAAE,wBAAwB,CAAC;IAE1D,OAAc,SAAS,EAAE,MAAM,CAAsB;IACrD,OAAc,UAAU,EAAE,KAAK,CAAC,MAAM,CAAC,CAA4D;IAE5F,cAAc;IAQd,QAAQ;CA8Ff"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PointedRectangle.js","sourceRoot":"","sources":["../../../../../src/.internal/core/render/PointedRectangle.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,QAAQ,EAAuC,MAAM,YAAY,CAAC;AAC3E,OAAO,KAAK,KAAK,MAAM,cAA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K,CAAC,UAAU,CAAC,CAAC,EAAE,CAAC,QAAQ,EAAE,CAAC,CAAC,CAAC;wBACtC,OAAO,CAAC,MAAM,CAAC,CAAC,EAAE,CAAC,GAAG,EAAE,CAAC,CAAC;wBAC1B,OAAO,CAAC,MAAM,CAAC,CAAC,EAAE,KAAK,GAAG,GAAG,CAAC,CAAC;wBAC/B,OAAO,CAAC,MAAM,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;wBACrB,OAAO,CAAC,MAAM,CAAC,CAAC,EAAE,IAAI,CAAC,GAAG,CAAC,KAAK,GAAG,GAAG,EAAE,EAAE,CAAC,CAAC,CAAC;qBAC7C;oBACD,OAAO,CAAC,MAAM,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC;oBACtB,OAAO,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC;oBAC/B,OAAO,CAAC,SAAS,EAAE,CAAC;iBACpB;aACD;QACF,CAAC;;IAxGD;;;;eAAkC,kBAAkB;OAAC;IACrD;;;;eAA0C,QAAQ,CAAC,UAAU,CAAC,MAAM,CAAC,CAAC,gBAAgB,CAAC,SAAS,CAAC,CAAC;OAAC;IAwGpG,uBAAC;CAAA,AA9GD,CAAsC,QAAQ,GA8G7C;SA9GY,gBAAgB","sourcesContent":["import { Graphics, IGraphicsSettings, IGraphicsPrivate } from \"./Graphics\";\nimport * as $math from \"../util/Math\";\n\nexport interface IPointedRectangleSettings extends IGraphicsSettings {\n\n\t/**\n\t * A width of the pinter's (stem's) thick end (base) in pixels.\n\t */\n\tpointerBaseWidth?: number;\n\n\t/**\n\t * A length of the pinter (stem) in pixels.\n\t */\n\tpointerLength?: number;\n\n\t/**\n\t * X coordinate the shape is pointing to.\n\t */\n\tpointerX?: number;\n\n\t/**\n\t * Y coordinate the shape is pointing to.\n\t */\n\tpointerY?: number;\n\n\t/**\n\t * Corner radius in pixels.\n\t */\n\tcornerRadius?: number;\n}\n\nexport interface IPointedRectanglePrivate extends IGraphicsPrivate {\n}\n\n/**\n * Draws a rectangle with a pointer.\n *\n * @see {@link https://www.amcharts.com/docs/v5/concepts/common-elements/graphics/} for more info\n * @important\n */\nexport class PointedRectangle extends Graphics {\n\n\tdeclare public _settings: IPointedRectangleSettings;\n\tdeclare public _privateSettings: IPointedRectanglePrivate;\n\n\tpublic static className: string = \"PointedRectangle\";\n\tpublic static classNames: Array<string> = Graphics.classNames.concat([PointedRectangle.className]);\n\n\tpublic _beforeChanged() {\n\t\tsuper._beforeChanged();\n\n\t\tif (this.isDirty(\"pointerBaseWidth\") || this.isDirty(\"cornerRadius\") || this.isDirty(\"pointerLength\") || this.isDirty(\"pointerX\") || this.isDirty(\"pointerY\") || this.isDirty(\"width\") || this.isDirty(\"height\")) {\n\t\t\tthis._clear = true;\n\t\t}\n\t}\n\n\tpublic _changed() {\n\t\tsuper._changed();\n\n\t\tif (this._clear) {\n\n\t\t\tthis.markDirtyBounds();\n\n\t\t\tlet w = this.width();\n\t\t\tlet h = this.height();\n\n\t\t\tif (w > 0 && h > 0) {\n\t\t\t\tlet cr = this.get(\"cornerRadius\", 8);\n\t\t\t\tcr = $math.fitToRange(cr, 0, Math.min(w / 2, h / 2));\n\n\t\t\t\tlet x = this.get(\"pointerX\", 0);\n\t\t\t\tlet y = this.get(\"pointerY\", 0);\n\t\t\t\tlet bwh = this.get(\"pointerBaseWidth\", 15) / 2;\n\n\t\t\t\t// corner coordinates\n\t\t\t\t// top left\n\t\t\t\tlet xtl = 0;\n\t\t\t\tlet ytl = 0;\n\t\t\t\t// top right\n\t\t\t\tlet xtr = w;\n\t\t\t\tlet ytr = 0;\n\t\t\t\t// bottom right\n\t\t\t\tlet xbr = w;\n\t\t\t\tlet ybr = h;\n\t\t\t\t// bottom left\n\t\t\t\tlet xbl = 0;\n\t\t\t\tlet ybl = h;\n\n\t\t\t\t// find stem base side: http://$math.stackexchange.com/questions/274712/calculate-on-which-side-of-straign-line-is-dot-located\n\t\t\t\t// d=(x−x1)(y2−y1)−(y−y1)(x2−x1)\n\t\t\t\tlet d1 = (x - xtl) * (ybr - ytl) - (y - ytl) * (xbr - xtl);\n\t\t\t\tlet d2 = (x - xbl) * (ytr - ybl) - (y - ybl) * (xtr - xbl);\n\n\t\t\t\tconst display = this._display;\n\t\t\t\t// top\n\t\t\t\tdisplay.moveTo(cr, 0);\n\n\t\t\t\tif (d1 > 0 && d2 > 0) {\n\t\t\t\t\tlet stemX = Math.round($math.fitToRange(x, cr + bwh, w - bwh - cr));\n\t\t\t\t\ty = $math.fitToRange(y, -Infinity, 0);\n\n\t\t\t\t\tdisplay.lineTo(stemX - bwh, 0);\n\t\t\t\t\tdisplay.lineTo(x, y);\n\t\t\t\t\tdisplay.lineTo(stemX + bwh, 0);\n\t\t\t\t}\n\n\t\t\t\tdisplay.lineTo(w - cr, 0);\n\t\t\t\tdisplay.arcTo(w, 0, w, cr, cr);\n\n\t\t\t\t// right\n\t\t\t\tif (d1 > 0 && d2 < 0) {\n\t\t\t\t\tlet stemY = Math.round($math.fitToRange(y, cr + bwh, h - bwh - cr));\n\t\t\t\t\tx = $math.fitToRange(x, w, Infinity);\n\t\t\t\t\tdisplay.lineTo(w, cr);\n\t\t\t\t\tdisplay.lineTo(w, Math.max(stemY - bwh, cr));\n\t\t\t\t\tdisplay.lineTo(x, y);\n\t\t\t\t\tdisplay.lineTo(w, stemY + bwh);\n\t\t\t\t}\n\t\t\t\tdisplay.lineTo(w, h - cr);\n\t\t\t\tdisplay.arcTo(w, h, w - cr, h, cr);\n\n\t\t\t\t// bottom\n\t\t\t\tif (d1 < 0 && d2 < 0) {\n\t\t\t\t\tlet stemX = Math.round($math.fitToRange(x, cr + bwh, w - bwh - cr));\n\t\t\t\t\ty = $math.fitToRange(y, h, Infinity);\n\n\t\t\t\t\tdisplay.lineTo(w - cr, h);\n\t\t\t\t\tdisplay.lineTo(stemX + bwh, h);\n\t\t\t\t\tdisplay.lineTo(x, y);\n\t\t\t\t\tdisplay.lineTo(stemX - bwh, h);\n\t\t\t\t}\n\t\t\t\tdisplay.lineTo(cr, h)\n\t\t\t\tdisplay.arcTo(0, h, 0, h - cr, cr);\n\n\n\t\t\t\t// left\n\t\t\t\tif (d1 < 0 && d2 > 0) {\n\t\t\t\t\tlet stemY = Math.round($math.fitToRange(y, cr + bwh, h - cr - bwh));\n\t\t\t\t\tx = $math.fitToRange(x, -Infinity, 0);\n\t\t\t\t\tdisplay.lineTo(0, h - cr);\n\t\t\t\t\tdisplay.lineTo(0, stemY + bwh);\n\t\t\t\t\tdisplay.lineTo(x, y);\n\t\t\t\t\tdisplay.lineTo(0, Math.max(stemY - bwh, cr));\n\t\t\t\t}\n\t\t\t\tdisplay.lineTo(0, cr);\n\t\t\t\tdisplay.arcTo(0, 0, cr, 0, cr);\n\t\t\t\tdisplay.closePath();\n\t\t\t}\n\t\t}\n\t}\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RoundedRectangle.d.ts","sourceRoot":"","sources":["../../../../../src/.internal/core/render/RoundedRectangle.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,SAAS,EAAE,kBAAkB,EAAE,iBAAiB,EAAE,MAAM,aAAa,CAAC;AAG/E,MAAM,WAAW,yBAA0B,SAAQ,kBAAkB;IAEpE;;OAEG;IACH,cAAc,CAAC,EAAE,MAAM,CAAC;IAExB;;OAEG;IACH,cAAc,CAAC,EAAE,MAAM,CAAC;IAExB;;OAEG;IACH,cAAc,CAAC,EAAE,MAAM,CAAC;IAExB;;OAEG;IACH,cAAc,CAAC,EAAE,MAAM,CAAC;CAExB;AAED,MAAM,WAAW,wBAAyB,SAAQ,iBAAiB;CAClE;AAED;;;;;GAKG;AACH,qBAAa,gBAAiB,SAAQ,SAAS;IAE/B,SAAS,EAAE,yBAAyB,CAAC;IACrC,gBAAgB,EAAE,wBAAwB,CAAC;IAE1D,OAAc,SAAS,EAAE,MAAM,CAAsB;IACrD,OAAc,UAAU,EAAE,KAAK,CAAC,MAAM,CAAC,CAA6D;IAE7F,cAAc;IAQd,KAAK;
|
|
1
|
+
{"version":3,"file":"RoundedRectangle.d.ts","sourceRoot":"","sources":["../../../../../src/.internal/core/render/RoundedRectangle.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,SAAS,EAAE,kBAAkB,EAAE,iBAAiB,EAAE,MAAM,aAAa,CAAC;AAG/E,MAAM,WAAW,yBAA0B,SAAQ,kBAAkB;IAEpE;;OAEG;IACH,cAAc,CAAC,EAAE,MAAM,CAAC;IAExB;;OAEG;IACH,cAAc,CAAC,EAAE,MAAM,CAAC;IAExB;;OAEG;IACH,cAAc,CAAC,EAAE,MAAM,CAAC;IAExB;;OAEG;IACH,cAAc,CAAC,EAAE,MAAM,CAAC;CAExB;AAED,MAAM,WAAW,wBAAyB,SAAQ,iBAAiB;CAClE;AAED;;;;;GAKG;AACH,qBAAa,gBAAiB,SAAQ,SAAS;IAE/B,SAAS,EAAE,yBAAyB,CAAC;IACrC,gBAAgB,EAAE,wBAAwB,CAAC;IAE1D,OAAc,SAAS,EAAE,MAAM,CAAsB;IACrD,OAAc,UAAU,EAAE,KAAK,CAAC,MAAM,CAAC,CAA6D;IAE7F,cAAc;IAQd,KAAK;CA+CZ"}
|
|
@@ -47,23 +47,25 @@ var RoundedRectangle = /** @class */ (function (_super) {
|
|
|
47
47
|
crtr = $math.fitToRange(crtr, 0, maxcr);
|
|
48
48
|
crbr = $math.fitToRange(crbr, 0, maxcr);
|
|
49
49
|
crbl = $math.fitToRange(crbl, 0, maxcr);
|
|
50
|
-
this._display
|
|
51
|
-
|
|
50
|
+
var display = this._display;
|
|
51
|
+
display.moveTo(crtl * wSign, 0);
|
|
52
|
+
display.lineTo(w - crtr * wSign, 0);
|
|
52
53
|
if (crtr > 0) {
|
|
53
|
-
|
|
54
|
+
display.arcTo(w, 0, w, crtr * hSign, crtr);
|
|
54
55
|
}
|
|
55
|
-
|
|
56
|
+
display.lineTo(w, h - crbr * hSign);
|
|
56
57
|
if (crbr > 0) {
|
|
57
|
-
|
|
58
|
+
display.arcTo(w, h, w - crbr * wSign, h, crbr);
|
|
58
59
|
}
|
|
59
|
-
|
|
60
|
+
display.lineTo(crbl * wSign, h);
|
|
60
61
|
if (crbl > 0) {
|
|
61
|
-
|
|
62
|
+
display.arcTo(0, h, 0, h - crbl * hSign, crbl);
|
|
62
63
|
}
|
|
63
|
-
|
|
64
|
+
display.lineTo(0, crtl * hSign);
|
|
64
65
|
if (crtl > 0) {
|
|
65
|
-
|
|
66
|
+
display.arcTo(0, 0, crtl * wSign, 0, crtl);
|
|
66
67
|
}
|
|
68
|
+
display.closePath();
|
|
67
69
|
}
|
|
68
70
|
}
|
|
69
71
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RoundedRectangle.js","sourceRoot":"","sources":["../../../../../src/.internal/core/render/RoundedRectangle.ts"],"names":[],"mappings":";AAAA,OAAO,KAAK,KAAK,MAAM,cAAc,CAAC;AACtC,OAAO,KAAK,KAAK,MAAM,cAAc,CAAC;AACtC,OAAO,KAAK,MAAM,MAAM,eAAe,CAAC;AACxC,OAAO,EAAE,SAAS,EAAyC,MAAM,aAAa,CAAC;AA8B/E;;;;;GAKG;AACH;IAAsC,oCAAS;IAA/C;;
|
|
1
|
+
{"version":3,"file":"RoundedRectangle.js","sourceRoot":"","sources":["../../../../../src/.internal/core/render/RoundedRectangle.ts"],"names":[],"mappings":";AAAA,OAAO,KAAK,KAAK,MAAM,cAAc,CAAC;AACtC,OAAO,KAAK,KAAK,MAAM,cAAc,CAAC;AACtC,OAAO,KAAK,MAAM,MAAM,eAAe,CAAC;AACxC,OAAO,EAAE,SAAS,EAAyC,MAAM,aAAa,CAAC;AA8B/E;;;;;GAKG;AACH;IAAsC,oCAAS;IAA/C;;IA+DA,CAAC;;;;;eAvDA;YACC,iBAAM,cAAc,WAAE,CAAC;YAEvB,IAAI,IAAI,CAAC,OAAO,CAAC,gBAAgB,CAAC,IAAI,IAAI,CAAC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O,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,GAAG,IAAI,GAAG,KAAK,EAAE,IAAI,CAAC,CAAC;iBAC/C;gBACD,OAAO,CAAC,MAAM,CAAC,CAAC,EAAE,IAAI,GAAG,KAAK,CAAC,CAAC;gBAChC,IAAI,IAAI,GAAG,CAAC,EAAE;oBACb,OAAO,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC,EAAE,IAAI,GAAG,KAAK,EAAE,CAAC,EAAE,IAAI,CAAC,CAAC;iBAC3C;gBACD,OAAO,CAAC,SAAS,EAAE,CAAC;aACpB;QACF,CAAC;;IAzDD;;;;eAAkC,kBAAkB;OAAC;IACrD;;;;eAA0C,SAAS,CAAC,UAAU,CAAC,MAAM,CAAC,CAAC,gBAAgB,CAAC,SAAS,CAAC,CAAC;OAAC;IAyDrG,uBAAC;CAAA,AA/DD,CAAsC,SAAS,GA+D9C;SA/DY,gBAAgB","sourcesContent":["import * as $type from \"../util/Type\";\nimport * as $math from \"../util/Math\";\nimport * as $utils from \"../util/Utils\";\nimport { Rectangle, IRectangleSettings, IRectanglePrivate } from \"./Rectangle\";\n\n\nexport interface IRoundedRectangleSettings extends IRectangleSettings {\n\n\t/**\n\t * Radius of the top-left corner in pixels.\n\t */\n\tcornerRadiusTL?: number;\n\n\t/**\n\t * Radius of the top-right corner in pixels.\n\t */\n\tcornerRadiusTR?: number;\n\n\t/**\n\t * Radius of the botttom-right corner in pixels.\n\t */\n\tcornerRadiusBR?: number;\n\n\t/**\n\t * Radius of the bottom-left corner in pixels.\n\t */\n\tcornerRadiusBL?: number;\n\n}\n\nexport interface IRoundedRectanglePrivate extends IRectanglePrivate {\n}\n\n/**\n * Draws a rectangle with rounded corners.\n *\n * @see {@link https://www.amcharts.com/docs/v5/concepts/common-elements/graphics/} for more info\n * @important\n */\nexport class RoundedRectangle extends Rectangle {\n\n\tdeclare public _settings: IRoundedRectangleSettings;\n\tdeclare public _privateSettings: IRoundedRectanglePrivate;\n\n\tpublic static className: string = \"RoundedRectangle\";\n\tpublic static classNames: Array<string> = Rectangle.classNames.concat([RoundedRectangle.className]);\n\n\tpublic _beforeChanged() {\n\t\tsuper._beforeChanged();\n\n\t\tif (this.isDirty(\"cornerRadiusTL\") || this.isDirty(\"cornerRadiusTR\") || this.isDirty(\"cornerRadiusBR\") || this.isDirty(\"cornerRadiusBL\")) {\n\t\t\tthis._clear = true;\n\t\t}\n\t}\n\n\tpublic _draw() {\n\t\tlet width = this.width();\n\t\tlet height = this.height();\n\n\t\tlet w = width;\n\t\tlet h = height;\n\n\t\tlet wSign = w / Math.abs(width);\n\t\tlet hSign = h / Math.abs(height);\n\n\t\tif ($type.isNumber(w) && $type.isNumber(h)) {\n\n\t\t\tlet minSide = Math.min(w, h) / 2;\n\n\t\t\tlet crtl = $utils.relativeToValue(this.get(\"cornerRadiusTL\", 8), minSide);\n\t\t\tlet crtr = $utils.relativeToValue(this.get(\"cornerRadiusTR\", 8), minSide);\n\t\t\tlet crbr = $utils.relativeToValue(this.get(\"cornerRadiusBR\", 8), minSide);\n\t\t\tlet crbl = $utils.relativeToValue(this.get(\"cornerRadiusBL\", 8), minSide);\n\n\t\t\tlet maxcr = Math.min(Math.abs(w / 2), Math.abs(h / 2));\n\n\t\t\tcrtl = $math.fitToRange(crtl, 0, maxcr);\n\t\t\tcrtr = $math.fitToRange(crtr, 0, maxcr);\n\t\t\tcrbr = $math.fitToRange(crbr, 0, maxcr);\n\t\t\tcrbl = $math.fitToRange(crbl, 0, maxcr);\n\n\t\t\tconst display = this._display;\n\t\t\tdisplay.moveTo(crtl * wSign, 0);\n\t\t\tdisplay.lineTo(w - crtr * wSign, 0);\n\t\t\tif (crtr > 0) {\n\t\t\t\tdisplay.arcTo(w, 0, w, crtr * hSign, crtr);\n\t\t\t}\n\t\t\tdisplay.lineTo(w, h - crbr * hSign);\n\t\t\tif (crbr > 0) {\n\t\t\t\tdisplay.arcTo(w, h, w - crbr * wSign, h, crbr);\n\t\t\t}\n\t\t\tdisplay.lineTo(crbl * wSign, h);\n\t\t\tif (crbl > 0) {\n\t\t\t\tdisplay.arcTo(0, h, 0, h - crbl * hSign, crbl);\n\t\t\t}\n\t\t\tdisplay.lineTo(0, crtl * hSign);\n\t\t\tif (crtl > 0) {\n\t\t\t\tdisplay.arcTo(0, 0, crtl * wSign, 0, crtl);\n\t\t\t}\n\t\t\tdisplay.closePath();\n\t\t}\n\t}\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Star.d.ts","sourceRoot":"","sources":["../../../../../src/.internal/core/render/Star.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,iBAAiB,EAAE,gBAAgB,EAAE,MAAM,YAAY,CAAC;AAC3E,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,yBAAyB,CAAC;AAGvD,MAAM,WAAW,aAAc,SAAQ,iBAAiB;IAEvD;;OAEG;IACH,MAAM,CAAC,EAAE,MAAM,CAAC;IAEhB;;OAEG;IACH,WAAW,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC;IAE/B;;OAEG;IACH,MAAM,CAAC,EAAE,MAAM,CAAC;CAEhB;AAED,MAAM,WAAW,YAAa,SAAQ,gBAAgB;CACrD;AAED;;;;;GAKG;AACH,qBAAa,IAAK,SAAQ,QAAQ;IAElB,SAAS,EAAE,aAAa,CAAC;IACzB,gBAAgB,EAAE,YAAY,CAAC;IAE9C,OAAc,SAAS,EAAE,MAAM,CAAU;IACzC,OAAc,UAAU,EAAE,KAAK,CAAC,MAAM,CAAC,CAAgD;IAEhF,cAAc;IAQd,QAAQ;
|
|
1
|
+
{"version":3,"file":"Star.d.ts","sourceRoot":"","sources":["../../../../../src/.internal/core/render/Star.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,iBAAiB,EAAE,gBAAgB,EAAE,MAAM,YAAY,CAAC;AAC3E,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,yBAAyB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