@amcharts/amcharts5 5.2.8 → 5.2.11
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/funnel/FunnelSlice.d.ts +4 -4
- package/.internal/charts/funnel/FunnelSlice.d.ts.map +1 -1
- package/.internal/charts/funnel/FunnelSlice.js.map +1 -1
- package/.internal/charts/hierarchy/HierarchyDefaultTheme.d.ts.map +1 -1
- package/.internal/charts/hierarchy/HierarchyDefaultTheme.js +2 -1
- package/.internal/charts/hierarchy/HierarchyDefaultTheme.js.map +1 -1
- package/.internal/charts/hierarchy/Treemap.js +2 -2
- package/.internal/charts/hierarchy/Treemap.js.map +1 -1
- package/.internal/charts/map/MapChart.d.ts +1 -0
- package/.internal/charts/map/MapChart.d.ts.map +1 -1
- package/.internal/charts/map/MapChart.js +14 -0
- package/.internal/charts/map/MapChart.js.map +1 -1
- package/.internal/charts/map/MapSeries.d.ts +1 -0
- package/.internal/charts/map/MapSeries.d.ts.map +1 -1
- package/.internal/charts/map/MapSeries.js +9 -0
- package/.internal/charts/map/MapSeries.js.map +1 -1
- package/.internal/charts/percent/PercentDefaultTheme.d.ts.map +1 -1
- package/.internal/charts/percent/PercentDefaultTheme.js +3 -1
- package/.internal/charts/percent/PercentDefaultTheme.js.map +1 -1
- package/.internal/charts/percent/PercentSeries.d.ts.map +1 -1
- package/.internal/charts/percent/PercentSeries.js +3 -0
- package/.internal/charts/percent/PercentSeries.js.map +1 -1
- package/.internal/charts/pie/PieSeries.js +44 -44
- package/.internal/charts/pie/PieSeries.js.map +1 -1
- package/.internal/charts/stock/StockChartDefaultTheme.d.ts.map +1 -1
- package/.internal/charts/stock/StockChartDefaultTheme.js +14 -2
- package/.internal/charts/stock/StockChartDefaultTheme.js.map +1 -1
- package/.internal/charts/stock/indicators/MovingAverage.d.ts +1 -1
- package/.internal/charts/stock/indicators/MovingAverage.js.map +1 -1
- package/.internal/charts/stock/indicators/VWAP.d.ts +33 -0
- package/.internal/charts/stock/indicators/VWAP.d.ts.map +1 -0
- package/.internal/charts/stock/indicators/VWAP.js +151 -0
- package/.internal/charts/stock/indicators/VWAP.js.map +1 -0
- package/.internal/charts/stock/toolbar/DateRangeSelector.d.ts.map +1 -1
- package/.internal/charts/stock/toolbar/DateRangeSelector.js +22 -3
- package/.internal/charts/stock/toolbar/DateRangeSelector.js.map +1 -1
- package/.internal/charts/stock/toolbar/IndicatorControl.d.ts +1 -1
- package/.internal/charts/stock/toolbar/IndicatorControl.d.ts.map +1 -1
- package/.internal/charts/stock/toolbar/IndicatorControl.js +9 -0
- package/.internal/charts/stock/toolbar/IndicatorControl.js.map +1 -1
- package/.internal/charts/xy/XYChart.d.ts +18 -0
- package/.internal/charts/xy/XYChart.d.ts.map +1 -1
- package/.internal/charts/xy/XYChart.js +36 -0
- package/.internal/charts/xy/XYChart.js.map +1 -1
- package/.internal/charts/xy/XYCursor.d.ts +8 -1
- package/.internal/charts/xy/XYCursor.d.ts.map +1 -1
- package/.internal/charts/xy/XYCursor.js +12 -0
- package/.internal/charts/xy/XYCursor.js.map +1 -1
- package/.internal/charts/xy/axes/CategoryAxis.d.ts.map +1 -1
- package/.internal/charts/xy/axes/CategoryAxis.js +1 -0
- package/.internal/charts/xy/axes/CategoryAxis.js.map +1 -1
- package/.internal/charts/xy/axes/DateAxis.d.ts +1 -0
- package/.internal/charts/xy/axes/DateAxis.d.ts.map +1 -1
- package/.internal/charts/xy/axes/DateAxis.js +8 -0
- package/.internal/charts/xy/axes/DateAxis.js.map +1 -1
- package/.internal/charts/xy/axes/GaplessDateAxis.js +1 -0
- package/.internal/charts/xy/axes/GaplessDateAxis.js.map +1 -1
- package/.internal/charts/xy/axes/ValueAxis.d.ts +1 -0
- package/.internal/charts/xy/axes/ValueAxis.d.ts.map +1 -1
- package/.internal/charts/xy/axes/ValueAxis.js +15 -7
- package/.internal/charts/xy/axes/ValueAxis.js.map +1 -1
- package/.internal/charts/xy/series/BaseColumnSeries.d.ts.map +1 -1
- package/.internal/charts/xy/series/BaseColumnSeries.js +1 -1
- package/.internal/charts/xy/series/BaseColumnSeries.js.map +1 -1
- package/.internal/charts/xy/series/LineSeries.d.ts +3 -1
- package/.internal/charts/xy/series/LineSeries.d.ts.map +1 -1
- package/.internal/charts/xy/series/LineSeries.js +22 -5
- package/.internal/charts/xy/series/LineSeries.js.map +1 -1
- package/.internal/charts/xy/series/XYSeries.js +2 -2
- package/.internal/charts/xy/series/XYSeries.js.map +1 -1
- package/.internal/core/Classes.d.ts +2 -0
- package/.internal/core/Classes.d.ts.map +1 -1
- package/.internal/core/Classes.js.map +1 -1
- package/.internal/core/Root.d.ts +36 -0
- package/.internal/core/Root.d.ts.map +1 -1
- package/.internal/core/Root.js +203 -0
- package/.internal/core/Root.js.map +1 -1
- package/.internal/core/render/Container.d.ts +10 -0
- package/.internal/core/render/Container.d.ts.map +1 -1
- package/.internal/core/render/Container.js +55 -4
- package/.internal/core/render/Container.js.map +1 -1
- package/.internal/core/render/Graphics.d.ts +8 -0
- package/.internal/core/render/Graphics.d.ts.map +1 -1
- package/.internal/core/render/Graphics.js +5 -4
- package/.internal/core/render/Graphics.js.map +1 -1
- package/.internal/core/render/HorizontalLayout.d.ts.map +1 -1
- package/.internal/core/render/HorizontalLayout.js +19 -16
- package/.internal/core/render/HorizontalLayout.js.map +1 -1
- package/.internal/core/render/Label.d.ts.map +1 -1
- package/.internal/core/render/Label.js +8 -2
- package/.internal/core/render/Label.js.map +1 -1
- package/.internal/core/render/Sprite.d.ts +29 -0
- package/.internal/core/render/Sprite.d.ts.map +1 -1
- package/.internal/core/render/Sprite.js +50 -25
- package/.internal/core/render/Sprite.js.map +1 -1
- package/.internal/core/render/Text.js +4 -4
- package/.internal/core/render/Text.js.map +1 -1
- package/.internal/core/render/Tooltip.d.ts +6 -0
- package/.internal/core/render/Tooltip.d.ts.map +1 -1
- package/.internal/core/render/Tooltip.js +4 -0
- package/.internal/core/render/Tooltip.js.map +1 -1
- package/.internal/core/render/VerticalLayout.d.ts.map +1 -1
- package/.internal/core/render/VerticalLayout.js +19 -16
- package/.internal/core/render/VerticalLayout.js.map +1 -1
- package/.internal/core/render/backend/CanvasRenderer.d.ts +8 -1
- package/.internal/core/render/backend/CanvasRenderer.d.ts.map +1 -1
- package/.internal/core/render/backend/CanvasRenderer.js +115 -7
- package/.internal/core/render/backend/CanvasRenderer.js.map +1 -1
- package/.internal/core/render/backend/Renderer.d.ts +4 -1
- package/.internal/core/render/backend/Renderer.d.ts.map +1 -1
- package/.internal/core/render/backend/Renderer.js.map +1 -1
- package/.internal/core/render/gradients/RadialGradient.d.ts.map +1 -1
- package/.internal/core/render/gradients/RadialGradient.js +9 -0
- package/.internal/core/render/gradients/RadialGradient.js.map +1 -1
- package/.internal/core/util/ColorSet.d.ts +1 -0
- package/.internal/core/util/ColorSet.d.ts.map +1 -1
- package/.internal/core/util/ColorSet.js +11 -0
- package/.internal/core/util/ColorSet.js.map +1 -1
- package/.internal/core/util/Entity.d.ts +1 -0
- package/.internal/core/util/Entity.d.ts.map +1 -1
- package/.internal/core/util/Entity.js +15 -4
- package/.internal/core/util/Entity.js.map +1 -1
- package/.internal/core/util/Modal.d.ts +13 -0
- package/.internal/core/util/Modal.d.ts.map +1 -1
- package/.internal/core/util/Modal.js +13 -0
- package/.internal/core/util/Modal.js.map +1 -1
- package/.internal/plugins/exporting/Exporting.d.ts +2 -2
- package/.internal/plugins/exporting/Exporting.d.ts.map +1 -1
- package/.internal/plugins/exporting/Exporting.js +9 -4
- package/.internal/plugins/exporting/Exporting.js.map +1 -1
- package/CHANGELOG.md +50 -1
- 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/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/index.js +1 -1
- package/examples/javascript/map-globe-with-projected-circles/package.json +1 -1
- package/examples/javascript/map-with-bubbles/index.js +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/index.js +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/index.js +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/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/index.ts +1 -1
- package/examples/typescript/map-globe-with-projected-circles/package.json +1 -1
- package/examples/typescript/map-with-bubbles/index.ts +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/index.ts +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/index.ts +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/flow.d.ts +13 -13
- package/flow.d.ts.map +1 -1
- package/flow.js.map +1 -1
- package/hierarchy.d.ts +12 -12
- package/hierarchy.d.ts.map +1 -1
- package/hierarchy.js.map +1 -1
- package/index.d.ts +42 -42
- package/index.d.ts.map +1 -1
- package/index.js.map +1 -1
- package/map.d.ts +9 -9
- package/map.d.ts.map +1 -1
- package/map.js.map +1 -1
- package/package.json +1 -1
- package/percent.d.ts +9 -9
- package/percent.d.ts.map +1 -1
- package/percent.js.map +1 -1
- package/radar.d.ts +8 -8
- package/radar.d.ts.map +1 -1
- package/radar.js.map +1 -1
- package/stock.d.ts +63 -62
- package/stock.d.ts.map +1 -1
- package/stock.js +1 -0
- package/stock.js.map +1 -1
- package/venn.d.ts +1 -1
- package/venn.d.ts.map +1 -1
- package/venn.js.map +1 -1
- package/wc.d.ts +1 -1
- package/wc.d.ts.map +1 -1
- package/wc.js.map +1 -1
- package/xy.d.ts +30 -30
- package/xy.d.ts.map +1 -1
- package/xy.js.map +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Container.js","sourceRoot":"","sources":["../../../../../src/.internal/core/render/Container.ts"],"names":[],"mappings":";AAMA,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;AAE1C,OAAO,KAAK,MAAM,MAAM,eAAe,CAAC;AACxC,OAAO,KAAK,KAAK,MAAM,cAAc,CAAC;AACtC,OAAO,KAAK,MAAM,MAAM,eAAe,CAAC;AA2FxC;;;;;;;;;GASG;AACH;IAA+B,6BAAM;IAArC;QAAA,qEAiiBC;QA3hBA;;;;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;;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Y,CAAC,CAAC;YAC1C,IAAI,UAAU,EAAE;gBACf,CAAC,CAAC,UAAU,CAAC,CAAC;aACd;YAED,IAAM,iBAAiB,GAAG,IAAI,CAAC,GAAG,CAAC,mBAAmB,CAAC,CAAC;YACxD,IAAI,iBAAiB,EAAE;gBACtB,CAAC,CAAC,iBAAiB,CAAC,CAAC;aACrB;YAED,IAAM,IAAI,GAAG,IAAI,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC;YAC9B,IAAI,IAAI,EAAE;gBACT,CAAC,CAAC,IAAI,CAAC,CAAC;aACR;YAED,IAAI,CAAC,QAAQ,CAAC,MAAM,CAAC,OAAO,CAAC,UAAC,KAAK;gBAClC,CAAC,CAAC,KAAK,CAAC,CAAC;YACV,CAAC,CAAC,CAAC;QACJ,CAAC;;;;;;eAED;YACC,IAAM,MAAM,GAAkB,EAAE,CAAC;YAEjC,IAAI,CAAC,YAAY,CAAC,UAAC,CAAC;gBACnB,MAAM,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;YAChB,CAAC,CAAC,CAAC;YAEH,OAAO,MAAM,CAAC;QACf,CAAC;;IA9gBD;;;;eAAkC,WAAW;OAAC;IAC9C;;;;eAA0C,MAAM,CAAC,UAAU,CAAC,MAAM,CAAC,CAAC,SAAS,CAAC,SAAS,CAAC,CAAC;OAAC;IA8gB3F,gBAAC;CAAA,AAjiBD,CAA+B,MAAM,GAiiBpC;SAjiBY,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\";\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\";\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}\n\nexport interface IContainerEvents extends ISpriteEvents {\n}\n\nexport interface IContainerPrivate extends ISpritePrivate {\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 _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\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;\n\t\t\t\t\tcontentMask.dispose();\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 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(\"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._disposers.push(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(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._display.addChild(verticalScrollbar._display);\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"]}
|
|
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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AAM,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;;IAvjBD;;;;eAAkC,WAAW;OAAC;IAC9C;;;;eAA0C,MAAM,CAAC,UAAU,CAAC,MAAM,CAAC,CAAC,SAAS,CAAC,SAAS,CAAC,CAAC;OAAC;IAujB3F,gBAAC;CAAA,AA1kBD,CAA+B,MAAM,GA0kBpC;SA1kBY,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\thtml?: string;\n\n}\n\nexport interface IContainerEvents extends ISpriteEvents {\n}\n\nexport interface IContainerPrivate extends ISpritePrivate {\n\t/**\n\t * @todo review\n\t */\n\thtmlElement?: HTMLDivElement;\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\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;\n\t\t\t\t\tcontentMask.dispose();\n\t\t\t\t}\n\t\t\t}\n\t\t}\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}\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 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(\"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\n\t\t\t\t\tthis.set(\"maskContent\", false);\n\t\t\t\t\tthis.set(\"paddingRight\", undefined);\t\t\t\t\t\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}"]}
|
|
@@ -124,6 +124,14 @@ export interface IGraphicsSettings extends ISpriteSettings {
|
|
|
124
124
|
* @see {@link https://www.amcharts.com/docs/v5/concepts/colors-gradients-and-patterns/shadows/} for more info
|
|
125
125
|
*/
|
|
126
126
|
shadowOpacity?: number;
|
|
127
|
+
/**
|
|
128
|
+
* A method to be used on anchor points (joints) of the multi-point line.
|
|
129
|
+
*
|
|
130
|
+
* @see {@link https://developer.mozilla.org/en-US/docs/Web/API/CanvasRenderingContext2D/lineJoin} for more info
|
|
131
|
+
* @default "miter"
|
|
132
|
+
* @since 5.2.10
|
|
133
|
+
*/
|
|
134
|
+
lineJoin?: "miter" | "round" | "bevel";
|
|
127
135
|
}
|
|
128
136
|
export interface IGraphicsPrivate extends ISpritePrivate {
|
|
129
137
|
}
|
|
@@ -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;AAE7D,OAAO,EAAE,eAAe,EAAE,cAAc,EAAE,aAAa,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAClF,OAAO,EAAE,SAAS,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAC;AAM1D,eAAO,MAAM,cAAc,UAA6K,CAAC;AAEzM,MAAM,WAAW,iBAAkB,SAAQ,eAAe;IAEzD;;;;OAIG;IACH,IAAI,CAAC,EAAE,KAAK,CAAC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AAE,MAAM,CAAC;IAEvB;;;;OAIG;IACH,aAAa,CAAC,EAAE,MAAM,CAAC;IAEvB;;;;;;OAMG;IACH,aAAa,CAAC,EAAE,MAAM,CAAC;IAEvB;;;;;;OAMG;IACH,QAAQ,CAAC,EAAE,OAAO,GAAG,OAAO,GAAG,OAAO,CAAC;CAEvC;AAED,MAAM,WAAW,gBAAiB,SAAQ,cAAc;CACvD;AAED,MAAM,WAAW,eAAgB,SAAQ,aAAa;CACrD;AAED;;;;;GAKG;AACH,qBAAa,QAAS,SAAQ,MAAM;IAEpB,SAAS,EAAE,iBAAiB,CAAC;IAC7B,gBAAgB,EAAE,gBAAgB,CAAC;IACnC,OAAO,EAAE,eAAe,CAAC;IAEjC,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;IAsCR,aAAa;CAmIpB"}
|
|
@@ -38,7 +38,7 @@ var Graphics = /** @class */ (function (_super) {
|
|
|
38
38
|
if (this.isDirty("draw") || this.isDirty("svgPath")) {
|
|
39
39
|
this.markDirtyBounds();
|
|
40
40
|
}
|
|
41
|
-
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("shadowColor") || this.isDirty("shadowBlur") || this.isDirty("shadowOffsetX") || this.isDirty("shadowOffsetY")) {
|
|
41
|
+
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
42
|
this._clear = true;
|
|
43
43
|
}
|
|
44
44
|
if (this.isDirty("fillGradient")) {
|
|
@@ -183,6 +183,7 @@ var Graphics = /** @class */ (function (_super) {
|
|
|
183
183
|
if (stroke_1 || strokeGradient || strokePattern) {
|
|
184
184
|
var strokeOpacity_1 = this.get("strokeOpacity");
|
|
185
185
|
var strokeWidth = this.get("strokeWidth", 1);
|
|
186
|
+
var lineJoin = this.get("lineJoin");
|
|
186
187
|
if (strokePattern) {
|
|
187
188
|
var changed = false;
|
|
188
189
|
if (stroke_1 && (!strokePattern.get("color") || strokePattern.get("colorInherited"))) {
|
|
@@ -196,7 +197,7 @@ var Graphics = /** @class */ (function (_super) {
|
|
|
196
197
|
}
|
|
197
198
|
var pattern = strokePattern.pattern;
|
|
198
199
|
if (pattern) {
|
|
199
|
-
this._display.lineStyle(strokeWidth, pattern, strokeOpacity_1);
|
|
200
|
+
this._display.lineStyle(strokeWidth, pattern, strokeOpacity_1, lineJoin);
|
|
200
201
|
this._display.endStroke();
|
|
201
202
|
}
|
|
202
203
|
}
|
|
@@ -216,12 +217,12 @@ var Graphics = /** @class */ (function (_super) {
|
|
|
216
217
|
}
|
|
217
218
|
var gradient = strokeGradient.getFill(this);
|
|
218
219
|
if (gradient) {
|
|
219
|
-
this._display.lineStyle(strokeWidth, gradient, strokeOpacity_1);
|
|
220
|
+
this._display.lineStyle(strokeWidth, gradient, strokeOpacity_1, lineJoin);
|
|
220
221
|
this._display.endStroke();
|
|
221
222
|
}
|
|
222
223
|
}
|
|
223
224
|
else if (stroke_1) {
|
|
224
|
-
this._display.lineStyle(strokeWidth, stroke_1, strokeOpacity_1);
|
|
225
|
+
this._display.lineStyle(strokeWidth, stroke_1, strokeOpacity_1, lineJoin);
|
|
225
226
|
this._display.endStroke();
|
|
226
227
|
}
|
|
227
228
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Graphics.js","sourceRoot":"","sources":["../../../../../src/.internal/core/render/Graphics.ts"],"names":[],"mappings":";AAIA,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;AAsJzM;;;;;GAKG;AACH;IAA8B,4BAAM;IAApC;QAAA,qEAoOC;QA9NA;;;;mBAA6B,KAAI,CAAC,KAAK,CAAC,SAAS,CAAC,YAAY,EAAE;WAAC;QAEjE;;;;mBAAmB,KAAK;WAAC;;IA4N1B,CAAC;;;;;eAvNA;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,CAAC,IAAI,IAAI,CAAC,OAAO,CAAC,QAAQ,CAAC,IAAI,IAAI,CAAC,OAAO,CAAC,SAAS,CAAC,IAAI,IAAI,CAAC,OAAO,CAAC,aAAa,C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AAE,UAAC,IAAS;gCAC5B,IAAI,CAAC,CAAC,IAAI,CAAC,KAAK,IAAI,IAAI,CAAC,cAAc,CAAC,IAAI,QAAM,EAAE;oCACnD,IAAI,CAAC,KAAK,GAAG,QAAM,CAAC;oCACpB,IAAI,CAAC,cAAc,GAAG,IAAI,CAAC;iCAC3B;gCAED,IAAI,IAAI,CAAC,OAAO,IAAI,IAAI,IAAI,IAAI,CAAC,gBAAgB,EAAE;oCAClD,IAAI,CAAC,OAAO,GAAG,eAAa,CAAC;oCAC7B,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,CAAC,CAAC;4BAC9D,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,CAAC,CAAC;wBAC5D,IAAI,CAAC,QAAQ,CAAC,SAAS,EAAE,CAAC;qBAC1B;iBAED;aAED;YACD,IAAI,CAAC,MAAM,GAAG,KAAK,CAAC;QACrB,CAAC;;IAxND;;;;eAAkC,UAAU;OAAC;IAC7C;;;;eAA0C,MAAM,CAAC,UAAU,CAAC,MAAM,CAAC,CAAC,QAAQ,CAAC,SAAS,CAAC,CAAC;OAAC;IAyN1F,eAAC;CAAA,AApOD,CAA8B,MAAM,GAoOnC;SApOY,QAAQ","sourcesContent":["import type { Color } from \"../util/Color\";\nimport type { Pattern } from \"../render/patterns/Pattern\";\nimport type { Gradient } from \"../render/gradients/Gradient\";\n\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}\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(\"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.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\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\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);\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 (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);\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);\n\t\t\t\t\tthis._display.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S;gCAC5B,IAAI,CAAC,CAAC,IAAI,CAAC,KAAK,IAAI,IAAI,CAAC,cAAc,CAAC,IAAI,QAAM,EAAE;oCACnD,IAAI,CAAC,KAAK,GAAG,QAAM,CAAC;oCACpB,IAAI,CAAC,cAAc,GAAG,IAAI,CAAC;iCAC3B;gCAED,IAAI,IAAI,CAAC,OAAO,IAAI,IAAI,IAAI,IAAI,CAAC,gBAAgB,EAAE;oCAClD,IAAI,CAAC,OAAO,GAAG,eAAa,CAAC;oCAC7B,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;;IAzND;;;;eAAkC,UAAU;OAAC;IAC7C;;;;eAA0C,MAAM,CAAC,UAAU,CAAC,MAAM,CAAC,CAAC,QAAQ,CAAC,SAAS,CAAC,CAAC;OAAC;IA0N1F,eAAC;CAAA,AArOD,CAA8B,MAAM,GAqOnC;SArOY,QAAQ","sourcesContent":["import type { Color } from \"../util/Color\";\nimport type { Pattern } from \"../render/patterns/Pattern\";\nimport type { Gradient } from \"../render/gradients/Gradient\";\n\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.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\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\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":"HorizontalLayout.d.ts","sourceRoot":"","sources":["../../../../../src/.internal/core/render/HorizontalLayout.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAgB,MAAM,UAAU,CAAC;AAGhD,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAE7C;;;;GAIG;AACH,qBAAa,gBAAiB,SAAQ,MAAM;IAE3C,OAAc,SAAS,EAAE,MAAM,CAAsB;IACrD,OAAc,UAAU,EAAE,KAAK,CAAC,MAAM,CAAC,CAA0D;IAEjG;;OAEG;IACI,eAAe,CAAC,SAAS,EAAE,SAAS,GAAG,IAAI;
|
|
1
|
+
{"version":3,"file":"HorizontalLayout.d.ts","sourceRoot":"","sources":["../../../../../src/.internal/core/render/HorizontalLayout.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAgB,MAAM,UAAU,CAAC;AAGhD,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAE7C;;;;GAIG;AACH,qBAAa,gBAAiB,SAAQ,MAAM;IAE3C,OAAc,SAAS,EAAE,MAAM,CAAsB;IACrD,OAAc,UAAU,EAAE,KAAK,CAAC,MAAM,CAAC,CAA0D;IAEjG;;OAEG;IACI,eAAe,CAAC,SAAS,EAAE,SAAS,GAAG,IAAI;CA+ElD"}
|
|
@@ -30,12 +30,12 @@ var HorizontalLayout = /** @class */ (function (_super) {
|
|
|
30
30
|
if (childWidth instanceof Percent) {
|
|
31
31
|
totalPercent += childWidth.value;
|
|
32
32
|
var w = availableWidth * childWidth.value;
|
|
33
|
-
var minWidth = child.get("minWidth", -Infinity);
|
|
33
|
+
var minWidth = child.get("minWidth", child.getPrivate("minWidth", -Infinity));
|
|
34
34
|
if (minWidth > w) {
|
|
35
35
|
availableWidth -= minWidth;
|
|
36
36
|
totalPercent -= childWidth.value;
|
|
37
37
|
}
|
|
38
|
-
var maxWidth = child.get("maxWidth", Infinity);
|
|
38
|
+
var maxWidth = child.get("maxWidth", child.getPrivate("maxWidth", Infinity));
|
|
39
39
|
if (w > maxWidth) {
|
|
40
40
|
availableWidth -= maxWidth;
|
|
41
41
|
totalPercent -= childWidth.value;
|
|
@@ -50,22 +50,25 @@ var HorizontalLayout = /** @class */ (function (_super) {
|
|
|
50
50
|
}
|
|
51
51
|
}
|
|
52
52
|
});
|
|
53
|
-
if (availableWidth
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
53
|
+
if (availableWidth < 0) {
|
|
54
|
+
availableWidth = 0.01;
|
|
55
|
+
}
|
|
56
|
+
//if (availableWidth > 0) {
|
|
57
|
+
eachChildren(container, function (child) {
|
|
58
|
+
if (child.isVisible()) {
|
|
59
|
+
if (child.get("position") == "relative") {
|
|
60
|
+
var childWidth = child.get("width");
|
|
61
|
+
if (childWidth instanceof Percent) {
|
|
62
|
+
var privateWidth = availableWidth * childWidth.value / totalPercent - child.get("marginLeft", 0) - child.get("marginRight", 0);
|
|
63
|
+
var minWidth = child.get("minWidth", child.getPrivate("minWidth", -Infinity));
|
|
64
|
+
var maxWidth = child.get("maxWidth", child.getPrivate("maxWidth", Infinity));
|
|
65
|
+
privateWidth = Math.min(Math.max(minWidth, privateWidth), maxWidth);
|
|
66
|
+
child.setPrivate("width", privateWidth);
|
|
65
67
|
}
|
|
66
68
|
}
|
|
67
|
-
}
|
|
68
|
-
}
|
|
69
|
+
}
|
|
70
|
+
});
|
|
71
|
+
//}
|
|
69
72
|
var prevX = paddingLeft;
|
|
70
73
|
eachChildren(container, function (child) {
|
|
71
74
|
if (child.get("position") == "relative") {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"HorizontalLayout.js","sourceRoot":"","sources":["../../../../../src/.internal/core/render/HorizontalLayout.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,MAAM,EAAE,YAAY,EAAE,MAAM,UAAU,CAAC;AAChD,OAAO,KAAK,KAAK,MAAM,cAAc,CAAC;AACtC,OAAO,EAAE,OAAO,EAAE,MAAM,iBAAiB,CAAC;AAG1C;;;;GAIG;AACH;IAAsC,oCAAM;IAA5C;;
|
|
1
|
+
{"version":3,"file":"HorizontalLayout.js","sourceRoot":"","sources":["../../../../../src/.internal/core/render/HorizontalLayout.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,MAAM,EAAE,YAAY,EAAE,MAAM,UAAU,CAAC;AAChD,OAAO,KAAK,KAAK,MAAM,cAAc,CAAC;AACtC,OAAO,EAAE,OAAO,EAAE,MAAM,iBAAiB,CAAC;AAG1C;;;;GAIG;AACH;IAAsC,oCAAM;IAA5C;;IAuFA,CAAC;IAlFA;;OAEG;;;;;eACH,UAAuB,SAAoB;YAE1C,IAAI,WAAW,GAAG,SAAS,CAAC,GAAG,CAAC,aAAa,EAAE,CAAC,CAAC,CAAC;YAElD,IAAI,cAAc,GAAG,SAAS,CAAC,UAAU,EAAE,CAAC;YAE5C,IAAI,YAAY,GAAG,CAAC,CAAC;YAErB,YAAY,CAAC,SAAS,EAAE,UAAC,KAAK;gBAC7B,IAAI,KAAK,CAAC,SAAS,EAAE,EAAE;oBACtB,IAAI,KAAK,CAAC,GAAG,CAAC,UAAU,CAAC,IAAI,UAAU,EAAE;wBACxC,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C,GAAG,KAAK,GAAG,UAAU,GAAG,MAAM,CAAC,IAAI,CAAC;wBACzC,KAAK,CAAC,UAAU,CAAC,GAAG,EAAE,CAAC,CAAC,CAAC;wBACzB,KAAK,GAAG,CAAC,GAAG,MAAM,CAAC,KAAK,GAAG,WAAW,CAAC;qBACvC;yBACG;wBACH,KAAK,CAAC,UAAU,CAAC,GAAG,EAAE,SAAS,CAAC,CAAC;qBACjC;iBACD;YACF,CAAC,CAAC,CAAC;QACJ,CAAC;;IApFD;;;;eAAkC,kBAAkB;OAAC;IACrD;;;;eAA0C,MAAM,CAAC,UAAU,CAAC,MAAM,CAAC,CAAC,gBAAgB,CAAC,SAAS,CAAC,CAAC;OAAC;IAoFlG,uBAAC;CAAA,AAvFD,CAAsC,MAAM,GAuF3C;SAvFY,gBAAgB","sourcesContent":["import { Layout, eachChildren } from \"./Layout\";\nimport * as $type from \"../util/Type\";\nimport { Percent } from \"../util/Percent\";\nimport type { Container } from \"./Container\";\n\n/**\n * A horizontal children layout for [[Container]].\n *\n * @see {@link https://www.amcharts.com/docs/v5/concepts/common-elements/containers/#Layout} for more info\n */\nexport class HorizontalLayout extends Layout {\n\n\tpublic static className: string = \"HorizontalLayout\";\n\tpublic static classNames: Array<string> = Layout.classNames.concat([HorizontalLayout.className]);\n\n\t/**\n\t * @ignore\n\t */\n\tpublic updateContainer(container: Container): void {\n\n\t\tlet paddingLeft = container.get(\"paddingLeft\", 0);\n\n\t\tlet availableWidth = container.innerWidth();\n\n\t\tlet totalPercent = 0;\n\n\t\teachChildren(container, (child) => {\n\t\t\tif (child.isVisible()) {\n\t\t\t\tif (child.get(\"position\") == \"relative\") {\n\t\t\t\t\tlet childWidth = child.get(\"width\");\n\t\t\t\t\tif (childWidth instanceof Percent) {\n\t\t\t\t\t\ttotalPercent += childWidth.value;\n\n\t\t\t\t\t\tlet w = availableWidth * childWidth.value;\n\t\t\t\t\t\tlet minWidth = child.get(\"minWidth\", child.getPrivate(\"minWidth\", -Infinity));\n\t\t\t\t\t\tif (minWidth > w) {\n\t\t\t\t\t\t\tavailableWidth -= minWidth;\n\t\t\t\t\t\t\ttotalPercent -= childWidth.value;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tlet maxWidth = child.get(\"maxWidth\", child.getPrivate(\"maxWidth\", Infinity));\n\t\t\t\t\t\tif (w > maxWidth) {\n\t\t\t\t\t\t\tavailableWidth -= maxWidth;\n\t\t\t\t\t\t\ttotalPercent -= childWidth.value;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\tif (!$type.isNumber(childWidth)) {\n\t\t\t\t\t\t\tchildWidth = child.width();\n\t\t\t\t\t\t}\n\t\t\t\t\t\tavailableWidth -= childWidth + child.get(\"marginLeft\", 0) + child.get(\"marginRight\", 0);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\n\t\tif(availableWidth < 0){\n\t\t\tavailableWidth = 0.01;\n\t\t}\n\n\t\t//if (availableWidth > 0) {\n\t\t\teachChildren(container, (child) => {\n\t\t\t\tif (child.isVisible()) {\n\t\t\t\t\tif (child.get(\"position\") == \"relative\") {\n\t\t\t\t\t\tlet childWidth = child.get(\"width\");\n\t\t\t\t\t\tif (childWidth instanceof Percent) {\n\t\t\t\t\t\t\tlet privateWidth = availableWidth * childWidth.value / totalPercent - child.get(\"marginLeft\", 0) - child.get(\"marginRight\", 0);\n\t\t\t\t\t\t\tlet minWidth = child.get(\"minWidth\", child.getPrivate(\"minWidth\", -Infinity));\n\t\t\t\t\t\t\tlet maxWidth = child.get(\"maxWidth\", child.getPrivate(\"maxWidth\", Infinity));\n\t\t\t\t\t\t\tprivateWidth = Math.min(Math.max(minWidth, privateWidth), maxWidth);\n\n\t\t\t\t\t\t\tchild.setPrivate(\"width\", privateWidth);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t});\n\t\t//}\n\n\t\tlet prevX = paddingLeft;\n\n\t\teachChildren(container, (child) => {\n\n\t\t\tif (child.get(\"position\") == \"relative\") {\n\t\t\t\tif (child.isVisible()) {\n\t\t\t\t\tlet bounds = child.adjustedLocalBounds();\n\t\t\t\t\tlet marginLeft = child.get(\"marginLeft\", 0);\n\t\t\t\t\tlet marginRight = child.get(\"marginRight\", 0);\n\n\t\t\t\t\tlet x = prevX + marginLeft - bounds.left;\n\t\t\t\t\tchild.setPrivate(\"x\", x);\n\t\t\t\t\tprevX = x + bounds.right + marginRight;\n\t\t\t\t}\n\t\t\t\telse{\n\t\t\t\t\tchild.setPrivate(\"x\", undefined);\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t}\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Label.d.ts","sourceRoot":"","sources":["../../../../../src/.internal/core/render/Label.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,eAAe,CAAC;AAC3C,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,iBAAiB,CAAC;AAC/C,OAAO,KAAK,EAAE,QAAQ,EAAE,kBAAkB,EAAE,MAAM,aAAa,CAAC;AAEhE,OAAO,EAAE,IAAI,EAAE,MAAM,gBAAgB,CAAC;AAEtC,OAAO,EAAE,SAAS,EAAE,iBAAiB,EAAE,kBAAkB,EAAE,MAAM,aAAa,CAAC;AAM/E,MAAM,WAAW,cAAe,SAAQ,kBAAkB;IAEzD;;OAEG;IACH,IAAI,CAAC,EAAE,MAAM,CAAC;IAEd;;OAEG;IACH,IAAI,CAAC,EAAE,KAAK,CAAC;IAEb;;OAEG;IACH,SAAS,CAAC,EAAE,OAAO,GAAG,KAAK,GAAG,MAAM,GAAG,OAAO,GAAG,QAAQ,CAAC;IAE1D;;;;OAIG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC;IAEpB;;OAEG;IACH,QAAQ,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IAE3B;;OAEG;IACH,UAAU,CAAC,EAAE,QAAQ,GAAG,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C,EAAE,KAAK,GAAG,IAAI,CAAC;IAE3B;;;;;;OAMG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC;IAEpB;;;;OAIG;IACH,aAAa,CAAC,EAAE,MAAM,CAAC;IAEvB;;;;OAIG;IACH,aAAa,CAAC,EAAE,MAAM,CAAC;IAEvB;;;;;;OAMG;IACH,aAAa,CAAC,EAAE,MAAM,CAAC;CAUvB;AAED,MAAM,WAAW,aAAc,SAAQ,iBAAiB;CACvD;AAED;;;;GAIG;AACH,qBAAa,KAAM,SAAQ,SAAS;IAEpB,SAAS,EAAE,cAAc,CAAC;IAC1B,gBAAgB,EAAE,aAAa,CAAC;IAE/C,SAAS,CAAC,KAAK,EAAG,IAAI,CAAC;IAEvB,SAAS,CAAC,SAAS,EAAE,KAAK,CAAC,MAAM,CAAC,CAkChC;IAEF,OAAc,SAAS,EAAE,MAAM,CAAW;IAC1C,OAAc,UAAU,EAAE,KAAK,CAAC,MAAM,CAAC,CAAkD;IAEzF;;OAEG;IACH,IAAW,IAAI,IAAI,IAAI,CAEtB;IAED,SAAS,CAAC,SAAS;IAqBZ,SAAS;IAIT,eAAe;IA8CtB,SAAS,CAAC,iBAAiB;IAqBpB,YAAY,CAAC,QAAQ,CAAC,EAAE,QAAQ,CAAC,kBAAkB,CAAC,GAAG,IAAI;IAQlE;;;;;OAKG;IACI,OAAO,IAAI,MAAM;CAGxB"}
|
|
@@ -85,6 +85,12 @@ var Label = /** @class */ (function (_super) {
|
|
|
85
85
|
_this._text.set(property, propValue);
|
|
86
86
|
}
|
|
87
87
|
});
|
|
88
|
+
this.onPrivate("maxWidth", function () {
|
|
89
|
+
_this._setMaxDimentions();
|
|
90
|
+
});
|
|
91
|
+
this.onPrivate("maxHeight", function () {
|
|
92
|
+
_this._setMaxDimentions();
|
|
93
|
+
});
|
|
88
94
|
}
|
|
89
95
|
});
|
|
90
96
|
Object.defineProperty(Label.prototype, "_makeText", {
|
|
@@ -147,14 +153,14 @@ var Label = /** @class */ (function (_super) {
|
|
|
147
153
|
value: function () {
|
|
148
154
|
var rotation = this.get("rotation");
|
|
149
155
|
var vertical = rotation == 90 || rotation == 270;
|
|
150
|
-
var maxWidth = this.get("maxWidth", Infinity);
|
|
156
|
+
var maxWidth = this.get("maxWidth", this.getPrivate("maxWidth", Infinity));
|
|
151
157
|
if ($type.isNumber(maxWidth)) {
|
|
152
158
|
this.text.set(vertical ? "maxHeight" : "maxWidth", maxWidth - this.get("paddingLeft", 0) - this.get("paddingRight", 0));
|
|
153
159
|
}
|
|
154
160
|
else {
|
|
155
161
|
this.text.set(vertical ? "maxHeight" : "maxWidth", undefined);
|
|
156
162
|
}
|
|
157
|
-
var maxHeight = this.get("maxHeight", Infinity);
|
|
163
|
+
var maxHeight = this.get("maxHeight", this.getPrivate("maxHeight", Infinity));
|
|
158
164
|
if ($type.isNumber(maxHeight)) {
|
|
159
165
|
this.text.set(vertical ? "maxWidth" : "maxHeight", maxHeight - this.get("paddingTop", 0) - this.get("paddingBottom", 0));
|
|
160
166
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Label.js","sourceRoot":"","sources":["../../../../../src/.internal/core/render/Label.ts"],"names":[],"mappings":";AAIA,OAAO,EAAE,IAAI,EAAE,MAAM,gBAAgB,CAAC;AACtC,OAAO,EAAE,GAAG,EAAE,IAAI,EAAE,MAAM,iBAAiB,CAAC;AAC5C,OAAO,EAAE,SAAS,EAAyC,MAAM,aAAa,CAAC;AAE/E,OAAO,KAAM,MAAM,MAAM,uBAAuB,CAAC;AACjD,OAAO,KAAM,KAAK,MAAM,sBAAsB,CAAC;AAwM/C;;;;GAIG;AACH;IAA2B,yBAAS;IAApC;QAAA,qEA0JC;QArJA;;;;;WAAuB;QAEvB;;;;mBAAqC;gBACpC,MAAM;gBACN,MAAM;gBACN,WAAW;gBACX,YAAY;gBACZ,UAAU;gBACV,WAAW;gBACX,YAAY;gBACZ,WAAW;gBACX,aAAa;gBACb,gBAAgB;gBAChB,aAAa;gB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AC,EAAE;gBAClC,IAAI,CAAC,IAAI,CAAC,aAAa,EAAE,CAAC;aAC1B;QACF,CAAC;;IAED;;;;;OAKG;;;;;eACH;YACC,OAAO,IAAI,CAAC,KAAK,CAAC,QAAQ,EAAE,CAAC;QAC9B,CAAC;;IA9GD;;;;eAAkC,OAAO;OAAC;IAC1C;;;;eAA0C,SAAS,CAAC,UAAU,CAAC,MAAM,CAAC,CAAC,KAAK,CAAC,SAAS,CAAC,CAAC;OAAC;IA8G1F,YAAC;CAAA,AA1JD,CAA2B,SAAS,GA0JnC;SA1JY,KAAK","sourcesContent":["import type { Color } from \"../util/Color\";\nimport type { Percent } from \"../util/Percent\";\nimport type { DataItem, IComponentDataItem } from \"./Component\";\n\nimport { Text } from \"../render/Text\";\nimport { p50, p100 } from \"../util/Percent\";\nimport { Container, IContainerPrivate, IContainerSettings } from \"./Container\";\n\nimport * as $array from \"../../core/util/Array\";\nimport * as $type from \"../../core/util/Type\";\n\n\nexport interface ILabelSettings extends IContainerSettings {\n\n\t/**\n\t * Labels' text.\n\t */\n\ttext?: string;\n\n\t/**\n\t * Text color.\n\t */\n\tfill?: Color;\n\n\t/**\n\t * Alignment.\n\t */\n\ttextAlign?: \"start\" | \"end\" | \"left\" | \"right\" | \"center\";\n\n\t/**\n\t * Font family to use for the label.\n\t *\n\t * Multiple fonts can be separated by commas.\n\t */\n\tfontFamily?: string;\n\n\t/**\n\t * Font size in misc any supported CSS format (pixel, point, em, etc.).\n\t */\n\tfontSize?: string | number;\n\n\t/**\n\t * Font weight.\n\t */\n\tfontWeight?: \"normal\" | \"bold\" | \"bolder\" | \"lighter\" | \"100\" | \"200\" | \"300\" | \"400\" | \"500\" | \"600\" | \"700\" | \"800\" | \"900\";\n\n\t/**\n\t * Font style.\n\t */\n\tfontStyle?: \"normal\" | \"italic\" | \"oblique\";\n\n\t/**\n\t * Font variant.\n\t */\n\tfontVariant?: \"normal\" | \"small-caps\";\n\n\t/**\n\t * Text decoration.\n\t *\n\t * Supported options `\"underline\"`, `\"line-through\"`.\n\t *\n\t * @since 5.0.15\n\t */\n\ttextDecoration?: \"underline\" | \"line-through\";\n\n\t/**\n\t * Line height in percent or absolute pixels.\n\t */\n\tlineHeight?: Percent | number;\n\n\t/**\n\t * How mouch of the height should be considered to go below baseline.\n\t *\n\t * @default 0.19\n\t */\n\tbaselineRatio?: number;\n\n\t/**\n\t * Opacity of the label.\n\t *\n\t * 0 - fully transparent; 1 - fully opaque.\n\t */\n\topacity?: number;\n\n\t/**\n\t * Text direction.\n\t *\n\t * @default \"ltr\"\n\t */\n\tdirection?: \"ltr\" | \"rtl\";\n\n\t/**\n\t * A base line to use when aligning text chunks vertically.\n\t */\n\ttextBaseline?: \"top\" | \"hanging\" | \"middle\" | \"alphabetic\" | \"ideographic\" | \"bottom\";\n\n\t/**\n\t * How to handle labels that do not fit into its designated space.\n\t *\n\t * @see {@link https://www.amcharts.com/docs/v5/concepts/common-elements/labels/#Oversized_text} for more info\n\t */\n\toversizedBehavior?: \"none\" | \"hide\" | \"fit\" | \"wrap\" | \"truncate\";\n\n\t/**\n\t * Whether words can be broken when truncating or wrapping text.\n\t *\n\t * @default false\n\t */\n\tbreakWords?: boolean;\n\n\t/**\n\t * Ellipsis characters to use when truncating text.\n\t *\n\t * Will use Unicode ellipsis symbol (`\"…\"`) by default, which might not be\n\t * available in all fonts. If ellipsis looks broken, use different\n\t * characters. E.g.:\n\t *\n\t * ```TypeScript\n\t * label.set(\"ellipsis\", \"...\");\n\t * ```\n\t * ```JavaScript\n\t * label.set(\"ellipsis\", \"...\");\n\t * ```\n\t *\n\t *\n\t * @default \"…\"\n\t */\n\tellipsis?: string;\n\n\t/**\n\t * Minimum relative scale allowed for label when scaling down\n\t * when `oversizedBehavior` is set to `\"fit\"`.\n\t *\n\t * If fitting the label would require it to scale beyond `minScale` it would\n\t * be hidden instead.\n\t */\n\tminScale?: number;\n\n\t/**\n\t * If set to `true` the label will parse `text` for data placeholders and\n\t * will try to populate them with actual data.\n\t *\n\t * @see {@link https://www.amcharts.com/docs/v5/concepts/common-elements/labels/#Data_placeholders} for more info\n\t */\n\tpopulateText?: boolean;\n\n\t/**\n\t * If set to `true`, will ignore in-line formatting blocks and will display\n\t * text exactly as it is.\n\t *\n\t * @default false\n\t */\n\tignoreFormatting?: boolean;\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// The following migh be supported some day:\n\t// padding?: number;\n\t// stroke?: number;\n\t// strokeThickness?: number;\n\t// trim?: number;\n\t// wordWrap?: boolean;\n\t// leading?: number;\n\t// letterSpacing?: number;\n}\n\nexport interface ILabelPrivate extends IContainerPrivate {\n}\n\n/**\n * Creates a label with support for in-line styling and data bindings.\n *\n * @see {@link https://www.amcharts.com/docs/v5/concepts/common-elements/labels/} for more info\n */\nexport class Label extends Container {\n\n\tdeclare public _settings: ILabelSettings;\n\tdeclare public _privateSettings: ILabelPrivate;\n\n\tprotected _text!: Text;\n\n\tprotected _textKeys: Array<string> = [\n\t\t\"text\",\n\t\t\"fill\",\n\t\t\"textAlign\",\n\t\t\"fontFamily\",\n\t\t\"fontSize\",\n\t\t\"fontStyle\",\n\t\t\"fontWeight\",\n\t\t\"fontStyle\",\n\t\t\"fontVariant\",\n\t\t\"textDecoration\",\n\t\t\"shadowColor\",\n\t\t\"shadowBlur\",\n\t\t\"shadowOffsetX\",\n\t\t\"shadowOffsetY\",\n\t\t\"shadowOpacity\",\n\t\t// \"leading\",\n\t\t// \"letterSpacing\",\n\t\t\"lineHeight\",\n\t\t\"baselineRatio\",\n\t\t//\"padding\",\n\t\t// \"stroke\",\n\t\t// \"strokeThickness\",\n\t\t// \"trim\",\n\t\t// \"wordWrap\",\n\t\t\"direction\",\n\t\t\"textBaseline\",\n\t\t\"oversizedBehavior\",\n\t\t\"breakWords\",\n\t\t\"ellipsis\",\n\t\t\"minScale\",\n\t\t\"populateText\",\n\t\t\"role\",\n\t\t\"ignoreFormatting\"\n\t];\n\n\tpublic static className: string = \"Label\";\n\tpublic static classNames: Array<string> = Container.classNames.concat([Label.className]);\n\n\t/**\n\t * @ignore Text is not to be used directly\n\t */\n\tpublic get text(): Text {\n\t\treturn this._text;\n\t}\n\n\tprotected _afterNew() {\n\t\tsuper._afterNew();\n\n\t\tthis._makeText();\n\n\t\t$array.each(this._textKeys, (property) => {\n\t\t\tconst propValue = this.get(property as any);\n\t\t\tif (propValue != undefined) {\n\t\t\t\tthis._text.set(property as any, propValue);\n\t\t\t}\n\t\t})\n\t}\n\n\tpublic _makeText() {\n\t\tthis._text = this.children.push(Text.new(this._root, {}));\n\t}\n\n\tpublic _updateChildren() {\n\t\tsuper._updateChildren();\n\n\t\t$array.each(this._textKeys, (property) => {\n\t\t\tthis._text.set(property as any, this.get(property as any));\n\t\t})\n\n\t\tif (this.isDirty(\"maxWidth\")) {\n\t\t\tthis._setMaxDimentions();\n\t\t}\n\n\t\tif (this.isDirty(\"maxHeight\")) {\n\t\t\tthis._setMaxDimentions();\n\t\t}\n\n\t\tif (this.isDirty(\"rotation\")) {\n\t\t\tthis._setMaxDimentions();\n\t\t}\n\n\t\tif (this.isDirty(\"textAlign\") || this.isDirty(\"width\")) {\n\t\t\tconst textAlign = this.get(\"textAlign\");\n\t\t\tlet x: number | Percent | undefined;\n\t\t\tif (this.get(\"width\") != null) {\n\t\t\t\tif (textAlign == \"right\") {\n\t\t\t\t\tx = p100;\n\t\t\t\t}\n\t\t\t\telse if (textAlign == \"center\") {\n\t\t\t\t\tx = p50;\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tx = 0;\n\t\t\t\t}\n\t\t\t}\n\t\t\telse {\n\t\t\t\tif (textAlign == \"left\" || textAlign == \"start\") {\n\t\t\t\t\tx = this.get(\"paddingLeft\");\n\t\t\t\t}\n\t\t\t\telse if (textAlign == \"right\" || textAlign == \"end\") {\n\t\t\t\t\tx = -this.get(\"paddingRight\");\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tthis.text.set(\"x\", x);\n\t\t}\n\t}\n\n\tprotected _setMaxDimentions() {\n\t\tconst rotation = this.get(\"rotation\");\n\t\tconst vertical = rotation == 90 || rotation == 270;\n\n\t\tconst maxWidth = this.get(\"maxWidth\", Infinity);\n\t\tif ($type.isNumber(maxWidth)) {\n\t\t\tthis.text.set(vertical ? \"maxHeight\" : \"maxWidth\", maxWidth - this.get(\"paddingLeft\", 0) - this.get(\"paddingRight\", 0));\n\t\t}\n\t\telse {\n\t\t\tthis.text.set(vertical ? \"maxHeight\" : \"maxWidth\", undefined);\n\t\t}\n\n\t\tconst maxHeight = this.get(\"maxHeight\", Infinity);\n\t\tif ($type.isNumber(maxHeight)) {\n\t\t\tthis.text.set(vertical ? \"maxWidth\" : \"maxHeight\", maxHeight - this.get(\"paddingTop\", 0) - this.get(\"paddingBottom\", 0));\n\t\t}\n\t\telse {\n\t\t\tthis.text.set(vertical ? \"maxWidth\" : \"maxHeight\", undefined);\n\t\t}\n\t}\n\n\tpublic _setDataItem(dataItem?: DataItem<IComponentDataItem>): void {\n\t\tsuper._setDataItem(dataItem);\n\t\tthis._markDirtyKey(\"text\")\n\t\tif (this.text.get(\"populateText\")) {\n\t\t\tthis.text.markDirtyText();\n\t\t}\n\t}\n\n\t/**\n\t * Returns text with populated placeholders and formatting if `populateText` is\n\t * set to `true`.\n\t *\n\t * @return Populated text\n\t */\n\tpublic getText(): string {\n\t\treturn this._text._getText();\n\t}\n}\n"]}
|
|
1
|
+
{"version":3,"file":"Label.js","sourceRoot":"","sources":["../../../../../src/.internal/core/render/Label.ts"],"names":[],"mappings":";AAIA,OAAO,EAAE,IAAI,EAAE,MAAM,gBAAgB,CAAC;AACtC,OAAO,EAAE,GAAG,EAAE,IAAI,EAAE,MAAM,iBAAiB,CAAC;AAC5C,OAAO,EAAE,SAAS,EAAyC,MAAM,aAAa,CAAC;AAE/E,OAAO,KAAM,MAAM,MAAM,uBAAuB,CAAC;AACjD,OAAO,KAAM,KAAK,MAAM,sBAAsB,CAAC;AAwM/C;;;;GAIG;AACH;IAA2B,yBAAS;IAApC;QAAA,qEAkKC;QA7JA;;;;;WAAuB;QAEvB;;;;mBAAqC;gBACpC,MAAM;gBACN,MAAM;gBACN,WAAW;gBACX,YAAY;gBACZ,UAAU;gBACV,WAAW;gBACX,YAAY;gBACZ,WAAW;gBACX,aAAa;gBACb,gBAAgB;gBAChB,aAAa;gBACb,YAAY;gBACZ,eAAe;gBACf,eAAe;gBACf,eAAe;gBACf,aAAa;gBACb,mBAAmB;gBACnB,YAAY;gBACZ,eAAe;gBACf,YAAY;gBACZ,YAAY;gBACZ,qBAAqB;gBACrB,UAAU;gBACV,cAAc;gBACd,WAAW;gBACX,cAAc;gBACd,mBAAmB;gBACnB,YAAY;gBACZ,UAAU;gBACV,UAAU;gBACV,cAAc;gBACd,MAAM;gBACN,kBAAkB;aAClB;WAAC;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AC,cAAc,CAAC,EAAE;gBAClC,IAAI,CAAC,IAAI,CAAC,aAAa,EAAE,CAAC;aAC1B;QACF,CAAC;;IAED;;;;;OAKG;;;;;eACH;YACC,OAAO,IAAI,CAAC,KAAK,CAAC,QAAQ,EAAE,CAAC;QAC9B,CAAC;;IAtHD;;;;eAAkC,OAAO;OAAC;IAC1C;;;;eAA0C,SAAS,CAAC,UAAU,CAAC,MAAM,CAAC,CAAC,KAAK,CAAC,SAAS,CAAC,CAAC;OAAC;IAsH1F,YAAC;CAAA,AAlKD,CAA2B,SAAS,GAkKnC;SAlKY,KAAK","sourcesContent":["import type { Color } from \"../util/Color\";\nimport type { Percent } from \"../util/Percent\";\nimport type { DataItem, IComponentDataItem } from \"./Component\";\n\nimport { Text } from \"../render/Text\";\nimport { p50, p100 } from \"../util/Percent\";\nimport { Container, IContainerPrivate, IContainerSettings } from \"./Container\";\n\nimport * as $array from \"../../core/util/Array\";\nimport * as $type from \"../../core/util/Type\";\n\n\nexport interface ILabelSettings extends IContainerSettings {\n\n\t/**\n\t * Labels' text.\n\t */\n\ttext?: string;\n\n\t/**\n\t * Text color.\n\t */\n\tfill?: Color;\n\n\t/**\n\t * Alignment.\n\t */\n\ttextAlign?: \"start\" | \"end\" | \"left\" | \"right\" | \"center\";\n\n\t/**\n\t * Font family to use for the label.\n\t *\n\t * Multiple fonts can be separated by commas.\n\t */\n\tfontFamily?: string;\n\n\t/**\n\t * Font size in misc any supported CSS format (pixel, point, em, etc.).\n\t */\n\tfontSize?: string | number;\n\n\t/**\n\t * Font weight.\n\t */\n\tfontWeight?: \"normal\" | \"bold\" | \"bolder\" | \"lighter\" | \"100\" | \"200\" | \"300\" | \"400\" | \"500\" | \"600\" | \"700\" | \"800\" | \"900\";\n\n\t/**\n\t * Font style.\n\t */\n\tfontStyle?: \"normal\" | \"italic\" | \"oblique\";\n\n\t/**\n\t * Font variant.\n\t */\n\tfontVariant?: \"normal\" | \"small-caps\";\n\n\t/**\n\t * Text decoration.\n\t *\n\t * Supported options `\"underline\"`, `\"line-through\"`.\n\t *\n\t * @since 5.0.15\n\t */\n\ttextDecoration?: \"underline\" | \"line-through\";\n\n\t/**\n\t * Line height in percent or absolute pixels.\n\t */\n\tlineHeight?: Percent | number;\n\n\t/**\n\t * How mouch of the height should be considered to go below baseline.\n\t *\n\t * @default 0.19\n\t */\n\tbaselineRatio?: number;\n\n\t/**\n\t * Opacity of the label.\n\t *\n\t * 0 - fully transparent; 1 - fully opaque.\n\t */\n\topacity?: number;\n\n\t/**\n\t * Text direction.\n\t *\n\t * @default \"ltr\"\n\t */\n\tdirection?: \"ltr\" | \"rtl\";\n\n\t/**\n\t * A base line to use when aligning text chunks vertically.\n\t */\n\ttextBaseline?: \"top\" | \"hanging\" | \"middle\" | \"alphabetic\" | \"ideographic\" | \"bottom\";\n\n\t/**\n\t * How to handle labels that do not fit into its designated space.\n\t *\n\t * @see {@link https://www.amcharts.com/docs/v5/concepts/common-elements/labels/#Oversized_text} for more info\n\t */\n\toversizedBehavior?: \"none\" | \"hide\" | \"fit\" | \"wrap\" | \"truncate\";\n\n\t/**\n\t * Whether words can be broken when truncating or wrapping text.\n\t *\n\t * @default false\n\t */\n\tbreakWords?: boolean;\n\n\t/**\n\t * Ellipsis characters to use when truncating text.\n\t *\n\t * Will use Unicode ellipsis symbol (`\"…\"`) by default, which might not be\n\t * available in all fonts. If ellipsis looks broken, use different\n\t * characters. E.g.:\n\t *\n\t * ```TypeScript\n\t * label.set(\"ellipsis\", \"...\");\n\t * ```\n\t * ```JavaScript\n\t * label.set(\"ellipsis\", \"...\");\n\t * ```\n\t *\n\t *\n\t * @default \"…\"\n\t */\n\tellipsis?: string;\n\n\t/**\n\t * Minimum relative scale allowed for label when scaling down\n\t * when `oversizedBehavior` is set to `\"fit\"`.\n\t *\n\t * If fitting the label would require it to scale beyond `minScale` it would\n\t * be hidden instead.\n\t */\n\tminScale?: number;\n\n\t/**\n\t * If set to `true` the label will parse `text` for data placeholders and\n\t * will try to populate them with actual data.\n\t *\n\t * @see {@link https://www.amcharts.com/docs/v5/concepts/common-elements/labels/#Data_placeholders} for more info\n\t */\n\tpopulateText?: boolean;\n\n\t/**\n\t * If set to `true`, will ignore in-line formatting blocks and will display\n\t * text exactly as it is.\n\t *\n\t * @default false\n\t */\n\tignoreFormatting?: boolean;\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// The following migh be supported some day:\n\t// padding?: number;\n\t// stroke?: number;\n\t// strokeThickness?: number;\n\t// trim?: number;\n\t// wordWrap?: boolean;\n\t// leading?: number;\n\t// letterSpacing?: number;\n}\n\nexport interface ILabelPrivate extends IContainerPrivate {\n}\n\n/**\n * Creates a label with support for in-line styling and data bindings.\n *\n * @see {@link https://www.amcharts.com/docs/v5/concepts/common-elements/labels/} for more info\n */\nexport class Label extends Container {\n\n\tdeclare public _settings: ILabelSettings;\n\tdeclare public _privateSettings: ILabelPrivate;\n\n\tprotected _text!: Text;\n\n\tprotected _textKeys: Array<string> = [\n\t\t\"text\",\n\t\t\"fill\",\n\t\t\"textAlign\",\n\t\t\"fontFamily\",\n\t\t\"fontSize\",\n\t\t\"fontStyle\",\n\t\t\"fontWeight\",\n\t\t\"fontStyle\",\n\t\t\"fontVariant\",\n\t\t\"textDecoration\",\n\t\t\"shadowColor\",\n\t\t\"shadowBlur\",\n\t\t\"shadowOffsetX\",\n\t\t\"shadowOffsetY\",\n\t\t\"shadowOpacity\",\n\t\t// \"leading\",\n\t\t// \"letterSpacing\",\n\t\t\"lineHeight\",\n\t\t\"baselineRatio\",\n\t\t//\"padding\",\n\t\t// \"stroke\",\n\t\t// \"strokeThickness\",\n\t\t// \"trim\",\n\t\t// \"wordWrap\",\n\t\t\"direction\",\n\t\t\"textBaseline\",\n\t\t\"oversizedBehavior\",\n\t\t\"breakWords\",\n\t\t\"ellipsis\",\n\t\t\"minScale\",\n\t\t\"populateText\",\n\t\t\"role\",\n\t\t\"ignoreFormatting\"\n\t];\n\n\tpublic static className: string = \"Label\";\n\tpublic static classNames: Array<string> = Container.classNames.concat([Label.className]);\n\n\t/**\n\t * @ignore Text is not to be used directly\n\t */\n\tpublic get text(): Text {\n\t\treturn this._text;\n\t}\n\n\tprotected _afterNew() {\n\t\tsuper._afterNew();\n\n\t\tthis._makeText();\n\n\t\t$array.each(this._textKeys, (property) => {\n\t\t\tconst propValue = this.get(property as any);\n\t\t\tif (propValue != undefined) {\n\t\t\t\tthis._text.set(property as any, propValue);\n\t\t\t}\n\t\t});\n\n\t\tthis.onPrivate(\"maxWidth\", () => {\n\t\t\tthis._setMaxDimentions();\n\t\t});\n\n\t\tthis.onPrivate(\"maxHeight\", () => {\n\t\t\tthis._setMaxDimentions();\n\t\t});\n\t}\n\n\tpublic _makeText() {\n\t\tthis._text = this.children.push(Text.new(this._root, {}));\n\t}\n\n\tpublic _updateChildren() {\n\t\tsuper._updateChildren();\n\n\t\t$array.each(this._textKeys, (property) => {\n\t\t\tthis._text.set(property as any, this.get(property as any));\n\t\t})\n\n\t\tif (this.isDirty(\"maxWidth\")) {\n\t\t\tthis._setMaxDimentions();\n\t\t}\n\n\t\tif (this.isDirty(\"maxHeight\")) {\n\t\t\tthis._setMaxDimentions();\n\t\t}\n\n\t\tif (this.isDirty(\"rotation\")) {\n\t\t\tthis._setMaxDimentions();\n\t\t}\n\n\t\tif (this.isDirty(\"textAlign\") || this.isDirty(\"width\")) {\n\t\t\tconst textAlign = this.get(\"textAlign\");\n\t\t\tlet x: number | Percent | undefined;\n\t\t\tif (this.get(\"width\") != null) {\n\t\t\t\tif (textAlign == \"right\") {\n\t\t\t\t\tx = p100;\n\t\t\t\t}\n\t\t\t\telse if (textAlign == \"center\") {\n\t\t\t\t\tx = p50;\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tx = 0;\n\t\t\t\t}\n\t\t\t}\n\t\t\telse {\n\t\t\t\tif (textAlign == \"left\" || textAlign == \"start\") {\n\t\t\t\t\tx = this.get(\"paddingLeft\");\n\t\t\t\t}\n\t\t\t\telse if (textAlign == \"right\" || textAlign == \"end\") {\n\t\t\t\t\tx = -this.get(\"paddingRight\");\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tthis.text.set(\"x\", x);\n\t\t}\n\t}\n\n\tprotected _setMaxDimentions() {\n\t\tconst rotation = this.get(\"rotation\");\n\t\tconst vertical = rotation == 90 || rotation == 270;\n\n\t\tconst maxWidth = this.get(\"maxWidth\", this.getPrivate(\"maxWidth\", Infinity));\n\t\tif ($type.isNumber(maxWidth)) {\n\t\t\tthis.text.set(vertical ? \"maxHeight\" : \"maxWidth\", maxWidth - this.get(\"paddingLeft\", 0) - this.get(\"paddingRight\", 0));\n\t\t}\n\t\telse {\n\t\t\tthis.text.set(vertical ? \"maxHeight\" : \"maxWidth\", undefined);\n\t\t}\n\n\t\tconst maxHeight = this.get(\"maxHeight\", this.getPrivate(\"maxHeight\", Infinity));\n\t\tif ($type.isNumber(maxHeight)) {\n\t\t\tthis.text.set(vertical ? \"maxWidth\" : \"maxHeight\", maxHeight - this.get(\"paddingTop\", 0) - this.get(\"paddingBottom\", 0));\n\t\t}\n\t\telse {\n\t\t\tthis.text.set(vertical ? \"maxWidth\" : \"maxHeight\", undefined);\n\t\t}\n\t}\n\n\tpublic _setDataItem(dataItem?: DataItem<IComponentDataItem>): void {\n\t\tsuper._setDataItem(dataItem);\n\t\tthis._markDirtyKey(\"text\")\n\t\tif (this.text.get(\"populateText\")) {\n\t\t\tthis.text.markDirtyText();\n\t\t}\n\t}\n\n\t/**\n\t * Returns text with populated placeholders and formatting if `populateText` is\n\t * set to `true`.\n\t *\n\t * @return Populated text\n\t */\n\tpublic getText(): string {\n\t\treturn this._text._getText();\n\t}\n}\n"]}
|