@amcharts/amcharts5 5.4.11 → 5.5.1
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/hierarchy/ForceDirected.d.ts +0 -1
- package/.internal/charts/hierarchy/ForceDirected.d.ts.map +1 -1
- package/.internal/charts/hierarchy/ForceDirected.js +0 -1
- package/.internal/charts/hierarchy/ForceDirected.js.map +1 -1
- package/.internal/charts/stock/drawing/DrawingSeries.d.ts.map +1 -1
- package/.internal/charts/stock/drawing/DrawingSeries.js +4 -8
- package/.internal/charts/stock/drawing/DrawingSeries.js.map +1 -1
- package/.internal/charts/stock/drawing/SimpleLineSeries.d.ts.map +1 -1
- package/.internal/charts/stock/drawing/SimpleLineSeries.js +1 -0
- package/.internal/charts/stock/drawing/SimpleLineSeries.js.map +1 -1
- package/.internal/charts/stock/toolbar/PeriodSelector.d.ts +12 -1
- package/.internal/charts/stock/toolbar/PeriodSelector.d.ts.map +1 -1
- package/.internal/charts/stock/toolbar/PeriodSelector.js +41 -14
- package/.internal/charts/stock/toolbar/PeriodSelector.js.map +1 -1
- package/.internal/charts/xy/XYChart.js +1 -1
- package/.internal/charts/xy/XYChart.js.map +1 -1
- package/.internal/charts/xy/axes/Axis.d.ts +1 -0
- package/.internal/charts/xy/axes/Axis.d.ts.map +1 -1
- package/.internal/charts/xy/axes/Axis.js +34 -7
- package/.internal/charts/xy/axes/Axis.js.map +1 -1
- package/.internal/charts/xy/axes/CategoryAxis.d.ts.map +1 -1
- package/.internal/charts/xy/axes/CategoryAxis.js +2 -4
- package/.internal/charts/xy/axes/CategoryAxis.js.map +1 -1
- package/.internal/charts/xy/axes/DateAxis.d.ts +1 -1
- package/.internal/charts/xy/axes/DateAxis.d.ts.map +1 -1
- package/.internal/charts/xy/axes/DateAxis.js +3 -3
- package/.internal/charts/xy/axes/DateAxis.js.map +1 -1
- package/.internal/charts/xy/axes/GaplessDateAxis.d.ts +2 -1
- package/.internal/charts/xy/axes/GaplessDateAxis.d.ts.map +1 -1
- package/.internal/charts/xy/axes/GaplessDateAxis.js +8 -6
- package/.internal/charts/xy/axes/GaplessDateAxis.js.map +1 -1
- package/.internal/charts/xy/axes/ValueAxis.d.ts.map +1 -1
- package/.internal/charts/xy/axes/ValueAxis.js +18 -4
- 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 +10 -2
- package/.internal/charts/xy/series/BaseColumnSeries.js.map +1 -1
- package/.internal/charts/xy/series/XYSeries.d.ts +3 -0
- package/.internal/charts/xy/series/XYSeries.d.ts.map +1 -1
- package/.internal/charts/xy/series/XYSeries.js +3 -1
- 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/Registry.d.ts.map +1 -1
- package/.internal/core/Registry.js +1 -1
- package/.internal/core/Registry.js.map +1 -1
- package/.internal/core/Root.js +1 -1
- package/.internal/core/Root.js.map +1 -1
- package/.internal/core/render/Circle.d.ts +0 -1
- package/.internal/core/render/Circle.d.ts.map +1 -1
- package/.internal/core/render/Circle.js +1 -9
- package/.internal/core/render/Circle.js.map +1 -1
- package/.internal/core/render/Container.d.ts.map +1 -1
- package/.internal/core/render/Container.js +0 -11
- package/.internal/core/render/Container.js.map +1 -1
- package/.internal/core/render/Graphics.d.ts.map +1 -1
- package/.internal/core/render/Graphics.js +59 -54
- package/.internal/core/render/Graphics.js.map +1 -1
- package/.internal/core/render/Rectangle.d.ts +0 -1
- package/.internal/core/render/Rectangle.d.ts.map +1 -1
- package/.internal/core/render/Rectangle.js +1 -9
- package/.internal/core/render/Rectangle.js.map +1 -1
- package/.internal/core/render/Sprite.d.ts +94 -2
- package/.internal/core/render/Sprite.d.ts.map +1 -1
- package/.internal/core/render/Sprite.js +48 -8
- package/.internal/core/render/Sprite.js.map +1 -1
- package/.internal/core/render/backend/CanvasRenderer.d.ts +19 -14
- package/.internal/core/render/backend/CanvasRenderer.d.ts.map +1 -1
- package/.internal/core/render/backend/CanvasRenderer.js +66 -60
- package/.internal/core/render/backend/CanvasRenderer.js.map +1 -1
- package/.internal/core/render/backend/Renderer.d.ts +2 -2
- 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/patterns/GrainPattern.d.ts +79 -0
- package/.internal/core/render/patterns/GrainPattern.d.ts.map +1 -0
- package/.internal/core/render/patterns/GrainPattern.js +112 -0
- package/.internal/core/render/patterns/GrainPattern.js.map +1 -0
- package/.internal/core/render/patterns/Pattern.d.ts +3 -2
- package/.internal/core/render/patterns/Pattern.d.ts.map +1 -1
- package/.internal/core/render/patterns/Pattern.js +19 -9
- package/.internal/core/render/patterns/Pattern.js.map +1 -1
- package/.internal/core/render/patterns/PicturePattern.d.ts +1 -0
- package/.internal/core/render/patterns/PicturePattern.d.ts.map +1 -1
- package/.internal/core/render/patterns/PicturePattern.js +9 -0
- package/.internal/core/render/patterns/PicturePattern.js.map +1 -1
- package/.internal/core/render/patterns/RectanglePattern.d.ts.map +1 -1
- package/.internal/core/render/patterns/RectanglePattern.js +6 -5
- package/.internal/core/render/patterns/RectanglePattern.js.map +1 -1
- package/.internal/themes/DefaultTheme.d.ts.map +1 -1
- package/.internal/themes/DefaultTheme.js +11 -0
- package/.internal/themes/DefaultTheme.js.map +1 -1
- package/CHANGELOG.md +34 -0
- package/examples/javascript/flow-arc-horizontal/package.json +1 -1
- package/examples/javascript/flow-arc-vertical/package.json +1 -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/hierarchy-voronoi-treemap/package.json +1 -1
- package/examples/javascript/jest/package.json +1 -1
- package/examples/javascript/json-pie/package.json +1 -1
- package/examples/javascript/json-xy/package.json +1 -1
- package/examples/javascript/map-animating-along-lines/package.json +1 -1
- package/examples/javascript/map-day-and-night/package.json +1 -1
- package/examples/javascript/map-globe-rotate-to-country/package.json +1 -1
- package/examples/javascript/map-globe-with-projected-circles/package.json +1 -1
- package/examples/javascript/map-with-bubbles/package.json +1 -1
- package/examples/javascript/map-zoom-to-country/package.json +1 -1
- package/examples/javascript/misc-40-charts/package.json +1 -1
- package/examples/javascript/misc-microchart-grid/package.json +1 -1
- package/examples/javascript/pie-chart/package.json +1 -1
- package/examples/javascript/pie-donut-chart/package.json +1 -1
- package/examples/javascript/pie-variable-radius/package.json +1 -1
- package/examples/javascript/radar-column-iwatch-style/package.json +1 -1
- package/examples/javascript/radar-heat-map/package.json +1 -1
- package/examples/javascript/radar-line/package.json +1 -1
- package/examples/javascript/radar-time-line/package.json +1 -1
- package/examples/javascript/sliced-funnel/package.json +1 -1
- package/examples/javascript/sliced-pictorial-stacked/package.json +1 -1
- package/examples/javascript/sliced-pyramid/package.json +1 -1
- package/examples/javascript/stock-chart/package.json +1 -1
- package/examples/javascript/stock-chart-comparing-stocks/package.json +1 -1
- package/examples/javascript/stock-chart-data-granularity/package.json +1 -1
- package/examples/javascript/stock-chart-data-grouping/package.json +1 -1
- package/examples/javascript/stock-chart-intraday/package.json +1 -1
- package/examples/javascript/stock-chart-live/package.json +1 -1
- package/examples/javascript/stock-chart-volume-separate-panel/package.json +1 -1
- package/examples/javascript/venn-diagram/package.json +1 -1
- package/examples/javascript/wordcloud-with-data/package.json +1 -1
- package/examples/javascript/wordcloud-with-text/package.json +1 -1
- package/examples/javascript/xy-100-percent-stacked-column/package.json +1 -1
- package/examples/javascript/xy-animated-bullet-at-the-end-of-the-series/package.json +1 -1
- package/examples/javascript/xy-bubble/package.json +1 -1
- package/examples/javascript/xy-candlestick/package.json +1 -1
- package/examples/javascript/xy-clustered-column/package.json +1 -1
- package/examples/javascript/xy-column/package.json +1 -1
- package/examples/javascript/xy-comparing-series-google-analytics-style/package.json +1 -1
- package/examples/javascript/xy-data-grouping/package.json +1 -1
- package/examples/javascript/xy-draggable-range/package.json +1 -1
- package/examples/javascript/xy-drawing-series-with-mouse-or-touch/package.json +1 -1
- package/examples/javascript/xy-dumbbell plot/package.json +1 -1
- package/examples/javascript/xy-evenly-spaced-date-axis/package.json +1 -1
- package/examples/javascript/xy-line/package.json +1 -1
- package/examples/javascript/xy-line-highlight-on-legend-hover/package.json +1 -1
- package/examples/javascript/xy-live-data/package.json +1 -1
- package/examples/javascript/xy-multiple-synced-value-axes/package.json +1 -1
- package/examples/javascript/xy-ohlc/package.json +1 -1
- package/examples/javascript/xy-real-time-data-sorting/package.json +1 -1
- package/examples/javascript/xy-smoothed-line/package.json +1 -1
- package/examples/javascript/xy-stacked-and-clustered-column/package.json +1 -1
- package/examples/javascript/xy-stacked-column/package.json +1 -1
- package/examples/javascript/xy-stacked-step/package.json +1 -1
- package/examples/javascript/xy-stock/package.json +1 -1
- package/examples/javascript/xy-stock-comparing/package.json +1 -1
- package/examples/typescript/flow-arc-horizontal/package.json +1 -1
- package/examples/typescript/flow-arc-vertical/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/hierarchy-voronoi-treemap/package.json +1 -1
- package/examples/typescript/jest/package.json +1 -1
- package/examples/typescript/json-pie/package.json +1 -1
- package/examples/typescript/json-xy/package.json +1 -1
- package/examples/typescript/map-animating-along-lines/package.json +1 -1
- package/examples/typescript/map-day-and-night/package.json +1 -1
- package/examples/typescript/map-globe-rotate-to-country/package.json +1 -1
- package/examples/typescript/map-globe-with-projected-circles/package.json +1 -1
- package/examples/typescript/map-with-bubbles/package.json +1 -1
- package/examples/typescript/map-zoom-to-country/package.json +1 -1
- package/examples/typescript/misc-40-charts/package.json +1 -1
- package/examples/typescript/misc-microchart-grid/package.json +1 -1
- package/examples/typescript/pie-chart/package.json +1 -1
- package/examples/typescript/pie-donut-chart/package.json +1 -1
- package/examples/typescript/pie-variable-radius/package.json +1 -1
- package/examples/typescript/radar-column-iwatch-style/package.json +1 -1
- package/examples/typescript/radar-heat-map/package.json +1 -1
- package/examples/typescript/radar-line/package.json +1 -1
- package/examples/typescript/radar-time-line/package.json +1 -1
- package/examples/typescript/sliced-funnel/package.json +1 -1
- package/examples/typescript/sliced-pictorial-stacked/package.json +1 -1
- package/examples/typescript/sliced-pyramid/package.json +1 -1
- package/examples/typescript/stock-chart/package.json +1 -1
- package/examples/typescript/stock-chart-comparing-stocks/package.json +1 -1
- package/examples/typescript/stock-chart-data-granularity/package.json +1 -1
- package/examples/typescript/stock-chart-data-grouping/package.json +1 -1
- package/examples/typescript/stock-chart-intraday/package.json +1 -1
- package/examples/typescript/stock-chart-live/package.json +1 -1
- package/examples/typescript/stock-chart-volume-separate-panel/package.json +1 -1
- package/examples/typescript/venn-diagram/package.json +1 -1
- package/examples/typescript/wordcloud-with-data/package.json +1 -1
- package/examples/typescript/wordcloud-with-text/package.json +1 -1
- package/examples/typescript/xy-100-percent-stacked-column/package.json +1 -1
- package/examples/typescript/xy-animated-bullet-at-the-end-of-the-series/package.json +1 -1
- package/examples/typescript/xy-bubble/package.json +1 -1
- package/examples/typescript/xy-candlestick/package.json +1 -1
- package/examples/typescript/xy-clustered-column/package.json +1 -1
- package/examples/typescript/xy-column/package.json +1 -1
- package/examples/typescript/xy-comparing-series-google-analytics-style/package.json +1 -1
- package/examples/typescript/xy-data-grouping/package.json +1 -1
- package/examples/typescript/xy-draggable-range/package.json +1 -1
- package/examples/typescript/xy-drawing-series-with-mouse-or-touch/package.json +1 -1
- package/examples/typescript/xy-dumbbell plot/package.json +1 -1
- package/examples/typescript/xy-evenly-spaced-date-axis/package.json +1 -1
- package/examples/typescript/xy-line/package.json +1 -1
- package/examples/typescript/xy-line-highlight-on-legend-hover/package.json +1 -1
- package/examples/typescript/xy-live-data/package.json +1 -1
- package/examples/typescript/xy-multiple-synced-value-axes/package.json +1 -1
- package/examples/typescript/xy-ohlc/package.json +1 -1
- package/examples/typescript/xy-real-time-data-sorting/package.json +1 -1
- package/examples/typescript/xy-smoothed-line/package.json +1 -1
- package/examples/typescript/xy-stacked-and-clustered-column/package.json +1 -1
- package/examples/typescript/xy-stacked-column/package.json +1 -1
- package/examples/typescript/xy-stacked-step/package.json +1 -1
- package/examples/typescript/xy-stock/package.json +1 -1
- package/examples/typescript/xy-stock-comparing/package.json +1 -1
- package/index.d.ts +2 -0
- package/index.d.ts.map +1 -1
- package/index.js +2 -0
- package/index.js.map +1 -1
- package/package.json +1 -1
|
@@ -380,17 +380,6 @@ export class Container extends Sprite {
|
|
|
380
380
|
_prepareChildren() {
|
|
381
381
|
const innerWidth = this.innerWidth();
|
|
382
382
|
const innerHeight = this.innerHeight();
|
|
383
|
-
const fi = "forceInactive";
|
|
384
|
-
if (this.isDirty(fi)) {
|
|
385
|
-
const forceInactive = this.get(fi);
|
|
386
|
-
this.walkChildren((child) => {
|
|
387
|
-
child.set(fi, forceInactive);
|
|
388
|
-
});
|
|
389
|
-
const background = this.get("background");
|
|
390
|
-
if (background) {
|
|
391
|
-
background.set(fi, forceInactive);
|
|
392
|
-
}
|
|
393
|
-
}
|
|
394
383
|
if (innerWidth != this._prevWidth || innerHeight != this._prevHeight) {
|
|
395
384
|
let layout = this.get("layout");
|
|
396
385
|
let horizontal = false;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Container.js","sourceRoot":"","sources":["../../../../../src/.internal/core/render/Container.ts"],"names":[],"mappings":"AAOA,OAAO,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAC5C,OAAO,EAAE,OAAO,EAAE,MAAM,iBAAiB,CAAC;AAC1C,OAAO,EAAE,MAAM,EAAkD,MAAM,UAAU,CAAC;AAClF,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AACxC,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AACtD,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAClD,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC1C,OAAO,EAAE,cAAc,EAAE,MAAM,wBAAwB,CAAC;AAGxD,OAAO,KAAK,MAAM,MAAM,eAAe,CAAC;AACxC,OAAO,KAAK,KAAK,MAAM,cAAc,CAAC;AACtC,OAAO,KAAK,MAAM,MAAM,eAAe,CAAC;AAyGxC;;;;;;;;;GASG;AACH,MAAM,OAAO,SAAU,SAAQ,MAAM;IAArC;;QAMC;;;;mBAA8B,IAAI,CAAC,KAAK,CAAC,SAAS,CAAC,aAAa,EAAE;WAAC;QAEnE;;;;mBAAsC,IAAI,CAAC,KAAK,CAAC,SAAS,CAAC,aAAa,EAAE;WAAC;QAE3E;;WAEG;QACH;;;;mBAAoC,IAAI,QAAQ,CAAC,IAAI,CAAC;WAAC;QAEvD;;;;mBAAgD,EAAE;WAAC;QACnD;;;;mBAAoD,EAAE;WAAC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,OAAO,EAAE;YACnC,IAAI,CAAC,KAAK,CAAC,eAAe,CAAC,IAAI,EAAE,cAAc,CAAC,IAAI,EAAE,IAAI,CAAC,CAAC,CAAC;SAC7D;IACF,CAAC;;AAxmBD;;;;WAAkC,WAAW;GAAC;AAC9C;;;;WAA0C,MAAM,CAAC,UAAU,CAAC,MAAM,CAAC,CAAC,SAAS,CAAC,SAAS,CAAC,CAAC;GAAC","sourcesContent":["import type { Graphics } from \"./Graphics\";\nimport type { Layout } from \"./Layout\";\nimport type { IContainer } from \"./backend/Renderer\";\nimport type { IBounds } from \"../util/IBounds\";\nimport type { Scrollbar } from \"./Scrollbar\";\nimport type { DataItem, IComponentDataItem } from \"./Component\";\n\nimport { Children } from \"../util/Children\";\nimport { Percent } from \"../util/Percent\";\nimport { Sprite, ISpriteSettings, ISpritePrivate, ISpriteEvents } from \"./Sprite\";\nimport { Rectangle } from \"./Rectangle\";\nimport { HorizontalLayout } from \"./HorizontalLayout\";\nimport { VerticalLayout } from \"./VerticalLayout\";\nimport { GridLayout } from \"./GridLayout\";\nimport { populateString } from \"../util/PopulateString\";\nimport type { IDisposer } from \"../util/Disposer\";\n\nimport * as $array from \"../util/Array\";\nimport * as $type from \"../util/Type\";\nimport * as $utils from \"../util/Utils\";\n\nexport interface IContainerSettings extends ISpriteSettings {\n\n\t/**\n\t * Left padding in pixels.\n\t */\n\tpaddingLeft?: number;\n\n\t/**\n\t * Right padding in pixels.\n\t */\n\tpaddingRight?: number;\n\n\t/**\n\t * Top padding in pixels.\n\t */\n\tpaddingTop?: number;\n\n\t/**\n\t * Bottom padding in pixels.\n\t */\n\tpaddingBottom?: number;\n\n\t/**\n\t * Background element.\n\t *\n\t * @see {@link https://www.amcharts.com/docs/v5/concepts/containers/#Background} for more info\n\t */\n\tbackground?: Graphics;\n\n\t/**\n\t * A method to layout\n\t *\n\t * @see {@link https://www.amcharts.com/docs/v5/concepts/containers/#Layout} for more info\n\t */\n\tlayout?: Layout | null;\n\n\t/**\n\t * An element to use as a container's mask (clipping region).\n\t *\n\t * @see {@link https://www.amcharts.com/docs/v5/concepts/containers/#Masks} for more info\n\t */\n\tmask?: Graphics | null;\n\n\t/**\n\t * If set to `true` all content going outside the bounds of the container\n\t * will be clipped.\n\t */\n\tmaskContent?: boolean;\n\n\t/**\n\t * If set to `true` all descendants - not just direct children, but every\n\t * element in it - will become \"interactive\".\n\t */\n\tinteractiveChildren?: boolean;\n\n\t/**\n\t * If set to `true`, applying a state on a container will also apply the same\n\t * state on its children.\n\t *\n\t * @see {@link https://www.amcharts.com/docs/v5/concepts/containers/#States} for more info\n\t */\n\tsetStateOnChildren?: boolean;\n\n\t/**\n\t * Setting this to an instance of [[Scrollbar]] will enable vertical\n\t * scrolling of content if it does not fit into the Container.\n\t * \n\t * @see {@link https://www.amcharts.com/docs/v5/concepts/containers/#Scrollbar} for more info\n\t */\n\tverticalScrollbar?: Scrollbar;\n\n\t/**\n\t * If set to `true` its children will be laid out in opposite order.\n\t *\n\t * @since 5.1.1\n\t */\n\treverseChildren?: boolean;\n\n\t/**\n\t * HTML content of the container.\n\t *\n\t * @see {@link https://www.amcharts.com/docs/v5/concepts/common-elements/html-content/} for more info\n\t * @since 5.2.11\n\t */\n\thtml?: string;\n\n}\n\nexport interface IContainerEvents extends ISpriteEvents {\n}\n\nexport interface IContainerPrivate extends ISpritePrivate {\n\n\t/**\n\t * A `<div>` element used for HTML content of the `Container`.\n\t */\n\thtmlElement?: HTMLDivElement;\n\n}\n\nexport interface IContainerEvents extends ISpriteEvents {\n}\n\n/**\n * A basic element that can have child elements, maintain their layout, and\n * have a background.\n *\n * It can have any [[Sprite]] element as a child, from very basic shapes, to\n * full-fledged charts.\n *\n * @see {@link https://www.amcharts.com/docs/v5/concepts/common-elements/containers/} for more info\n * @important\n */\nexport class Container extends Sprite {\n\n\tdeclare public _settings: IContainerSettings;\n\tdeclare public _privateSettings: IContainerPrivate;\n\tdeclare public _events: IContainerEvents;\n\n\tpublic _display: IContainer = this._root._renderer.makeContainer();\n\n\tpublic _childrenDisplay: IContainer = this._root._renderer.makeContainer();\n\n\t/**\n\t * List of Container's child elements.\n\t */\n\tpublic children: Children<Sprite> = new Children(this);\n\n\tpublic _percentageSizeChildren: Array<Sprite> = [];\n\tpublic _percentagePositionChildren: Array<Sprite> = [];\n\n\tpublic static className: string = \"Container\";\n\tpublic static classNames: Array<string> = Sprite.classNames.concat([Container.className]);\n\n\tpublic _prevWidth: number = 0;\n\tpublic _prevHeight: number = 0;\n\n\tprotected _contentWidth: number = 0;\n\tprotected _contentHeight: number = 0;\n\n\tprotected _contentMask: Rectangle | undefined;\n\n\tprotected _vsbd0: IDisposer | undefined;\n\tprotected _vsbd1: IDisposer | undefined;\n\n\tprotected _afterNew() {\n\t\tsuper._afterNew();\n\t\tthis._display.addChild(this._childrenDisplay);\n\t}\n\n\tprotected _dispose() {\n\t\t$array.eachReverse(this.allChildren(), (child) => {\n\t\t\tchild.dispose();\n\t\t});\n\n\t\tif (this.getPrivate(\"htmlElement\")) {\n\t\t\tthis._root._removeHTMLContent(this);\n\t\t}\n\n\t\tsuper._dispose();\n\t}\n\n\tpublic _changed() {\n\t\tsuper._changed();\n\n\t\tif (this.isDirty(\"interactiveChildren\")) {\n\t\t\tthis._display.interactiveChildren = this.get(\"interactiveChildren\", false);\n\t\t}\n\n\t\tif (this.isDirty(\"layout\")) {\n\t\t\tthis._prevWidth = 0;\n\t\t\tthis._prevHeight = 0;\n\t\t\tthis.markDirtyBounds();\n\t\t\tif (this._prevSettings.layout) {\n\t\t\t\tthis.children.each((child) => {\n\t\t\t\t\tchild.removePrivate(\"x\");\n\t\t\t\t\tchild.removePrivate(\"y\");\n\t\t\t\t})\n\t\t\t}\n\t\t}\n\n\t\tif (this.isDirty(\"paddingTop\") || this.isDirty(\"paddingBottom\") || this.isDirty(\"paddingLeft\") || this.isDirty(\"paddingRight\")) {\n\t\t\tthis.children.each((child) => {\n\t\t\t\tchild.markDirtyPosition();\n\t\t\t})\n\t\t}\n\n\t\tif (this.isDirty(\"maskContent\")) {\n\n\t\t\tconst childrenDisplay = this._childrenDisplay;\n\n\t\t\tlet contentMask = this._contentMask;\n\t\t\tif (this.get(\"maskContent\")) {\n\t\t\t\tif (!contentMask) {\n\t\t\t\t\tcontentMask = Rectangle.new(this._root, {\n\t\t\t\t\t\tx: -.5,\n\t\t\t\t\t\ty: -.5,\n\t\t\t\t\t\twidth: this.width() + 1,\n\t\t\t\t\t\theight: this.height() + 1\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\tthis._contentMask = undefined;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\tpublic _updateSize() {\n\t\tsuper._updateSize();\n\n\t\t$array.each(this._percentageSizeChildren, (child) => {\n\t\t\tchild._updateSize();\n\t\t});\n\n\t\t$array.each(this._percentagePositionChildren, (child) => {\n\t\t\tchild.markDirtyPosition();\n\t\t\tchild._updateSize();\n\t\t});\n\n\t\tthis.updateBackground();\n\t}\n\n\tprotected updateBackground() {\n\t\tconst background = this.get(\"background\");\n\t\tlet bounds = this._localBounds;\n\n\t\tif (bounds && !this.isHidden()) {\n\t\t\tlet x = bounds.left;\n\t\t\tlet y = bounds.top;\n\t\t\tlet w = bounds.right - x;\n\t\t\tlet h = bounds.bottom - y;\n\n\t\t\tlet maxWidth = this.get(\"maxWidth\");\n\t\t\tlet maxHeight = this.get(\"maxHeight\");\n\n\t\t\tif (maxHeight) {\n\t\t\t\tif (h > maxHeight) {\n\t\t\t\t\th = maxHeight;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif (maxWidth) {\n\t\t\t\tif (w > maxWidth) {\n\t\t\t\t\tw = maxWidth;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tlet width = this.width();\n\t\t\tlet height = this.height();\n\n\t\t\tif (background) {\n\t\t\t\tbackground.setAll({ width: w, height: h, x: x, y: y });\n\t\t\t\tif (this._display.interactive) {\n\t\t\t\t\tbackground._display.interactive = true;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tconst contentMask = this._contentMask;\n\t\t\tif (contentMask) {\n\t\t\t\tcontentMask.setAll({ width: width + 1, height: height + 1 });\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\tpublic _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\tconst fi = \"forceInactive\";\n\t\tif (this.isDirty(fi)) {\n\t\t\tconst forceInactive = this.get(fi);\n\t\t\tthis.walkChildren((child) => {\n\t\t\t\tchild.set(fi, forceInactive);\n\t\t\t})\n\t\t\tconst background = this.get(\"background\");\n\t\t\tif (background) {\n\t\t\t\tbackground.set(fi, forceInactive);\n\t\t\t}\n\t\t}\t\t\t\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\n\t\tif (this.isDirty(\"html\")) {\n\t\t\tconst html = this.get(\"html\");\n\t\t\tif (html && html !== \"\") {\n\t\t\t\tthis._root._setHTMLContent(this, populateString(this, this.get(\"html\", \"\")));\n\t\t\t}\n\t\t\telse {\n\t\t\t\tthis._root._removeHTMLContent(this);\n\t\t\t}\n\t\t\tthis._root._positionHTMLElement(this);\n\t\t}\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\n\t\t\t\tverticalScrollbar.startGrip.setPrivate(\"visible\", false);\n\t\t\t\tverticalScrollbar.endGrip.setPrivate(\"visible\", false);\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\tlet 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\n\t\t\t\t\tif (start + shiftY <= 0) {\n\t\t\t\t\t\tshiftY = -start;\n\t\t\t\t\t}\n\t\t\t\t\tif (end + shiftY >= 1) {\n\t\t\t\t\t\tshiftY = 1 - end;\n\t\t\t\t\t}\n\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\n\t\t\t\t})\n\n\t\t\t\tthis._disposers.push(this._vsbd0);\n\n\t\t\t\tthis._vsbd1 = verticalScrollbar.events.on(\"rangechanged\", () => {\n\t\t\t\t\tlet h = this._contentHeight;\n\t\t\t\t\tconst childrenDisplay = this._childrenDisplay;\n\t\t\t\t\tconst contentMask = this._contentMask;\n\n\t\t\t\t\tchildrenDisplay.y = -verticalScrollbar.get(\"start\") * h;\n\t\t\t\t\tchildrenDisplay.markDirtyLayer();\n\n\t\t\t\t\tif (contentMask) {\n\t\t\t\t\t\tcontentMask._display.y = -childrenDisplay.y;\n\t\t\t\t\t\tchildrenDisplay.mask = contentMask._display;\n\t\t\t\t\t}\n\t\t\t\t})\n\n\t\t\t\tthis._disposers.push(this._vsbd1);\n\n\t\t\t\tthis._display.addChild(verticalScrollbar._display);\n\t\t\t}\n\t\t\telse {\n\t\t\t\tconst previous = this._prevSettings.verticalScrollbar\n\t\t\t\tif (previous) {\n\t\t\t\t\tthis._display.removeChild(previous._display);\n\t\t\t\t\tif (this._vsbd0) {\n\t\t\t\t\t\tthis._vsbd0.dispose();\n\t\t\t\t\t}\n\t\t\t\t\tif (this._vsbd1) {\n\t\t\t\t\t\tthis._vsbd1.dispose();\n\t\t\t\t\t}\n\t\t\t\t\tconst childrenDisplay = this._childrenDisplay;\n\t\t\t\t\tchildrenDisplay.y = 0;\n\n\t\t\t\t\tthis.setPrivate(\"height\", undefined);\n\t\t\t\t\tthis.set(\"maskContent\", false);\n\t\t\t\t\tthis.set(\"paddingRight\", undefined);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tif (this.isDirty(\"background\")) {\n\t\t\t// TODO maybe this should dispose ?\n\t\t\tconst previous = this._prevSettings[\"background\"];\n\t\t\tif (previous) {\n\t\t\t\tthis._display.removeChild(previous._display);\n\t\t\t}\n\n\t\t\tconst background = this.get(\"background\");\n\t\t\tif (background instanceof Sprite) {\n\t\t\t\tbackground.set(\"isMeasured\", false);\n\t\t\t\tbackground._setParent(this);\n\t\t\t\tthis._display.addChildAt(background._display, 0);\n\t\t\t}\n\t\t}\n\n\t\tif (this.isDirty(\"mask\")) {\n\n\t\t\tconst mask = this.get(\"mask\");\n\n\t\t\tconst previous = this._prevSettings[\"mask\"];\n\t\t\tif (previous) {\n\t\t\t\tthis._display.removeChild(previous._display);\n\t\t\t\tif (previous != mask) {\n\t\t\t\t\tprevious.dispose();\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif (mask) {\n\t\t\t\tconst parent = mask.parent;\n\t\t\t\tif (parent) {\n\t\t\t\t\tparent.children.removeValue(mask);\n\t\t\t\t}\n\n\t\t\t\tmask._setParent(this);\n\t\t\t\tthis._display.addChildAt(mask._display, 0);\n\t\t\t\tthis._childrenDisplay.mask = mask._display;\n\t\t\t}\n\t\t}\n\t}\n\n\tpublic _processTemplateField(): void {\n\t\tsuper._processTemplateField();\n\t\tthis.children.each((child) => {\n\t\t\tchild._processTemplateField();\n\t\t})\n\t}\n\n\t/**\n\t * @ignore\n\t */\n\tpublic walkChildren(f: (child: Sprite) => void): void {\n\t\tthis.children.each((child) => {\n\t\t\tif (child instanceof Container) {\n\t\t\t\tchild.walkChildren(f);\n\t\t\t}\n\t\t\tf(child);\n\t\t});\n\t}\n\n\tpublic eachChildren(f: (child: Sprite) => void): void {\n\t\tconst background = this.get(\"background\");\n\t\tif (background) {\n\t\t\tf(background);\n\t\t}\n\n\t\tconst verticalScrollbar = this.get(\"verticalScrollbar\");\n\t\tif (verticalScrollbar) {\n\t\t\tf(verticalScrollbar);\n\t\t}\n\n\t\tconst mask = this.get(\"mask\");\n\t\tif (mask) {\n\t\t\tf(mask);\n\t\t}\n\n\t\tthis.children.values.forEach((child) => {\n\t\t\tf(child);\n\t\t});\n\t}\n\n\tpublic allChildren(): Array<Sprite> {\n\t\tconst output: Array<Sprite> = [];\n\n\t\tthis.eachChildren((x) => {\n\t\t\toutput.push(x);\n\t\t});\n\n\t\treturn output;\n\t}\n\n\tpublic _setDataItem(dataItem?: DataItem<IComponentDataItem>): void {\n\t\tconst updated = (dataItem !== this._dataItem);\n\t\tsuper._setDataItem(dataItem);\n\t\tconst html = this.get(\"html\", \"\");\n\t\tif (html && html !== \"\" && updated) {\n\t\t\tthis._root._setHTMLContent(this, populateString(this, html));\n\t\t}\n\t}\n}"]}
|
|
1
|
+
{"version":3,"file":"Container.js","sourceRoot":"","sources":["../../../../../src/.internal/core/render/Container.ts"],"names":[],"mappings":"AAOA,OAAO,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAC5C,OAAO,EA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AC,CAAC;QAChB,CAAC,CAAC,CAAC;QAEH,OAAO,MAAM,CAAC;IACf,CAAC;IAEM,YAAY,CAAC,QAAuC;QAC1D,MAAM,OAAO,GAAG,CAAC,QAAQ,KAAK,IAAI,CAAC,SAAS,CAAC,CAAC;QAC9C,KAAK,CAAC,YAAY,CAAC,QAAQ,CAAC,CAAC;QAC7B,MAAM,IAAI,GAAG,IAAI,CAAC,GAAG,CAAC,MAAM,EAAE,EAAE,CAAC,CAAC;QAClC,IAAI,IAAI,IAAI,IAAI,KAAK,EAAE,IAAI,OAAO,EAAE;YACnC,IAAI,CAAC,KAAK,CAAC,eAAe,CAAC,IAAI,EAAE,cAAc,CAAC,IAAI,EAAE,IAAI,CAAC,CAAC,CAAC;SAC7D;IACF,CAAC;;AA5lBD;;;;WAAkC,WAAW;GAAC;AAC9C;;;;WAA0C,MAAM,CAAC,UAAU,CAAC,MAAM,CAAC,CAAC,SAAS,CAAC,SAAS,CAAC,CAAC;GAAC","sourcesContent":["import type { Graphics } from \"./Graphics\";\nimport type { Layout } from \"./Layout\";\nimport type { IContainer } from \"./backend/Renderer\";\nimport type { IBounds } from \"../util/IBounds\";\nimport type { Scrollbar } from \"./Scrollbar\";\nimport type { DataItem, IComponentDataItem } from \"./Component\";\n\nimport { Children } from \"../util/Children\";\nimport { Percent } from \"../util/Percent\";\nimport { Sprite, ISpriteSettings, ISpritePrivate, ISpriteEvents } from \"./Sprite\";\nimport { Rectangle } from \"./Rectangle\";\nimport { HorizontalLayout } from \"./HorizontalLayout\";\nimport { VerticalLayout } from \"./VerticalLayout\";\nimport { GridLayout } from \"./GridLayout\";\nimport { populateString } from \"../util/PopulateString\";\nimport type { IDisposer } from \"../util/Disposer\";\n\nimport * as $array from \"../util/Array\";\nimport * as $type from \"../util/Type\";\nimport * as $utils from \"../util/Utils\";\n\nexport interface IContainerSettings extends ISpriteSettings {\n\n\t/**\n\t * Left padding in pixels.\n\t */\n\tpaddingLeft?: number;\n\n\t/**\n\t * Right padding in pixels.\n\t */\n\tpaddingRight?: number;\n\n\t/**\n\t * Top padding in pixels.\n\t */\n\tpaddingTop?: number;\n\n\t/**\n\t * Bottom padding in pixels.\n\t */\n\tpaddingBottom?: number;\n\n\t/**\n\t * Background element.\n\t *\n\t * @see {@link https://www.amcharts.com/docs/v5/concepts/containers/#Background} for more info\n\t */\n\tbackground?: Graphics;\n\n\t/**\n\t * A method to layout\n\t *\n\t * @see {@link https://www.amcharts.com/docs/v5/concepts/containers/#Layout} for more info\n\t */\n\tlayout?: Layout | null;\n\n\t/**\n\t * An element to use as a container's mask (clipping region).\n\t *\n\t * @see {@link https://www.amcharts.com/docs/v5/concepts/containers/#Masks} for more info\n\t */\n\tmask?: Graphics | null;\n\n\t/**\n\t * If set to `true` all content going outside the bounds of the container\n\t * will be clipped.\n\t */\n\tmaskContent?: boolean;\n\n\t/**\n\t * If set to `true` all descendants - not just direct children, but every\n\t * element in it - will become \"interactive\".\n\t */\n\tinteractiveChildren?: boolean;\n\n\t/**\n\t * If set to `true`, applying a state on a container will also apply the same\n\t * state on its children.\n\t *\n\t * @see {@link https://www.amcharts.com/docs/v5/concepts/containers/#States} for more info\n\t */\n\tsetStateOnChildren?: boolean;\n\n\t/**\n\t * Setting this to an instance of [[Scrollbar]] will enable vertical\n\t * scrolling of content if it does not fit into the Container.\n\t *\n\t * @see {@link https://www.amcharts.com/docs/v5/concepts/containers/#Scrollbar} for more info\n\t */\n\tverticalScrollbar?: Scrollbar;\n\n\t/**\n\t * If set to `true` its children will be laid out in opposite order.\n\t *\n\t * @since 5.1.1\n\t */\n\treverseChildren?: boolean;\n\n\t/**\n\t * HTML content of the container.\n\t *\n\t * @see {@link https://www.amcharts.com/docs/v5/concepts/common-elements/html-content/} for more info\n\t * @since 5.2.11\n\t */\n\thtml?: string;\n\n}\n\nexport interface IContainerEvents extends ISpriteEvents {\n}\n\nexport interface IContainerPrivate extends ISpritePrivate {\n\n\t/**\n\t * A `<div>` element used for HTML content of the `Container`.\n\t */\n\thtmlElement?: HTMLDivElement;\n\n}\n\nexport interface IContainerEvents extends ISpriteEvents {\n}\n\n/**\n * A basic element that can have child elements, maintain their layout, and\n * have a background.\n *\n * It can have any [[Sprite]] element as a child, from very basic shapes, to\n * full-fledged charts.\n *\n * @see {@link https://www.amcharts.com/docs/v5/concepts/common-elements/containers/} for more info\n * @important\n */\nexport class Container extends Sprite {\n\n\tdeclare public _settings: IContainerSettings;\n\tdeclare public _privateSettings: IContainerPrivate;\n\tdeclare public _events: IContainerEvents;\n\n\tpublic _display: IContainer = this._root._renderer.makeContainer();\n\n\tpublic _childrenDisplay: IContainer = this._root._renderer.makeContainer();\n\n\t/**\n\t * List of Container's child elements.\n\t */\n\tpublic children: Children<Sprite> = new Children(this);\n\n\tpublic _percentageSizeChildren: Array<Sprite> = [];\n\tpublic _percentagePositionChildren: Array<Sprite> = [];\n\n\tpublic static className: string = \"Container\";\n\tpublic static classNames: Array<string> = Sprite.classNames.concat([Container.className]);\n\n\tpublic _prevWidth: number = 0;\n\tpublic _prevHeight: number = 0;\n\n\tprotected _contentWidth: number = 0;\n\tprotected _contentHeight: number = 0;\n\n\tprotected _contentMask: Rectangle | undefined;\n\n\tprotected _vsbd0: IDisposer | undefined;\n\tprotected _vsbd1: IDisposer | undefined;\n\n\tprotected _afterNew() {\n\t\tsuper._afterNew();\n\t\tthis._display.addChild(this._childrenDisplay);\n\t}\n\n\tprotected _dispose() {\n\t\t$array.eachReverse(this.allChildren(), (child) => {\n\t\t\tchild.dispose();\n\t\t});\n\n\t\tif (this.getPrivate(\"htmlElement\")) {\n\t\t\tthis._root._removeHTMLContent(this);\n\t\t}\n\n\t\tsuper._dispose();\n\t}\n\n\tpublic _changed() {\n\t\tsuper._changed();\n\n\t\tif (this.isDirty(\"interactiveChildren\")) {\n\t\t\tthis._display.interactiveChildren = this.get(\"interactiveChildren\", false);\n\t\t}\n\n\t\tif (this.isDirty(\"layout\")) {\n\t\t\tthis._prevWidth = 0;\n\t\t\tthis._prevHeight = 0;\n\t\t\tthis.markDirtyBounds();\n\t\t\tif (this._prevSettings.layout) {\n\t\t\t\tthis.children.each((child) => {\n\t\t\t\t\tchild.removePrivate(\"x\");\n\t\t\t\t\tchild.removePrivate(\"y\");\n\t\t\t\t})\n\t\t\t}\n\t\t}\n\n\t\tif (this.isDirty(\"paddingTop\") || this.isDirty(\"paddingBottom\") || this.isDirty(\"paddingLeft\") || this.isDirty(\"paddingRight\")) {\n\t\t\tthis.children.each((child) => {\n\t\t\t\tchild.markDirtyPosition();\n\t\t\t})\n\t\t}\n\n\t\tif (this.isDirty(\"maskContent\")) {\n\n\t\t\tconst childrenDisplay = this._childrenDisplay;\n\n\t\t\tlet contentMask = this._contentMask;\n\t\t\tif (this.get(\"maskContent\")) {\n\t\t\t\tif (!contentMask) {\n\t\t\t\t\tcontentMask = Rectangle.new(this._root, {\n\t\t\t\t\t\tx: -.5,\n\t\t\t\t\t\ty: -.5,\n\t\t\t\t\t\twidth: this.width() + 1,\n\t\t\t\t\t\theight: this.height() + 1\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\tthis._contentMask = undefined;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\tpublic _updateSize() {\n\t\tsuper._updateSize();\n\n\t\t$array.each(this._percentageSizeChildren, (child) => {\n\t\t\tchild._updateSize();\n\t\t});\n\n\t\t$array.each(this._percentagePositionChildren, (child) => {\n\t\t\tchild.markDirtyPosition();\n\t\t\tchild._updateSize();\n\t\t});\n\n\t\tthis.updateBackground();\n\t}\n\n\tprotected updateBackground() {\n\t\tconst background = this.get(\"background\");\n\t\tlet bounds = this._localBounds;\n\n\t\tif (bounds && !this.isHidden()) {\n\t\t\tlet x = bounds.left;\n\t\t\tlet y = bounds.top;\n\t\t\tlet w = bounds.right - x;\n\t\t\tlet h = bounds.bottom - y;\n\n\t\t\tlet maxWidth = this.get(\"maxWidth\");\n\t\t\tlet maxHeight = this.get(\"maxHeight\");\n\n\t\t\tif (maxHeight) {\n\t\t\t\tif (h > maxHeight) {\n\t\t\t\t\th = maxHeight;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif (maxWidth) {\n\t\t\t\tif (w > maxWidth) {\n\t\t\t\t\tw = maxWidth;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tlet width = this.width();\n\t\t\tlet height = this.height();\n\n\t\t\tif (background) {\n\t\t\t\tbackground.setAll({ width: w, height: h, x: x, y: y });\n\t\t\t\tif (this._display.interactive) {\n\t\t\t\t\tbackground._display.interactive = true;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tconst contentMask = this._contentMask;\n\t\t\tif (contentMask) {\n\t\t\t\tcontentMask.setAll({ width: width + 1, height: height + 1 });\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\tpublic _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\n\t\tif (this.isDirty(\"html\")) {\n\t\t\tconst html = this.get(\"html\");\n\t\t\tif (html && html !== \"\") {\n\t\t\t\tthis._root._setHTMLContent(this, populateString(this, this.get(\"html\", \"\")));\n\t\t\t}\n\t\t\telse {\n\t\t\t\tthis._root._removeHTMLContent(this);\n\t\t\t}\n\t\t\tthis._root._positionHTMLElement(this);\n\t\t}\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\n\t\t\t\tverticalScrollbar.startGrip.setPrivate(\"visible\", false);\n\t\t\t\tverticalScrollbar.endGrip.setPrivate(\"visible\", false);\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\tlet 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\n\t\t\t\t\tif (start + shiftY <= 0) {\n\t\t\t\t\t\tshiftY = -start;\n\t\t\t\t\t}\n\t\t\t\t\tif (end + shiftY >= 1) {\n\t\t\t\t\t\tshiftY = 1 - end;\n\t\t\t\t\t}\n\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\n\t\t\t\t})\n\n\t\t\t\tthis._disposers.push(this._vsbd0);\n\n\t\t\t\tthis._vsbd1 = verticalScrollbar.events.on(\"rangechanged\", () => {\n\t\t\t\t\tlet h = this._contentHeight;\n\t\t\t\t\tconst childrenDisplay = this._childrenDisplay;\n\t\t\t\t\tconst contentMask = this._contentMask;\n\n\t\t\t\t\tchildrenDisplay.y = -verticalScrollbar.get(\"start\") * h;\n\t\t\t\t\tchildrenDisplay.markDirtyLayer();\n\n\t\t\t\t\tif (contentMask) {\n\t\t\t\t\t\tcontentMask._display.y = -childrenDisplay.y;\n\t\t\t\t\t\tchildrenDisplay.mask = contentMask._display;\n\t\t\t\t\t}\n\t\t\t\t})\n\n\t\t\t\tthis._disposers.push(this._vsbd1);\n\n\t\t\t\tthis._display.addChild(verticalScrollbar._display);\n\t\t\t}\n\t\t\telse {\n\t\t\t\tconst previous = this._prevSettings.verticalScrollbar\n\t\t\t\tif (previous) {\n\t\t\t\t\tthis._display.removeChild(previous._display);\n\t\t\t\t\tif (this._vsbd0) {\n\t\t\t\t\t\tthis._vsbd0.dispose();\n\t\t\t\t\t}\n\t\t\t\t\tif (this._vsbd1) {\n\t\t\t\t\t\tthis._vsbd1.dispose();\n\t\t\t\t\t}\n\t\t\t\t\tconst childrenDisplay = this._childrenDisplay;\n\t\t\t\t\tchildrenDisplay.y = 0;\n\n\t\t\t\t\tthis.setPrivate(\"height\", undefined);\n\t\t\t\t\tthis.set(\"maskContent\", false);\n\t\t\t\t\tthis.set(\"paddingRight\", undefined);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tif (this.isDirty(\"background\")) {\n\t\t\t// TODO maybe this should dispose ?\n\t\t\tconst previous = this._prevSettings[\"background\"];\n\t\t\tif (previous) {\n\t\t\t\tthis._display.removeChild(previous._display);\n\t\t\t}\n\n\t\t\tconst background = this.get(\"background\");\n\t\t\tif (background instanceof Sprite) {\n\t\t\t\tbackground.set(\"isMeasured\", false);\n\t\t\t\tbackground._setParent(this);\n\t\t\t\tthis._display.addChildAt(background._display, 0);\n\t\t\t}\n\t\t}\n\n\t\tif (this.isDirty(\"mask\")) {\n\n\t\t\tconst mask = this.get(\"mask\");\n\n\t\t\tconst previous = this._prevSettings[\"mask\"];\n\t\t\tif (previous) {\n\t\t\t\tthis._display.removeChild(previous._display);\n\t\t\t\tif (previous != mask) {\n\t\t\t\t\tprevious.dispose();\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif (mask) {\n\t\t\t\tconst 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}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Graphics.d.ts","sourceRoot":"","sources":["../../../../../src/.internal/core/render/Graphics.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,eAAe,CAAC;AAC3C,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,4BAA4B,CAAC;AAC1D,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,8BAA8B,CAAC;AAG7D,OAAO,EAAE,eAAe,EAAE,cAAc,EAAE,aAAa,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAClF,OAAO,EAAE,SAAS,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAC;AAM1D,eAAO,MAAM,cAAc,
|
|
1
|
+
{"version":3,"file":"Graphics.d.ts","sourceRoot":"","sources":["../../../../../src/.internal/core/render/Graphics.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,eAAe,CAAC;AAC3C,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,4BAA4B,CAAC;AAC1D,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,8BAA8B,CAAC;AAG7D,OAAO,EAAE,eAAe,EAAE,cAAc,EAAE,aAAa,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAClF,OAAO,EAAE,SAAS,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAC;AAM1D,eAAO,MAAM,cAAc,UAAqU,CAAC;AAEjW,MAAM,WAAW,iBAAkB,SAAQ,eAAe;IAEzD;;;;OAIG;IACH,IAAI,CAAC,EAAE,KAAK,CAAC;IAEb;;;;OAIG;IACH,MAAM,CAAC,EAAE,KAAK,CAAC;IAEf;;;;OAIG;IACH,WAAW,CAAC,EAAE,OAAO,CAAC;IAEtB;;;;OAIG;IACH,aAAa,CAAC,EAAE,OAAO,CAAC;IAExB;;;;OAIG;IACH,YAAY,CAAC,EAAE,QAAQ,CAAC;IAExB;;;;OAIG;IACH,cAAc,CAAC,EAAE,QAAQ,CAAC;IAE1B;;;;OAIG;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AAc,UAAU,EAAE,KAAK,CAAC,MAAM,CAAC,CAAkD;IAElF,cAAc;IAiDd,QAAQ;IAuCR,aAAa;CAuKpB"}
|
|
@@ -3,7 +3,7 @@ import { Sprite } from "./Sprite";
|
|
|
3
3
|
import { BlendMode } from "./backend/Renderer";
|
|
4
4
|
import * as $type from "../util/Type";
|
|
5
5
|
import * as $array from "../util/Array";
|
|
6
|
-
export const visualSettings = ["fill", "fillOpacity", "stroke", "strokeWidth", "strokeOpacity", "fillPattern", "strokePattern", "fillGradient", "strokeGradient", "strokeDasharray", "strokeDashoffset"];
|
|
6
|
+
export const visualSettings = ["fill", "fillOpacity", "stroke", "strokeWidth", "strokeOpacity", "fillPattern", "strokePattern", "fillGradient", "strokeGradient", "strokeDasharray", "strokeDashoffset", "shadowBlur", "shadowColor", "shadowOpacity", "shadowOffsetX", "shadowOffsetY", "blur", "sepia", "invert", "brightness", "hue", "contrast", "saturate"];
|
|
7
7
|
/**
|
|
8
8
|
* Base class used for drawing shapes.
|
|
9
9
|
*
|
|
@@ -117,22 +117,50 @@ export class Graphics extends Sprite {
|
|
|
117
117
|
if (shadowColor && (shadowBlur || shadowOffsetX || shadowOffsetY)) {
|
|
118
118
|
this._display.shadow(shadowColor, shadowBlur, shadowOffsetX, shadowOffsetY, shadowOpacity);
|
|
119
119
|
}
|
|
120
|
+
if (fill && !fillGradient) {
|
|
121
|
+
this._display.beginFill(fill, fillOpacity);
|
|
122
|
+
this._display.endFill();
|
|
123
|
+
}
|
|
124
|
+
if (fillGradient) {
|
|
125
|
+
if (fill) {
|
|
126
|
+
const stops = fillGradient.get("stops", []);
|
|
127
|
+
if (stops.length) {
|
|
128
|
+
$array.each(stops, (stop) => {
|
|
129
|
+
if ((!stop.color || stop.colorInherited) && fill) {
|
|
130
|
+
stop.color = fill;
|
|
131
|
+
stop.colorInherited = true;
|
|
132
|
+
}
|
|
133
|
+
if (stop.opacity == null || stop.opacityInherited) {
|
|
134
|
+
stop.opacity = fillOpacity;
|
|
135
|
+
stop.opacityInherited = true;
|
|
136
|
+
}
|
|
137
|
+
});
|
|
138
|
+
}
|
|
139
|
+
}
|
|
140
|
+
const gradient = fillGradient.getFill(this);
|
|
141
|
+
if (gradient) {
|
|
142
|
+
this._display.beginFill(gradient, fillOpacity);
|
|
143
|
+
this._display.endFill();
|
|
144
|
+
}
|
|
145
|
+
}
|
|
120
146
|
if (fillPattern) {
|
|
147
|
+
/*
|
|
121
148
|
let changed = false;
|
|
122
149
|
if (fill && (!fillPattern.get("fill") || fillPattern.get("fillInherited"))) {
|
|
123
150
|
fillPattern.set("fill", fill);
|
|
124
|
-
fillPattern.set("fillInherited", true)
|
|
151
|
+
fillPattern.set("fillInherited", true)
|
|
125
152
|
changed = true;
|
|
126
153
|
}
|
|
127
154
|
if (stroke && (!fillPattern.get("color") || fillPattern.get("colorInherited"))) {
|
|
128
155
|
fillPattern.set("color", stroke);
|
|
129
|
-
fillPattern.set("colorInherited", true)
|
|
156
|
+
fillPattern.set("colorInherited", true)
|
|
130
157
|
changed = true;
|
|
131
158
|
}
|
|
132
159
|
if (changed) {
|
|
133
160
|
// @todo: is this OK?
|
|
134
161
|
fillPattern._changed();
|
|
135
162
|
}
|
|
163
|
+
*/
|
|
136
164
|
const pattern = fillPattern.pattern;
|
|
137
165
|
if (pattern) {
|
|
138
166
|
this._display.beginFill(pattern, fillOpacity);
|
|
@@ -145,32 +173,6 @@ export class Graphics extends Sprite {
|
|
|
145
173
|
}
|
|
146
174
|
}
|
|
147
175
|
}
|
|
148
|
-
else if (fillGradient) {
|
|
149
|
-
if (fill) {
|
|
150
|
-
const stops = fillGradient.get("stops", []);
|
|
151
|
-
if (stops.length) {
|
|
152
|
-
$array.each(stops, (stop) => {
|
|
153
|
-
if ((!stop.color || stop.colorInherited) && fill) {
|
|
154
|
-
stop.color = fill;
|
|
155
|
-
stop.colorInherited = true;
|
|
156
|
-
}
|
|
157
|
-
if (stop.opacity == null || stop.opacityInherited) {
|
|
158
|
-
stop.opacity = fillOpacity;
|
|
159
|
-
stop.opacityInherited = true;
|
|
160
|
-
}
|
|
161
|
-
});
|
|
162
|
-
}
|
|
163
|
-
}
|
|
164
|
-
const gradient = fillGradient.getFill(this);
|
|
165
|
-
if (gradient) {
|
|
166
|
-
this._display.beginFill(gradient, fillOpacity);
|
|
167
|
-
this._display.endFill();
|
|
168
|
-
}
|
|
169
|
-
}
|
|
170
|
-
else if (fill) {
|
|
171
|
-
this._display.beginFill(fill, fillOpacity);
|
|
172
|
-
this._display.endFill();
|
|
173
|
-
}
|
|
174
176
|
if (stroke || strokeGradient || strokePattern) {
|
|
175
177
|
const strokeOpacity = this.get("strokeOpacity");
|
|
176
178
|
let strokeWidth = this.get("strokeWidth", 1);
|
|
@@ -181,8 +183,34 @@ export class Graphics extends Sprite {
|
|
|
181
183
|
strokeWidth /= this._root._renderer.resolution;
|
|
182
184
|
}
|
|
183
185
|
const lineJoin = this.get("lineJoin");
|
|
186
|
+
if (stroke && !strokeGradient) {
|
|
187
|
+
this._display.lineStyle(strokeWidth, stroke, strokeOpacity, lineJoin);
|
|
188
|
+
this._display.endStroke();
|
|
189
|
+
}
|
|
190
|
+
if (strokeGradient) {
|
|
191
|
+
const stops = strokeGradient.get("stops", []);
|
|
192
|
+
if (stops.length) {
|
|
193
|
+
$array.each(stops, (stop) => {
|
|
194
|
+
if ((!stop.color || stop.colorInherited) && stroke) {
|
|
195
|
+
stop.color = stroke;
|
|
196
|
+
stop.colorInherited = true;
|
|
197
|
+
}
|
|
198
|
+
if (stop.opacity == null || stop.opacityInherited) {
|
|
199
|
+
stop.opacity = strokeOpacity;
|
|
200
|
+
stop.opacityInherited = true;
|
|
201
|
+
}
|
|
202
|
+
});
|
|
203
|
+
}
|
|
204
|
+
const gradient = strokeGradient.getFill(this);
|
|
205
|
+
if (gradient) {
|
|
206
|
+
this._display.lineStyle(strokeWidth, gradient, strokeOpacity, lineJoin);
|
|
207
|
+
this._display.endStroke();
|
|
208
|
+
}
|
|
209
|
+
}
|
|
184
210
|
if (strokePattern) {
|
|
211
|
+
/*
|
|
185
212
|
let changed = false;
|
|
213
|
+
|
|
186
214
|
if (stroke && (!strokePattern.get("color") || strokePattern.get("colorInherited"))) {
|
|
187
215
|
strokePattern.set("color", stroke);
|
|
188
216
|
strokePattern.set("colorInherited", true);
|
|
@@ -192,7 +220,8 @@ export class Graphics extends Sprite {
|
|
|
192
220
|
// @todo: is this OK?
|
|
193
221
|
strokePattern._changed();
|
|
194
222
|
}
|
|
195
|
-
|
|
223
|
+
*/
|
|
224
|
+
let pattern = strokePattern.pattern;
|
|
196
225
|
if (pattern) {
|
|
197
226
|
this._display.lineStyle(strokeWidth, pattern, strokeOpacity, lineJoin);
|
|
198
227
|
this._display.endStroke();
|
|
@@ -204,30 +233,6 @@ export class Graphics extends Sprite {
|
|
|
204
233
|
}
|
|
205
234
|
}
|
|
206
235
|
}
|
|
207
|
-
else if (strokeGradient) {
|
|
208
|
-
const stops = strokeGradient.get("stops", []);
|
|
209
|
-
if (stops.length) {
|
|
210
|
-
$array.each(stops, (stop) => {
|
|
211
|
-
if ((!stop.color || stop.colorInherited) && stroke) {
|
|
212
|
-
stop.color = stroke;
|
|
213
|
-
stop.colorInherited = true;
|
|
214
|
-
}
|
|
215
|
-
if (stop.opacity == null || stop.opacityInherited) {
|
|
216
|
-
stop.opacity = strokeOpacity;
|
|
217
|
-
stop.opacityInherited = true;
|
|
218
|
-
}
|
|
219
|
-
});
|
|
220
|
-
}
|
|
221
|
-
const gradient = strokeGradient.getFill(this);
|
|
222
|
-
if (gradient) {
|
|
223
|
-
this._display.lineStyle(strokeWidth, gradient, strokeOpacity, lineJoin);
|
|
224
|
-
this._display.endStroke();
|
|
225
|
-
}
|
|
226
|
-
}
|
|
227
|
-
else if (stroke) {
|
|
228
|
-
this._display.lineStyle(strokeWidth, stroke, strokeOpacity, lineJoin);
|
|
229
|
-
this._display.endStroke();
|
|
230
|
-
}
|
|
231
236
|
}
|
|
232
237
|
if (this.getPrivate("showingToolt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a,CAAC;gCAC7B,IAAI,CAAC,gBAAgB,GAAG,IAAI,CAAC;6BAC7B;wBACF,CAAC,CAAC,CAAA;qBACF;oBAED,MAAM,QAAQ,GAAG,cAAc,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC;oBAC9C,IAAI,QAAQ,EAAE;wBACb,IAAI,CAAC,QAAQ,CAAC,SAAS,CAAC,WAAW,EAAE,QAAQ,EAAE,aAAa,EAAE,QAAQ,CAAC,CAAC;wBACxE,IAAI,CAAC,QAAQ,CAAC,SAAS,EAAE,CAAC;qBAC1B;iBACD;qBACI,IAAI,MAAM,EAAE;oBAChB,IAAI,CAAC,QAAQ,CAAC,SAAS,CAAC,WAAW,EAAE,MAAM,EAAE,aAAa,EAAE,QAAQ,CAAC,CAAC;oBACtE,IAAI,CAAC,QAAQ,CAAC,SAAS,EAAE,CAAC;iBAC1B;aAED;YAED,IAAG,IAAI,CAAC,UAAU,CAAC,gBAAgB,CAAC,EAAC;gBACpC,IAAI,CAAC,WAAW,EAAE,CAAC;aACnB;SACD;QAED,IAAI,CAAC,MAAM,GAAG,KAAK,CAAC;IACrB,CAAC;;AAvPD;;;;WAAkC,UAAU;GAAC;AAC7C;;;;WAA0C,MAAM,CAAC,UAAU,CAAC,MAAM,CAAC,CAAC,QAAQ,CAAC,SAAS,CAAC,CAAC;GAAC","sourcesContent":["import type { Color } from \"../util/Color\";\nimport type { Pattern } from \"../render/patterns/Pattern\";\nimport type { Gradient } from \"../render/gradients/Gradient\";\n\nimport { PicturePattern } from \"../render/patterns/PicturePattern\";\nimport { ISpriteSettings, ISpritePrivate, ISpriteEvents, Sprite } from \"./Sprite\";\nimport { IGraphics, BlendMode } from \"./backend/Renderer\";\n\nimport * as $type from \"../util/Type\";\nimport * as $array from \"../util/Array\";\n\n\nexport const visualSettings = [\"fill\", \"fillOpacity\", \"stroke\", \"strokeWidth\", \"strokeOpacity\", \"fillPattern\", \"strokePattern\", \"fillGradient\", \"strokeGradient\", \"strokeDasharray\", \"strokeDashoffset\"];\n\nexport interface IGraphicsSettings extends ISpriteSettings {\n\n\t/**\n\t * Fill color.\n\t *\n\t * @see {@link https://www.amcharts.com/docs/v5/concepts/colors-gradients-and-patterns/} for more information\n\t */\n\tfill?: Color;\n\n\t/**\n\t * Stroke (border or line) color.\n\t *\n\t * @see {@link https://www.amcharts.com/docs/v5/concepts/colors-gradients-and-patterns/} for more information\n\t */\n\tstroke?: Color;\n\n\t/**\n\t * Fill pattern.\n\t *\n\t * @see {@link https://www.amcharts.com/docs/v5/concepts/colors-gradients-and-patterns/patterns/} for more information\n\t */\n\tfillPattern?: Pattern;\n\n\t/**\n\t * Stroke (border or line) pattern.\n\t *\n\t * @see {@link https://www.amcharts.com/docs/v5/concepts/colors-gradients-and-patterns/patterns/} for more information\n\t */\n\tstrokePattern?: Pattern;\n\n\t/**\n\t * Fill gradient.\n\t *\n\t * @see {@link https://www.amcharts.com/docs/v5/concepts/colors-gradients-and-patterns/gradients/} for more information\n\t */\n\tfillGradient?: Gradient;\n\n\t/**\n\t * Stroke (border or line) gradient.\n\t *\n\t * @see {@link https://www.amcharts.com/docs/v5/concepts/colors-gradients-and-patterns/gradients/} for more information\n\t */\n\tstrokeGradient?: Gradient;\n\n\t/**\n\t * Stroke (border or line) dash settings.\n\t *\n\t * @see {@link https://www.amcharts.com/docs/v5/concepts/colors-gradients-and-patterns/#Dashed_lines} for more information\n\t */\n\tstrokeDasharray?: number[] | number;\n\n\t/**\n\t * Stroke (border or line) dash offset.\n\t *\n\t * @see {@link https://www.amcharts.com/docs/v5/concepts/colors-gradients-and-patterns/#Dashed_lines} for more information\n\t */\n\tstrokeDashoffset?: number;\n\n\t/**\n\t * Opacity of the fill. 0 - fully transparent; 1 - fully opaque.\n\t */\n\tfillOpacity?: number;\n\n\t/**\n\t * Opacity of the stroke (border or line). 0 - fully transparent; 1 - fully opaque.\n\t */\n\tstrokeOpacity?: number;\n\n\t/**\n\t * Width of the stroke (border or line) in pixels.\n\t */\n\tstrokeWidth?: number;\n\n\t/**\n\t * Indicates if stroke of a Graphics should stay the same when it's scale changes. Note, this doesn't take into account parent container scale changes.\n\t * @default false\n\t */\n\tnonScalingStroke?: boolean;\n\n\t/**\n\t * Drawing function.\n\t *\n\t * Must use renderer (`display` parameter) methods to draw.\n\t *\n\t * @see {@link https://www.amcharts.com/docs/v5/concepts/common-elements/graphics/#Custom_draw_functions} for more info\n\t */\n\tdraw?: (display: IGraphics, graphics: Graphics) => void;\n\n\t/**\n\t * Rendering mode.\n\t *\n\t * @default BlendMode.NORMAL (\"source-over\")\n\t * @see {@link https://developer.mozilla.org/en-US/docs/Web/API/CanvasRenderingContext2D/globalCompositeOperation} for more information\n\t * @ignore\n\t */\n\tblendMode?: BlendMode;\n\n\t/**\n\t * Draw a shape using an SVG path.\n\t *\n\t * @see {@link https://developer.mozilla.org/en-US/docs/Web/SVG/Tutorial/Paths} for more information\n\t */\n\tsvgPath?: string;\n\n\t/**\n\t * Color of the element's shadow.\n\t *\n\t * For this to work at least one of the following needs to be set as well:\n\t * `shadowBlur`, `shadowOffsetX`, `shadowOffsetY`.\n\t *\n\t * @see {@link https://www.amcharts.com/docs/v5/concepts/colors-gradients-and-patterns/shadows/} for more info\n\t */\n\tshadowColor?: Color | null;\n\n\t/**\n\t * Blurriness of the the shadow.\n\t *\n\t * The bigger the number, the more blurry shadow will be.\n\t *\n\t * @see {@link https://www.amcharts.com/docs/v5/concepts/colors-gradients-and-patterns/shadows/} for more info\n\t */\n\tshadowBlur?: number;\n\n\t/**\n\t * Horizontal shadow offset in pixels.\n\t *\n\t * @see {@link https://www.amcharts.com/docs/v5/concepts/colors-gradients-and-patterns/shadows/} for more info\n\t */\n\tshadowOffsetX?: number;\n\n\t/**\n\t * Vertical shadow offset in pixels.\n\t *\n\t * @see {@link https://www.amcharts.com/docs/v5/concepts/colors-gradients-and-patterns/shadows/} for more info\n\t */\n\tshadowOffsetY?: number;\n\n\t/**\n\t * Opacity of the shadow (0-1).\n\t *\n\t * If not set, will use the same as `fillOpacity` of the element.\n\t *\n\t * @see {@link https://www.amcharts.com/docs/v5/concepts/colors-gradients-and-patterns/shadows/} for more info\n\t */\n\tshadowOpacity?: number;\n\n\t/**\n\t * A method to be used on anchor points (joints) of the multi-point line.\n\t *\n\t * @see {@link https://developer.mozilla.org/en-US/docs/Web/API/CanvasRenderingContext2D/lineJoin} for more info\n\t * @default \"miter\"\n\t * @since 5.2.10\n\t */\n\tlineJoin?: \"miter\" | \"round\" | \"bevel\";\n}\n\nexport interface IGraphicsPrivate extends ISpritePrivate {\n}\n\nexport interface IGraphicsEvents extends ISpriteEvents {\n}\n\n/**\n * Base class used for drawing shapes.\n *\n * @see {@link https://www.amcharts.com/docs/v5/concepts/common-elements/graphics/} for more info\n * @important\n */\nexport class Graphics extends Sprite {\n\n\tdeclare public _settings: IGraphicsSettings;\n\tdeclare public _privateSettings: IGraphicsPrivate;\n\tdeclare public _events: IGraphicsEvents;\n\n\tpublic _display: IGraphics = this._root._renderer.makeGraphics();\n\n\tprotected _clear = false;\n\n\tpublic static className: string = \"Graphics\";\n\tpublic static classNames: Array<string> = Sprite.classNames.concat([Graphics.className]);\n\n\tpublic _beforeChanged() {\n\t\tsuper._beforeChanged();\n\n\t\tif (this.isDirty(\"draw\") || this.isDirty(\"svgPath\")) {\n\t\t\tthis.markDirtyBounds();\n\t\t}\n\n\t\tif (this.isDirty(\"fill\") || this.isDirty(\"stroke\") || this.isDirty(\"visible\") || this.isDirty(\"forceHidden\") || this.isDirty(\"scale\") || this.isDirty(\"fillGradient\") || this.isDirty(\"strokeGradient\") || this.isDirty(\"fillPattern\") || this.isDirty(\"strokePattern\") || this.isDirty(\"fillOpacity\") || this.isDirty(\"strokeOpacity\") || this.isDirty(\"strokeWidth\") || this.isDirty(\"draw\") || this.isDirty(\"blendMode\") || this.isDirty(\"strokeDasharray\") || this.isDirty(\"strokeDashoffset\") || this.isDirty(\"svgPath\") || this.isDirty(\"lineJoin\") || this.isDirty(\"shadowColor\") || this.isDirty(\"shadowBlur\") || this.isDirty(\"shadowOffsetX\") || this.isDirty(\"shadowOffsetY\")) {\n\t\t\tthis._clear = true;\n\t\t}\n\n\t\tthis._display.crisp = this.get(\"crisp\", false);\n\n\t\tif (this.isDirty(\"fillGradient\")) {\n\t\t\tconst gradient = this.get(\"fillGradient\");\n\t\t\tif (gradient) {\n\t\t\t\tthis._display.isMeasured = true;\n\t\t\t\tconst gradientTarget = gradient.get(\"target\");\n\t\t\t\tif (gradientTarget) {\n\t\t\t\t\tthis._disposers.push(gradientTarget.events.on(\"boundschanged\", () => {\n\t\t\t\t\t\tthis._markDirtyKey(\"fill\");\n\t\t\t\t\t}))\n\t\t\t\t\tthis._disposers.push(\n\t\t\t\t\t\tgradientTarget.events.on(\"positionchanged\", () => {\n\t\t\t\t\t\t\tthis._markDirtyKey(\"fill\");\n\t\t\t\t\t\t}))\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tif (this.isDirty(\"strokeGradient\")) {\n\t\t\tconst gradient = this.get(\"strokeGradient\");\n\t\t\tif (gradient) {\n\t\t\t\tthis._display.isMeasured = true;\n\t\t\t\tconst gradientTarget = gradient.get(\"target\");\n\t\t\t\tif (gradientTarget) {\n\t\t\t\t\tthis._disposers.push(\n\t\t\t\t\t\tgradientTarget.events.on(\"boundschanged\", () => {\n\t\t\t\t\t\t\tthis._markDirtyKey(\"stroke\");\n\t\t\t\t\t\t}))\n\t\t\t\t\tthis._disposers.push(\n\t\t\t\t\t\tgradientTarget.events.on(\"positionchanged\", () => {\n\t\t\t\t\t\t\tthis._markDirtyKey(\"stroke\");\n\t\t\t\t\t\t}))\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\tpublic _changed() {\n\t\tsuper._changed();\n\n\t\tif (this._clear) {\n\t\t\tthis.markDirtyBounds();\n\t\t\tthis.markDirtyLayer();\n\t\t\tthis._display.clear();\n\n\t\t\tlet strokeDasharray = this.get(\"strokeDasharray\");\n\t\t\tif ($type.isNumber(strokeDasharray)) {\n\t\t\t\tif (strokeDasharray < 0.5) {\n\t\t\t\t\tstrokeDasharray = [0];\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tstrokeDasharray = [strokeDasharray]\n\t\t\t\t}\n\t\t\t}\n\t\t\tthis._display.setLineDash(strokeDasharray as number[]);\n\n\t\t\tconst strokeDashoffset = this.get(\"strokeDashoffset\");\n\t\t\tif (strokeDashoffset) {\n\t\t\t\tthis._display.setLineDashOffset(strokeDashoffset);\n\t\t\t}\n\n\t\t\tconst blendMode = this.get(\"blendMode\", BlendMode.NORMAL);\n\t\t\tthis._display.blendMode = blendMode;\n\n\t\t\tconst draw = this.get(\"draw\");\n\t\t\tif (draw) {\n\t\t\t\tdraw(this._display, this);\n\t\t\t}\n\n\t\t\tconst svgPath = this.get(\"svgPath\");\n\t\t\tif (svgPath != null) {\n\t\t\t\tthis._display.svgPath(svgPath!);\n\t\t\t}\n\t\t}\n\t}\n\n\tpublic _afterChanged() {\n\t\tsuper._afterChanged();\n\n\t\tif (this._clear) {\n\t\t\tconst fill = this.get(\"fill\");\n\t\t\tconst fillGradient = this.get(\"fillGradient\");\n\t\t\tconst fillPattern = this.get(\"fillPattern\");\n\t\t\tconst fillOpacity = this.get(\"fillOpacity\");\n\n\t\t\tconst stroke = this.get(\"stroke\");\n\t\t\tconst strokeGradient = this.get(\"strokeGradient\");\n\t\t\tconst strokePattern = this.get(\"strokePattern\");\n\n\t\t\tconst shadowColor = this.get(\"shadowColor\");\n\t\t\tconst shadowBlur = this.get(\"shadowBlur\");\n\t\t\tconst shadowOffsetX = this.get(\"shadowOffsetX\");\n\t\t\tconst shadowOffsetY = this.get(\"shadowOffsetY\");\n\t\t\tconst shadowOpacity = this.get(\"shadowOpacity\");\n\n\t\t\t//const bounds = this._display.getLocalBounds();\n\n\t\t\tif (shadowColor && (shadowBlur || shadowOffsetX || shadowOffsetY)) {\n\t\t\t\tthis._display.shadow(shadowColor, shadowBlur, shadowOffsetX, shadowOffsetY, shadowOpacity);\n\t\t\t}\n\n\t\t\tif (fillPattern) {\n\t\t\t\tlet changed = false;\n\t\t\t\tif (fill && (!fillPattern.get(\"fill\") || fillPattern.get(\"fillInherited\"))) {\n\t\t\t\t\tfillPattern.set(\"fill\", fill);\n\t\t\t\t\tfillPattern.set(\"fillInherited\", true)\n\t\t\t\t\tchanged = true;\n\t\t\t\t}\n\t\t\t\tif (stroke && (!fillPattern.get(\"color\") || fillPattern.get(\"colorInherited\"))) {\n\t\t\t\t\tfillPattern.set(\"color\", stroke);\n\t\t\t\t\tfillPattern.set(\"colorInherited\", true)\n\t\t\t\t\tchanged = true;\n\t\t\t\t}\n\t\t\t\tif (changed) {\n\t\t\t\t\t// @todo: is this OK?\n\t\t\t\t\tfillPattern._changed();\n\t\t\t\t}\n\t\t\t\tconst pattern = fillPattern.pattern;\n\t\t\t\tif (pattern) {\n\t\t\t\t\tthis._display.beginFill(pattern, fillOpacity);\n\t\t\t\t\tthis._display.endFill();\n\n\t\t\t\t\tif (fillPattern instanceof PicturePattern) {\n\t\t\t\t\t\tfillPattern.events.once(\"loaded\", () => {\n\t\t\t\t\t\t\tthis._clear = true;\n\t\t\t\t\t\t\tthis.markDirty();\n\t\t\t\t\t\t});\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\telse if (fillGradient) {\n\t\t\t\tif (fill) {\n\t\t\t\t\tconst stops = fillGradient.get(\"stops\", []);\n\t\t\t\t\tif (stops.length) {\n\t\t\t\t\t\t$array.each(stops, (stop: any) => {\n\t\t\t\t\t\t\tif ((!stop.color || stop.colorInherited) && fill) {\n\t\t\t\t\t\t\t\tstop.color = fill;\n\t\t\t\t\t\t\t\tstop.colorInherited = true;\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\tif (stop.opacity == null || stop.opacityInherited) {\n\t\t\t\t\t\t\t\tstop.opacity = fillOpacity;\n\t\t\t\t\t\t\t\tstop.opacityInherited = true;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t})\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tconst gradient = fillGradient.getFill(this);\n\t\t\t\tif (gradient) {\n\t\t\t\t\tthis._display.beginFill(gradient, fillOpacity);\n\t\t\t\t\tthis._display.endFill();\n\t\t\t\t}\n\t\t\t}\n\t\t\telse if (fill) {\n\t\t\t\tthis._display.beginFill(fill, fillOpacity);\n\t\t\t\tthis._display.endFill();\n\t\t\t}\n\n\t\t\tif (stroke || strokeGradient || strokePattern) {\n\t\t\t\tconst strokeOpacity = this.get(\"strokeOpacity\");\n\t\t\t\tlet strokeWidth = this.get(\"strokeWidth\", 1);\n\n\t\t\t\tif (this.get(\"nonScalingStroke\")) {\n\t\t\t\t\tstrokeWidth = strokeWidth / this.get(\"scale\", 1)\n\t\t\t\t}\n\n\t\t\t\tif(this.get(\"crisp\")){\n\t\t\t\t\tstrokeWidth /= this._root._renderer.resolution;\n\t\t\t\t}\n\n\t\t\t\tconst lineJoin = this.get(\"lineJoin\");\n\n\t\t\t\tif (strokePattern) {\n\t\t\t\t\tlet changed = false;\n\t\t\t\t\tif (stroke && (!strokePattern.get(\"color\") || strokePattern.get(\"colorInherited\"))) {\n\t\t\t\t\t\tstrokePattern.set(\"color\", stroke);\n\t\t\t\t\t\tstrokePattern.set(\"colorInherited\", true);\n\t\t\t\t\t\tchanged = true;\n\t\t\t\t\t}\n\t\t\t\t\tif (changed) {\n\t\t\t\t\t\t// @todo: is this OK?\n\t\t\t\t\t\tstrokePattern._changed();\n\t\t\t\t\t}\n\t\t\t\t\tconst pattern = strokePattern.pattern;\n\t\t\t\t\tif (pattern) {\n\t\t\t\t\t\tthis._display.lineStyle(strokeWidth, pattern, strokeOpacity, lineJoin);\n\t\t\t\t\t\tthis._display.endStroke();\n\n\t\t\t\t\t\tif (strokePattern instanceof PicturePattern) {\n\t\t\t\t\t\t\tstrokePattern.events.once(\"loaded\", () => {\n\t\t\t\t\t\t\t\tthis._clear = true;\n\t\t\t\t\t\t\t\tthis.markDirty();\n\t\t\t\t\t\t\t});\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telse if (strokeGradient) {\n\n\t\t\t\t\tconst stops = strokeGradient.get(\"stops\", []);\n\t\t\t\t\tif (stops.length) {\n\t\t\t\t\t\t$array.each(stops, (stop: any) => {\n\t\t\t\t\t\t\tif ((!stop.color || stop.colorInherited) && stroke) {\n\t\t\t\t\t\t\t\tstop.color = stroke;\n\t\t\t\t\t\t\t\tstop.colorInherited = true;\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\tif (stop.opacity == null || stop.opacityInherited) {\n\t\t\t\t\t\t\t\tstop.opacity = strokeOpacity;\n\t\t\t\t\t\t\t\tstop.opacityInherited = true;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t})\n\t\t\t\t\t}\n\n\t\t\t\t\tconst gradient = strokeGradient.getFill(this);\n\t\t\t\t\tif (gradient) {\n\t\t\t\t\t\tthis._display.lineStyle(strokeWidth, gradient, strokeOpacity, lineJoin);\n\t\t\t\t\t\tthis._display.endStroke();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telse if (stroke) {\n\t\t\t\t\tthis._display.lineStyle(strokeWidth, stroke, strokeOpacity, lineJoin);\n\t\t\t\t\tthis._display.endStroke();\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t\tif(this.getPrivate(\"showingTooltip\")){\n\t\t\t\tthis.showTooltip();\n\t\t\t}\n\t\t}\n\n\t\tthis._clear = false;\n\t}\n\n}\n"]}
|
|
1
|
+
{"version":3,"file":"Graphics.js","sourceRoot":"","sources":["../../../../../src/.internal/core/render/Graphics.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,cAAc,EAAE,MAAM,mCAAmC,CAAC;AACnE,OAAO,EAAkD,MAAM,EAAE,MAAM,UAAU,CAAC;AAClF,OAAO,EAAa,SAAS,EAAE,MAAM,oBAAoB,CAAC;AAE1D,OAAO,KAAK,KAAK,MAAM,cAAc,CAAC;AACtC,OAAO,KAA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AC,SAAS,EAAE,CAAC;qBAC1B;iBACD;gBAED,IAAI,aAAa,EAAE;oBAClB;;;;;;;;;;;;sBAYE;oBACF,IAAI,OAAO,GAAG,aAAa,CAAC,OAAO,CAAC;oBAEpC,IAAI,OAAO,EAAE;wBACZ,IAAI,CAAC,QAAQ,CAAC,SAAS,CAAC,WAAW,EAAE,OAAO,EAAE,aAAa,EAAE,QAAQ,CAAC,CAAC;wBACvE,IAAI,CAAC,QAAQ,CAAC,SAAS,EAAE,CAAC;wBAE1B,IAAI,aAAa,YAAY,cAAc,EAAE;4BAC5C,aAAa,CAAC,MAAM,CAAC,IAAI,CAAC,QAAQ,EAAE,GAAG,EAAE;gCACxC,IAAI,CAAC,MAAM,GAAG,IAAI,CAAC;gCACnB,IAAI,CAAC,SAAS,EAAE,CAAC;4BAClB,CAAC,CAAC,CAAC;yBACH;qBACD;iBACD;aACD;YAED,IAAI,IAAI,CAAC,UAAU,CAAC,gBAAgB,CAAC,EAAE;gBACtC,IAAI,CAAC,WAAW,EAAE,CAAC;aACnB;SACD;QAED,IAAI,CAAC,MAAM,GAAG,KAAK,CAAC;IACrB,CAAC;;AAhQD;;;;WAAkC,UAAU;GAAC;AAC7C;;;;WAA0C,MAAM,CAAC,UAAU,CAAC,MAAM,CAAC,CAAC,QAAQ,CAAC,SAAS,CAAC,CAAC;GAAC","sourcesContent":["import type { Color } from \"../util/Color\";\nimport type { Pattern } from \"../render/patterns/Pattern\";\nimport type { Gradient } from \"../render/gradients/Gradient\";\n\nimport { PicturePattern } from \"../render/patterns/PicturePattern\";\nimport { ISpriteSettings, ISpritePrivate, ISpriteEvents, Sprite } from \"./Sprite\";\nimport { IGraphics, BlendMode } from \"./backend/Renderer\";\n\nimport * as $type from \"../util/Type\";\nimport * as $array from \"../util/Array\";\n\n\nexport const visualSettings = [\"fill\", \"fillOpacity\", \"stroke\", \"strokeWidth\", \"strokeOpacity\", \"fillPattern\", \"strokePattern\", \"fillGradient\", \"strokeGradient\", \"strokeDasharray\", \"strokeDashoffset\", \"shadowBlur\", \"shadowColor\", \"shadowOpacity\", \"shadowOffsetX\", \"shadowOffsetY\", \"blur\", \"sepia\", \"invert\", \"brightness\", \"hue\", \"contrast\", \"saturate\"];\n\nexport interface IGraphicsSettings extends ISpriteSettings {\n\n\t/**\n\t * Fill color.\n\t *\n\t * @see {@link https://www.amcharts.com/docs/v5/concepts/colors-gradients-and-patterns/} for more information\n\t */\n\tfill?: Color;\n\n\t/**\n\t * Stroke (border or line) color.\n\t *\n\t * @see {@link https://www.amcharts.com/docs/v5/concepts/colors-gradients-and-patterns/} for more information\n\t */\n\tstroke?: Color;\n\n\t/**\n\t * Fill pattern.\n\t *\n\t * @see {@link https://www.amcharts.com/docs/v5/concepts/colors-gradients-and-patterns/patterns/} for more information\n\t */\n\tfillPattern?: Pattern;\n\n\t/**\n\t * Stroke (border or line) pattern.\n\t *\n\t * @see {@link https://www.amcharts.com/docs/v5/concepts/colors-gradients-and-patterns/patterns/} for more information\n\t */\n\tstrokePattern?: Pattern;\n\n\t/**\n\t * Fill gradient.\n\t *\n\t * @see {@link https://www.amcharts.com/docs/v5/concepts/colors-gradients-and-patterns/gradients/} for more information\n\t */\n\tfillGradient?: Gradient;\n\n\t/**\n\t * Stroke (border or line) gradient.\n\t *\n\t * @see {@link https://www.amcharts.com/docs/v5/concepts/colors-gradients-and-patterns/gradients/} for more information\n\t */\n\tstrokeGradient?: Gradient;\n\n\t/**\n\t * Stroke (border or line) dash settings.\n\t *\n\t * @see {@link https://www.amcharts.com/docs/v5/concepts/colors-gradients-and-patterns/#Dashed_lines} for more information\n\t */\n\tstrokeDasharray?: number[] | number;\n\n\t/**\n\t * Stroke (border or line) dash offset.\n\t *\n\t * @see {@link https://www.amcharts.com/docs/v5/concepts/colors-gradients-and-patterns/#Dashed_lines} for more information\n\t */\n\tstrokeDashoffset?: number;\n\n\t/**\n\t * Opacity of the fill. 0 - fully transparent; 1 - fully opaque.\n\t */\n\tfillOpacity?: number;\n\n\t/**\n\t * Opacity of the stroke (border or line). 0 - fully transparent; 1 - fully opaque.\n\t */\n\tstrokeOpacity?: number;\n\n\t/**\n\t * Width of the stroke (border or line) in pixels.\n\t */\n\tstrokeWidth?: number;\n\n\t/**\n\t * Indicates if stroke of a Graphics should stay the same when it's scale changes. Note, this doesn't take into account parent container scale changes.\n\t * @default false\n\t */\n\tnonScalingStroke?: boolean;\n\n\t/**\n\t * Drawing function.\n\t *\n\t * Must use renderer (`display` parameter) methods to draw.\n\t *\n\t * @see {@link https://www.amcharts.com/docs/v5/concepts/common-elements/graphics/#Custom_draw_functions} for more info\n\t */\n\tdraw?: (display: IGraphics, graphics: Graphics) => void;\n\n\t/**\n\t * Rendering mode.\n\t *\n\t * @default BlendMode.NORMAL (\"source-over\")\n\t * @see {@link https://developer.mozilla.org/en-US/docs/Web/API/CanvasRenderingContext2D/globalCompositeOperation} for more information\n\t * @ignore\n\t */\n\tblendMode?: BlendMode;\n\n\t/**\n\t * Draw a shape using an SVG path.\n\t *\n\t * @see {@link https://developer.mozilla.org/en-US/docs/Web/SVG/Tutorial/Paths} for more information\n\t */\n\tsvgPath?: string;\n\n\t/**\n\t * Color of the element's shadow.\n\t *\n\t * For this to work at least one of the following needs to be set as well:\n\t * `shadowBlur`, `shadowOffsetX`, `shadowOffsetY`.\n\t *\n\t * @see {@link https://www.amcharts.com/docs/v5/concepts/colors-gradients-and-patterns/shadows/} for more info\n\t */\n\tshadowColor?: Color | null;\n\n\t/**\n\t * Blurriness of the the shadow.\n\t *\n\t * The bigger the number, the more blurry shadow will be.\n\t *\n\t * @see {@link https://www.amcharts.com/docs/v5/concepts/colors-gradients-and-patterns/shadows/} for more info\n\t */\n\tshadowBlur?: number;\n\n\t/**\n\t * Horizontal shadow offset in pixels.\n\t *\n\t * @see {@link https://www.amcharts.com/docs/v5/concepts/colors-gradients-and-patterns/shadows/} for more info\n\t */\n\tshadowOffsetX?: number;\n\n\t/**\n\t * Vertical shadow offset in pixels.\n\t *\n\t * @see {@link https://www.amcharts.com/docs/v5/concepts/colors-gradients-and-patterns/shadows/} for more info\n\t */\n\tshadowOffsetY?: number;\n\n\t/**\n\t * Opacity of the shadow (0-1).\n\t *\n\t * If not set, will use the same as `fillOpacity` of the element.\n\t *\n\t * @see {@link https://www.amcharts.com/docs/v5/concepts/colors-gradients-and-patterns/shadows/} for more info\n\t */\n\tshadowOpacity?: number;\n\n\t/**\n\t * A method to be used on anchor points (joints) of the multi-point line.\n\t *\n\t * @see {@link https://developer.mozilla.org/en-US/docs/Web/API/CanvasRenderingContext2D/lineJoin} for more info\n\t * @default \"miter\"\n\t * @since 5.2.10\n\t */\n\tlineJoin?: \"miter\" | \"round\" | \"bevel\";\n}\n\nexport interface IGraphicsPrivate extends ISpritePrivate {\n\n}\n\nexport interface IGraphicsEvents extends ISpriteEvents {\n\n}\n\n/**\n * Base class used for drawing shapes.\n *\n * @see {@link https://www.amcharts.com/docs/v5/concepts/common-elements/graphics/} for more info\n * @important\n */\nexport class Graphics extends Sprite {\n\n\tdeclare public _settings: IGraphicsSettings;\n\tdeclare public _privateSettings: IGraphicsPrivate;\n\tdeclare public _events: IGraphicsEvents;\n\n\tpublic _display: IGraphics = this._root._renderer.makeGraphics();\n\n\tprotected _clear = false;\n\n\tpublic static className: string = \"Graphics\";\n\tpublic static classNames: Array<string> = Sprite.classNames.concat([Graphics.className]);\n\n\tpublic _beforeChanged() {\n\t\tsuper._beforeChanged();\n\n\t\tif (this.isDirty(\"draw\") || this.isDirty(\"svgPath\")) {\n\t\t\tthis.markDirtyBounds();\n\t\t}\n\n\t\tif (this.isDirty(\"fill\") || this.isDirty(\"stroke\") || this.isDirty(\"visible\") || this.isDirty(\"forceHidden\") || this.isDirty(\"scale\") || this.isDirty(\"fillGradient\") || this.isDirty(\"strokeGradient\") || this.isDirty(\"fillPattern\") || this.isDirty(\"strokePattern\") || this.isDirty(\"fillOpacity\") || this.isDirty(\"strokeOpacity\") || this.isDirty(\"strokeWidth\") || this.isDirty(\"draw\") || this.isDirty(\"blendMode\") || this.isDirty(\"strokeDasharray\") || this.isDirty(\"strokeDashoffset\") || this.isDirty(\"svgPath\") || this.isDirty(\"lineJoin\") || this.isDirty(\"shadowColor\") || this.isDirty(\"shadowBlur\") || this.isDirty(\"shadowOffsetX\") || this.isDirty(\"shadowOffsetY\")) {\n\t\t\tthis._clear = true;\n\t\t}\n\n\t\tthis._display.crisp = this.get(\"crisp\", false);\n\n\t\tif (this.isDirty(\"fillGradient\")) {\n\t\t\tconst gradient = this.get(\"fillGradient\");\n\t\t\tif (gradient) {\n\t\t\t\tthis._display.isMeasured = true;\n\t\t\t\tconst gradientTarget = gradient.get(\"target\");\n\t\t\t\tif (gradientTarget) {\n\t\t\t\t\tthis._disposers.push(gradientTarget.events.on(\"boundschanged\", () => {\n\t\t\t\t\t\tthis._markDirtyKey(\"fill\");\n\t\t\t\t\t}))\n\t\t\t\t\tthis._disposers.push(\n\t\t\t\t\t\tgradientTarget.events.on(\"positionchanged\", () => {\n\t\t\t\t\t\t\tthis._markDirtyKey(\"fill\");\n\t\t\t\t\t\t}))\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tif (this.isDirty(\"strokeGradient\")) {\n\t\t\tconst gradient = this.get(\"strokeGradient\");\n\t\t\tif (gradient) {\n\t\t\t\tthis._display.isMeasured = true;\n\t\t\t\tconst gradientTarget = gradient.get(\"target\");\n\t\t\t\tif (gradientTarget) {\n\t\t\t\t\tthis._disposers.push(\n\t\t\t\t\t\tgradientTarget.events.on(\"boundschanged\", () => {\n\t\t\t\t\t\t\tthis._markDirtyKey(\"stroke\");\n\t\t\t\t\t\t}))\n\t\t\t\t\tthis._disposers.push(\n\t\t\t\t\t\tgradientTarget.events.on(\"positionchanged\", () => {\n\t\t\t\t\t\t\tthis._markDirtyKey(\"stroke\");\n\t\t\t\t\t\t}))\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\tpublic _changed() {\n\t\tsuper._changed();\n\n\t\tif (this._clear) {\n\t\t\tthis.markDirtyBounds();\n\t\t\tthis.markDirtyLayer();\n\t\t\tthis._display.clear();\n\n\t\t\tlet strokeDasharray = this.get(\"strokeDasharray\");\n\t\t\tif ($type.isNumber(strokeDasharray)) {\n\t\t\t\tif (strokeDasharray < 0.5) {\n\t\t\t\t\tstrokeDasharray = [0];\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tstrokeDasharray = [strokeDasharray]\n\t\t\t\t}\n\t\t\t}\n\t\t\tthis._display.setLineDash(strokeDasharray as number[]);\n\n\t\t\tconst strokeDashoffset = this.get(\"strokeDashoffset\");\n\t\t\tif (strokeDashoffset) {\n\t\t\t\tthis._display.setLineDashOffset(strokeDashoffset);\n\t\t\t}\n\n\t\t\tconst blendMode = this.get(\"blendMode\", BlendMode.NORMAL);\n\t\t\tthis._display.blendMode = blendMode;\n\n\t\t\tconst draw = this.get(\"draw\");\n\t\t\tif (draw) {\n\t\t\t\tdraw(this._display, this);\n\t\t\t}\n\n\t\t\tconst svgPath = this.get(\"svgPath\");\n\t\t\tif (svgPath != null) {\n\t\t\t\tthis._display.svgPath(svgPath!);\n\t\t\t}\n\t\t}\n\t}\n\n\tpublic _afterChanged() {\n\t\tsuper._afterChanged();\n\n\t\tif (this._clear) {\n\t\t\tconst fill = this.get(\"fill\");\n\t\t\tconst fillGradient = this.get(\"fillGradient\");\n\t\t\tconst fillPattern = this.get(\"fillPattern\");\n\t\t\tconst fillOpacity = this.get(\"fillOpacity\");\n\n\t\t\tconst stroke = this.get(\"stroke\");\n\t\t\tconst strokeGradient = this.get(\"strokeGradient\");\n\t\t\tconst strokePattern = this.get(\"strokePattern\");\n\n\t\t\tconst shadowColor = this.get(\"shadowColor\");\n\t\t\tconst shadowBlur = this.get(\"shadowBlur\");\n\t\t\tconst shadowOffsetX = this.get(\"shadowOffsetX\");\n\t\t\tconst shadowOffsetY = this.get(\"shadowOffsetY\");\n\t\t\tconst shadowOpacity = this.get(\"shadowOpacity\");\n\n\t\t\t//const bounds = this._display.getLocalBounds();\n\n\t\t\tif (shadowColor && (shadowBlur || shadowOffsetX || shadowOffsetY)) {\n\t\t\t\tthis._display.shadow(shadowColor, shadowBlur, shadowOffsetX, shadowOffsetY, shadowOpacity);\n\t\t\t}\n\n\t\t\tif (fill && !fillGradient) {\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 (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\n\t\t\tif (fillPattern) {\n\t\t\t\t/*\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\t*/\n\t\t\t\tconst pattern = fillPattern.pattern;\n\t\t\t\tif (pattern) {\n\t\t\t\t\tthis._display.beginFill(pattern, fillOpacity);\n\t\t\t\t\tthis._display.endFill();\n\n\t\t\t\t\tif (fillPattern instanceof PicturePattern) {\n\t\t\t\t\t\tfillPattern.events.once(\"loaded\", () => {\n\t\t\t\t\t\t\tthis._clear = true;\n\t\t\t\t\t\t\tthis.markDirty();\n\t\t\t\t\t\t});\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif (stroke || strokeGradient || strokePattern) {\n\t\t\t\tconst strokeOpacity = this.get(\"strokeOpacity\");\n\t\t\t\tlet strokeWidth = this.get(\"strokeWidth\", 1);\n\n\t\t\t\tif (this.get(\"nonScalingStroke\")) {\n\t\t\t\t\tstrokeWidth = strokeWidth / this.get(\"scale\", 1)\n\t\t\t\t}\n\n\t\t\t\tif (this.get(\"crisp\")) {\n\t\t\t\t\tstrokeWidth /= this._root._renderer.resolution;\n\t\t\t\t}\n\n\t\t\t\tconst lineJoin = this.get(\"lineJoin\");\n\n\t\t\t\tif (stroke && !strokeGradient) {\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\n\t\t\t\tif (strokeGradient) {\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\n\t\t\t\tif (strokePattern) {\n\t\t\t\t\t/*\n\t\t\t\t\tlet changed = false;\n\t\t\t\t\t\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\t*/\n\t\t\t\t\tlet pattern = strokePattern.pattern;\n\n\t\t\t\t\tif (pattern) {\n\t\t\t\t\t\tthis._display.lineStyle(strokeWidth, pattern, strokeOpacity, lineJoin);\n\t\t\t\t\t\tthis._display.endStroke();\n\n\t\t\t\t\t\tif (strokePattern instanceof PicturePattern) {\n\t\t\t\t\t\t\tstrokePattern.events.once(\"loaded\", () => {\n\t\t\t\t\t\t\t\tthis._clear = true;\n\t\t\t\t\t\t\t\tthis.markDirty();\n\t\t\t\t\t\t\t});\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif (this.getPrivate(\"showingTooltip\")) {\n\t\t\t\tthis.showTooltip();\n\t\t\t}\n\t\t}\n\n\t\tthis._clear = false;\n\t}\n\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Rectangle.d.ts","sourceRoot":"","sources":["../../../../../src/.internal/core/render/Rectangle.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,iBAAiB,EAAE,gBAAgB,EAAE,MAAM,YAAY,CAAC;AAE3E,MAAM,WAAW,kBAAmB,SAAQ,iBAAiB;CAC5D;AAED,MAAM,WAAW,iBAAkB,SAAQ,gBAAgB;CAC1D;AAED;;;;;GAKG;AACH,qBAAa,SAAU,SAAQ,QAAQ;IAEvB,SAAS,EAAE,kBAAkB,CAAC;IAC9B,gBAAgB,EAAE,iBAAiB,CAAC;IAEnD,OAAc,SAAS,EAAE,MAAM,CAAe;IAC9C,OAAc,UAAU,EAAE,KAAK,CAAC,MAAM,CAAC,CAAqD;IAErF,
|
|
1
|
+
{"version":3,"file":"Rectangle.d.ts","sourceRoot":"","sources":["../../../../../src/.internal/core/render/Rectangle.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,iBAAiB,EAAE,gBAAgB,EAAE,MAAM,YAAY,CAAC;AAE3E,MAAM,WAAW,kBAAmB,SAAQ,iBAAiB;CAC5D;AAED,MAAM,WAAW,iBAAkB,SAAQ,gBAAgB;CAC1D;AAED;;;;;GAKG;AACH,qBAAa,SAAU,SAAQ,QAAQ;IAEvB,SAAS,EAAE,kBAAkB,CAAC;IAC9B,gBAAgB,EAAE,iBAAiB,CAAC;IAEnD,OAAc,SAAS,EAAE,MAAM,CAAe;IAC9C,OAAc,UAAU,EAAE,KAAK,CAAC,MAAM,CAAC,CAAqD;IAErF,SAAS;IAMT,cAAc;IAQd,QAAQ;IAQf,SAAS,CAAC,KAAK;IAIR,WAAW;CAIlB"}
|
|
@@ -6,18 +6,10 @@ import { Graphics } from "./Graphics";
|
|
|
6
6
|
* @important
|
|
7
7
|
*/
|
|
8
8
|
export class Rectangle extends Graphics {
|
|
9
|
-
constructor() {
|
|
10
|
-
super(...arguments);
|
|
11
|
-
Object.defineProperty(this, "_trustBounds", {
|
|
12
|
-
enumerable: true,
|
|
13
|
-
configurable: true,
|
|
14
|
-
writable: true,
|
|
15
|
-
value: true
|
|
16
|
-
});
|
|
17
|
-
}
|
|
18
9
|
_afterNew() {
|
|
19
10
|
super._afterNew();
|
|
20
11
|
this._display.isMeasured = true;
|
|
12
|
+
this.setPrivateRaw("trustBounds", true);
|
|
21
13
|
}
|
|
22
14
|
_beforeChanged() {
|
|
23
15
|
super._beforeChanged();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Rectangle.js","sourceRoot":"","sources":["../../../../../src/.internal/core/render/Rectangle.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAuC,MAAM,YAAY,CAAC;AAQ3E;;;;;GAKG;AACH,MAAM,OAAO,SAAU,SAAQ,QAAQ;
|
|
1
|
+
{"version":3,"file":"Rectangle.js","sourceRoot":"","sources":["../../../../../src/.internal/core/render/Rectangle.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAuC,MAAM,YAAY,CAAC;AAQ3E;;;;;GAKG;AACH,MAAM,OAAO,SAAU,SAAQ,QAAQ;IAQ/B,SAAS;QACf,KAAK,CAAC,SAAS,EAAE,CAAC;QAClB,IAAI,CAAC,QAAQ,CAAC,UAAU,GAAG,IAAI,CAAC;QAChC,IAAI,CAAC,aAAa,CAAC,aAAa,EAAE,IAAI,CAAC,CAAC;IACzC,CAAC;IAEM,cAAc;QACpB,KAAK,CAAC,cAAc,EAAE,CAAC;QAEvB,IAAI,IAAI,CAAC,OAAO,CAAC,OAAO,CAAC,IAAI,IAAI,CAAC,OAAO,CAAC,QAAQ,CAAC,IAAI,IAAI,CAAC,cAAc,CAAC,OAAO,CAAC,IAAI,IAAI,CAAC,cAAc,CAAC,QAAQ,CAAC,EAAE;YACrH,IAAI,CAAC,MAAM,GAAG,IAAI,CAAC;SACnB;IACF,CAAC;IAEM,QAAQ;QACd,KAAK,CAAC,QAAQ,EAAE,CAAC;QAEjB,IAAI,IAAI,CAAC,MAAM,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,MAAM,CAAC,EAAE;YACrC,IAAI,CAAC,KAAK,EAAE,CAAC;SACb;IACF,CAAC;IAES,KAAK;QACd,IAAI,CAAC,QAAQ,CAAC,QAAQ,CAAC,CAAC,EAAE,CAAC,EAAE,IAAI,CAAC,KAAK,EAAE,EAAE,IAAI,CAAC,MAAM,EAAE,CAAC,CAAC;IAC3D,CAAC;IAEM,WAAW;QACjB,IAAI,CAAC,SAAS,EAAE,CAAA;QAChB,IAAI,CAAC,MAAM,GAAG,IAAI,CAAC;IACpB,CAAC;;AAhCD;;;;WAAkC,WAAW;GAAC;AAC9C;;;;WAA0C,QAAQ,CAAC,UAAU,CAAC,MAAM,CAAC,CAAC,SAAS,CAAC,SAAS,CAAC,CAAC;GAAC","sourcesContent":["import { Graphics, IGraphicsSettings, IGraphicsPrivate } from \"./Graphics\";\n\nexport interface IRectangleSettings extends IGraphicsSettings {\n}\n\nexport interface IRectanglePrivate extends IGraphicsPrivate {\n}\n\n/**\n * Draws a rectangle.\n *\n * @see {@link https://www.amcharts.com/docs/v5/concepts/common-elements/graphics/} for more info\n * @important\n */\nexport class Rectangle extends Graphics {\n\n\tdeclare public _settings: IRectangleSettings;\n\tdeclare public _privateSettings: IRectanglePrivate;\n\n\tpublic static className: string = \"Rectangle\";\n\tpublic static classNames: Array<string> = Graphics.classNames.concat([Rectangle.className]);\n\n\tpublic _afterNew(){\n\t\tsuper._afterNew();\n\t\tthis._display.isMeasured = true;\n\t\tthis.setPrivateRaw(\"trustBounds\", true);\n\t}\n\n\tpublic _beforeChanged() {\n\t\tsuper._beforeChanged();\n\n\t\tif (this.isDirty(\"width\") || this.isDirty(\"height\") || this.isPrivateDirty(\"width\") || this.isPrivateDirty(\"height\")) {\n\t\t\tthis._clear = true;\n\t\t}\n\t}\n\n\tpublic _changed() {\n\t\tsuper._changed();\n\n\t\tif (this._clear && !this.get(\"draw\")) {\n\t\t\tthis._draw();\n\t\t}\n\t}\n\n\tprotected _draw() {\n\t\tthis._display.drawRect(0, 0, this.width(), this.height());\n\t}\n\n\tpublic _updateSize() {\n\t\tthis.markDirty()\n\t\tthis._clear = true;\n\t}\n}\n"]}
|