@amcharts/amcharts5 5.3.15 → 5.3.16
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/Treemap.d.ts +2 -0
- package/.internal/charts/hierarchy/Treemap.d.ts.map +1 -1
- package/.internal/charts/hierarchy/Treemap.js +32 -0
- package/.internal/charts/hierarchy/Treemap.js.map +1 -1
- package/.internal/charts/xy/XYCursor.js +1 -1
- package/.internal/charts/xy/XYCursor.js.map +1 -1
- package/.internal/core/Registry.js +1 -1
- package/.internal/core/Registry.js.map +1 -1
- package/.internal/core/Root.d.ts.map +1 -1
- package/.internal/core/Root.js +5 -3
- package/.internal/core/Root.js.map +1 -1
- package/.internal/core/render/Legend.d.ts.map +1 -1
- package/.internal/core/render/Legend.js +2 -1
- package/.internal/core/render/Legend.js.map +1 -1
- package/.internal/core/render/RadialLabel.d.ts +5 -0
- package/.internal/core/render/RadialLabel.d.ts.map +1 -1
- package/.internal/core/render/RadialLabel.js.map +1 -1
- package/.internal/core/render/Sprite.d.ts +8 -0
- package/.internal/core/render/Sprite.d.ts.map +1 -1
- package/.internal/core/render/Sprite.js +3 -0
- package/.internal/core/render/Sprite.js.map +1 -1
- package/.internal/plugins/exporting/Annotator.d.ts.map +1 -1
- package/.internal/plugins/exporting/Annotator.js +5 -1
- package/.internal/plugins/exporting/Annotator.js.map +1 -1
- package/CHANGELOG.md +8 -0
- package/examples/javascript/flow-chord/package.json +1 -1
- package/examples/javascript/flow-chord-directed/package.json +1 -1
- package/examples/javascript/flow-chord-non-ribbon/package.json +1 -1
- package/examples/javascript/flow-sankey/package.json +1 -1
- package/examples/javascript/gauge/package.json +1 -1
- package/examples/javascript/gauge-bands/package.json +1 -1
- package/examples/javascript/hierarchy-force-directed/package.json +1 -1
- package/examples/javascript/hierarchy-pack/package.json +1 -1
- package/examples/javascript/hierarchy-partition/package.json +1 -1
- package/examples/javascript/hierarchy-sunburst/package.json +1 -1
- package/examples/javascript/hierarchy-tree/package.json +1 -1
- package/examples/javascript/hierarchy-treemap/package.json +1 -1
- package/examples/javascript/jest/package.json +1 -1
- package/examples/javascript/json-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-chord/package.json +1 -1
- package/examples/typescript/flow-chord-directed/package.json +1 -1
- package/examples/typescript/flow-chord-non-ribbon/package.json +1 -1
- package/examples/typescript/flow-sankey/package.json +1 -1
- package/examples/typescript/gauge/package.json +1 -1
- package/examples/typescript/gauge-bands/package.json +1 -1
- package/examples/typescript/hierarchy-force-directed/package.json +1 -1
- package/examples/typescript/hierarchy-pack/package.json +1 -1
- package/examples/typescript/hierarchy-partition/package.json +1 -1
- package/examples/typescript/hierarchy-sunburst/package.json +1 -1
- package/examples/typescript/hierarchy-tree/package.json +1 -1
- package/examples/typescript/hierarchy-treemap/package.json +1 -1
- package/examples/typescript/jest/package.json +1 -1
- package/examples/typescript/json-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/package.json +2 -2
|
@@ -85,6 +85,7 @@ export class Annotator extends Entity {
|
|
|
85
85
|
//this._root._renderer.interactionsEnabled = true;
|
|
86
86
|
const markerArea = yield this.getMarkerArea();
|
|
87
87
|
markerArea.close();
|
|
88
|
+
this._markerArea = undefined;
|
|
88
89
|
});
|
|
89
90
|
}
|
|
90
91
|
/**
|
|
@@ -96,7 +97,9 @@ export class Annotator extends Entity {
|
|
|
96
97
|
this._root._renderer.interactionsEnabled = true;
|
|
97
98
|
const markerArea = yield this.getMarkerArea();
|
|
98
99
|
this._picture.show(0);
|
|
99
|
-
markerArea.
|
|
100
|
+
markerArea.close();
|
|
101
|
+
this._markerArea = undefined;
|
|
102
|
+
//markerArea!.cancel();
|
|
100
103
|
});
|
|
101
104
|
}
|
|
102
105
|
/**
|
|
@@ -152,6 +155,7 @@ export class Annotator extends Entity {
|
|
|
152
155
|
this._disposers.push($utils.addEventListener(markerArea, "close", () => {
|
|
153
156
|
this._root._renderer.interactionsEnabled = true;
|
|
154
157
|
this._picture.show(0);
|
|
158
|
+
this._markerArea = undefined;
|
|
155
159
|
}));
|
|
156
160
|
this._disposers.push($utils.addEventListener(markerArea, "render", (event) => {
|
|
157
161
|
const picture = this._picture;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Annotator.js","sourceRoot":"","sources":["../../../../../src/.internal/plugins/exporting/Annotator.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,MAAM,EAAkD,MAAM,wBAAwB,CAAA;AAC/F,OAAO,EAAE,SAAS,EAAE,MAAM,6BAA6B,CAAC;AACxD,OAAO,EAAE,OAAO,EAAE,MAAM,2BAA2B,CAAC;AACpD,OAAO,KAAK,MAAM,MAAM,uBAAuB,CAAC;AAEhD,OAAO,EAAE,IAAI,EAAE,MAAM,yBAAyB,CAAC;AA0B/C;;;;GAIG;AACH,MAAM,OAAO,SAAU,SAAQ,MAAM;IAArC;;QAQC;;;;;WAA+B;QAC/B;;;;;WAA2B;QAC3B;;;;;WAA0B;QAC1B;;;;mBAAgC,KAAK;WAAC;IA4JvC,CAAC;IA1JA,+DAA+D;IAC/D,iCAAiC;IAEvB,SAAS;QAClB,KAAK,CAAC,SAAS,EAAE,CAAC;QAClB,IAAI,CAAC,cAAc,CAAC,OAAO,EAAE,IAAI,CAAC,CAAC;QACnC,IAAI,CAAC,KAAK,CAAC,WAAW,CAAC,IAAI,CAAC,CAAC;IAC9B,CAAC;IAEM,cAAc;QACpB,KAAK,CAAC,cAAc,EAAE,CAAC;QAEvB,IAAI,IAAI,CAAC,OAAO,CAAC,aAAa,CAAC,EAAE;YAChC,IAAI,CAAC,YAAY,EAAE,CAAC;SACpB;IACF,CAAC;IAED;;;OAGG;IACU,IAAI;;YAEhB,0EAA0E;YAC1E,IAAI,CAAC,UAAU,CAAC,GAAG,EAAE;gBACpB,IAAI,CAAC,KAAK,CAAC,SAAS,CAAC,mBAAmB,GAAG,KAAK,CAAC;YAClD,CAAC,EAAE,GAAG,CAAC,CA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WAAW;GAAC;AAC9C;;;;WAA0C,MAAM,CAAC,UAAU,CAAC,MAAM,CAAC,CAAC,SAAS,CAAC,SAAS,CAAC,CAAC;GAAC","sourcesContent":["import { Entity, IEntitySettings, IEntityPrivate, IEntityEvents } from \"../../core/util/Entity\"\nimport { Container } from \"../../core/render/Container\";\nimport { Picture } from \"../../core/render/Picture\";\nimport * as $utils from \"../../core/util/Utils\";\n\nimport { p100 } from \"../../core/util/Percent\";\n\nexport interface IAnnotatorSettings extends IEntitySettings {\n\n\t/**\n\t * Layer number to use for annotations.\n\t *\n\t * @default 1000\n\t */\n\tlayer?: number;\n\n\t/**\n\t * Raw annotation info saved by MarkerJS.\n\t */\n\tmarkerState?: any;\n\n}\n\nexport interface IAnnotatorPrivate extends IEntityPrivate {\n}\n\nexport interface IAnnotatorEvents extends IEntityEvents {\n}\n\n\n\n/**\n * A plugin that can be used to annotate charts.\n *\n * @see {@link https://www.amcharts.com/docs/v5/concepts/exporting/annotator/} for more info\n */\nexport class Annotator extends Entity {\n\tpublic static className: string = \"Annotator\";\n\tpublic static classNames: Array<string> = Entity.classNames.concat([Annotator.className]);\n\n\tdeclare public _settings: IAnnotatorSettings;\n\tdeclare public _privateSettings: IAnnotatorPrivate;\n\tdeclare public _events: IAnnotatorEvents;\n\n\tprivate _container?: Container;\n\tprivate _picture?: Picture;\n\tprivate _markerArea?: any;\n\tprivate _skipRender?: boolean = false;\n\n\t//public extraImages: Array<Root | IAnnotatorImageSource> = [];\n\t//public dataSources: any[] = [];\n\n\tprotected _afterNew() {\n\t\tsuper._afterNew();\n\t\tthis._setRawDefault(\"layer\", 1000);\n\t\tthis._root.addDisposer(this);\n\t}\n\n\tpublic _beforeChanged() {\n\t\tsuper._beforeChanged();\n\n\t\tif (this.isDirty(\"markerState\")) {\n\t\t\tthis._renderState();\n\t\t}\n\t}\n\n\t/**\n\t * Triggers annotation mode on the chart. This will display UI toolbars and\n\t * disable all interactions on the chart itself.\n\t */\n\tpublic async open() {\n\n\t\t// Delay this so that it's not knocked off by closing of the ExportingMenu\n\t\tthis.setTimeout(() => {\n\t\t\tthis._root._renderer.interactionsEnabled = false;\n\t\t}, 100)\n\n\t\tconst markerArea = await this.getMarkerArea();\n\t\tmarkerArea.show();\n\t\tthis._picture!.hide(0);\n\t\tif (this.get(\"markerState\")) {\n\t\t\tmarkerArea.restoreState(this.get(\"markerState\"));\n\t\t}\n\t}\n\n\tpublic async _renderState() {\n\t\tconst markerArea = await this.getMarkerArea();\n\t\tif (this.get(\"markerState\")) {\n\t\t\tthis._skipRender = true;\n\t\t\tmarkerArea.renderState(this.get(\"markerState\"));\n\t\t}\n\t}\n\n\t/**\n\t * Exists from annotation mode. All annotations remain visible on the chart.\n\t */\n\tpublic async close() {\n\t\t//this._root._renderer.interactionsEnabled = true;\n\t\tconst markerArea = await this.getMarkerArea();\n\t\tmarkerArea!.close();\n\t}\n\n\t/**\n\t * Exits from annotation mode. Any changes made during last session of the\n\t * annotation editing are cancelled.\n\t */\n\tpublic async cancel() {\n\t\tthis._root._renderer.interactionsEnabled = true;\n\t\tconst markerArea = await this.getMarkerArea();\n\t\tthis._picture!.show(0);\n\t\tmarkerArea!.cancel();\n\t}\n\n\t/**\n\t * All annotations are removed.\n\t */\n\tpublic clear() {\n\t\tthis.set(\"markerState\", undefined);\n\t\tif (this._picture) {\n\t\t\tthis._picture.set(\"src\", \"\");\n\t\t}\n\t}\n\n\tpublic async toggle() {\n\t\tconst markerArea = await this.getMarkerArea();\n\t\tif (markerArea.isOpen) {\n\t\t\tthis.close();\n\t\t}\n\t\telse {\n\t\t\tthis.open();\n\t\t}\n\t}\n\n\tpublic dispose(): void {\n\t\tsuper.dispose();\n\t\tif (this._markerArea && this._markerArea.isOpen) {\n\t\t\tthis._markerArea.close();\n\t\t}\n\t}\n\n\tprivate async _maybeInit() {\n\n\t\t// Create layer canvas\n\t\tif (!this._container) {\n\t\t\tthis._container = this._root.container.children.push(Container.new(this._root, {\n\t\t\t\twidth: p100,\n\t\t\t\theight: p100,\n\t\t\t\tlayer: this.get(\"layer\"),\n\t\t\t\tinteractiveChildren: false\n\t\t\t}));\n\n\t\t\tthis._picture = this._container.children.push(Picture.new(this._root, {\n\t\t\t\twidth: p100,\n\t\t\t\theight: p100\n\t\t\t}));\n\t\t}\n\n\t\t// Create MarkerArea\n\t\tif (!this._markerArea) {\n\t\t\tconst markerjs2 = await this._getMarkerJS();\n\t\t\tconst canvas = this._container._display.getCanvas();\n\t\t\tconst markerArea = new markerjs2.MarkerArea(canvas);\n\t\t\t//markerArea.renderTarget = canvas;\n\t\t\tmarkerArea.uiStyleSettings.logoPosition = \"right\";\n\t\t\tmarkerArea.uiStyleSettings.zIndex = 20;\n\t\t\tmarkerArea.targetRoot = canvas.parentElement!;\n\n\t\t\tthis._disposers.push($utils.addEventListener(markerArea, \"close\", () => {\n\t\t\t\tthis._root._renderer.interactionsEnabled = true;\n\t\t\t\tthis._picture!.show(0);\n\t\t\t}));\n\n\t\t\tthis._disposers.push($utils.addEventListener(markerArea, \"render\", (event: any) => {\n\t\t\t\tconst picture = this._picture!;\n\t\t\t\tpicture.set(\"src\", event.dataUrl);\n\t\t\t\tif (!this._skipRender) {\n\t\t\t\t\tthis.set(\"markerState\", event.state);\n\t\t\t\t}\n\t\t\t\tthis._skipRender = false;\n\t\t\t}));\n\n\t\t\tthis._markerArea = markerArea;\n\t\t}\n\t}\n\n\t/**\n\t * @ignore\n\t */\n\tprivate async _getMarkerJS(): Promise<any> {\n\t\treturn await import(/* webpackChunkName: \"markerjs2\" */ \"markerjs2\");\n\t}\n\n\t/**\n\t * An instance of MarkerJS's [[MarkerArea]].\n\t *\n\t * @see {@link https://markerjs.com/docs/getting-started} for more info\n\t * @return MarkerArea\n\t */\n\tpublic async getMarkerArea(): Promise<any> {\n\t\tawait this._maybeInit();\n\t\treturn this._markerArea;\n\t}\n\n}\n"]}
|
|
1
|
+
{"version":3,"file":"Annotator.js","sourceRoot":"","sources":["../../../../../src/.internal/plugins/exporting/Annotator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,CAAC;GAAC","sourcesContent":["import { Entity, IEntitySettings, IEntityPrivate, IEntityEvents } from \"../../core/util/Entity\"\nimport { Container } from \"../../core/render/Container\";\nimport { Picture } from \"../../core/render/Picture\";\nimport * as $utils from \"../../core/util/Utils\";\n\nimport { p100 } from \"../../core/util/Percent\";\n\nexport interface IAnnotatorSettings extends IEntitySettings {\n\n\t/**\n\t * Layer number to use for annotations.\n\t *\n\t * @default 1000\n\t */\n\tlayer?: number;\n\n\t/**\n\t * Raw annotation info saved by MarkerJS.\n\t */\n\tmarkerState?: any;\n\n}\n\nexport interface IAnnotatorPrivate extends IEntityPrivate {\n}\n\nexport interface IAnnotatorEvents extends IEntityEvents {\n}\n\n\n\n/**\n * A plugin that can be used to annotate charts.\n *\n * @see {@link https://www.amcharts.com/docs/v5/concepts/exporting/annotator/} for more info\n */\nexport class Annotator extends Entity {\n\tpublic static className: string = \"Annotator\";\n\tpublic static classNames: Array<string> = Entity.classNames.concat([Annotator.className]);\n\n\tdeclare public _settings: IAnnotatorSettings;\n\tdeclare public _privateSettings: IAnnotatorPrivate;\n\tdeclare public _events: IAnnotatorEvents;\n\n\tprivate _container?: Container;\n\tprivate _picture?: Picture;\n\tprivate _markerArea?: any;\n\tprivate _skipRender?: boolean = false;\n\n\t//public extraImages: Array<Root | IAnnotatorImageSource> = [];\n\t//public dataSources: any[] = [];\n\n\tprotected _afterNew() {\n\t\tsuper._afterNew();\n\t\tthis._setRawDefault(\"layer\", 1000);\n\t\tthis._root.addDisposer(this);\n\t}\n\n\tpublic _beforeChanged() {\n\t\tsuper._beforeChanged();\n\n\t\tif (this.isDirty(\"markerState\")) {\n\t\t\tthis._renderState();\n\t\t}\n\t}\n\n\t/**\n\t * Triggers annotation mode on the chart. This will display UI toolbars and\n\t * disable all interactions on the chart itself.\n\t */\n\tpublic async open() {\n\n\t\t// Delay this so that it's not knocked off by closing of the ExportingMenu\n\t\tthis.setTimeout(() => {\n\t\t\tthis._root._renderer.interactionsEnabled = false;\n\t\t}, 100)\n\n\t\tconst markerArea = await this.getMarkerArea();\n\t\tmarkerArea.show();\n\t\tthis._picture!.hide(0);\n\t\tif (this.get(\"markerState\")) {\n\t\t\tmarkerArea.restoreState(this.get(\"markerState\"));\n\t\t}\n\t}\n\n\tpublic async _renderState() {\n\t\tconst markerArea = await this.getMarkerArea();\n\t\tif (this.get(\"markerState\")) {\n\t\t\tthis._skipRender = true;\n\t\t\tmarkerArea.renderState(this.get(\"markerState\"));\n\t\t}\n\t}\n\n\t/**\n\t * Exists from annotation mode. All annotations remain visible on the chart.\n\t */\n\tpublic async close() {\n\t\t//this._root._renderer.interactionsEnabled = true;\n\t\tconst markerArea = await this.getMarkerArea();\n\t\tmarkerArea!.close();\n\t\tthis._markerArea = undefined;\n\t}\n\n\t/**\n\t * Exits from annotation mode. Any changes made during last session of the\n\t * annotation editing are cancelled.\n\t */\n\tpublic async cancel() {\n\t\tthis._root._renderer.interactionsEnabled = true;\n\t\tconst markerArea = await this.getMarkerArea();\n\t\tthis._picture!.show(0);\n\t\tmarkerArea!.close();\n\t\tthis._markerArea = undefined;\n\t\t//markerArea!.cancel();\n\t}\n\n\t/**\n\t * All annotations are removed.\n\t */\n\tpublic clear() {\n\t\tthis.set(\"markerState\", undefined);\n\t\tif (this._picture) {\n\t\t\tthis._picture.set(\"src\", \"\");\n\t\t}\n\t}\n\n\tpublic async toggle() {\n\t\tconst markerArea = await this.getMarkerArea();\n\t\tif (markerArea.isOpen) {\n\t\t\tthis.close();\n\t\t}\n\t\telse {\n\t\t\tthis.open();\n\t\t}\n\t}\n\n\tpublic dispose(): void {\n\t\tsuper.dispose();\n\t\tif (this._markerArea && this._markerArea.isOpen) {\n\t\t\tthis._markerArea.close();\n\t\t}\n\t}\n\n\tprivate async _maybeInit() {\n\n\t\t// Create layer canvas\n\t\tif (!this._container) {\n\t\t\tthis._container = this._root.container.children.push(Container.new(this._root, {\n\t\t\t\twidth: p100,\n\t\t\t\theight: p100,\n\t\t\t\tlayer: this.get(\"layer\"),\n\t\t\t\tinteractiveChildren: false\n\t\t\t}));\n\n\t\t\tthis._picture = this._container.children.push(Picture.new(this._root, {\n\t\t\t\twidth: p100,\n\t\t\t\theight: p100\n\t\t\t}));\n\t\t}\n\n\t\t// Create MarkerArea\n\t\tif (!this._markerArea) {\n\t\t\tconst markerjs2 = await this._getMarkerJS();\n\t\t\tconst canvas = this._container._display.getCanvas();\n\t\t\tconst markerArea = new markerjs2.MarkerArea(canvas);\n\t\t\t//markerArea.renderTarget = canvas;\n\t\t\tmarkerArea.uiStyleSettings.logoPosition = \"right\";\n\t\t\tmarkerArea.uiStyleSettings.zIndex = 20;\n\t\t\tmarkerArea.targetRoot = canvas.parentElement!;\n\n\t\t\tthis._disposers.push($utils.addEventListener(markerArea, \"close\", () => {\n\t\t\t\tthis._root._renderer.interactionsEnabled = true;\n\t\t\t\tthis._picture!.show(0);\n\t\t\t\tthis._markerArea = undefined;\n\t\t\t}));\n\n\t\t\tthis._disposers.push($utils.addEventListener(markerArea, \"render\", (event: any) => {\n\t\t\t\tconst picture = this._picture!;\n\t\t\t\tpicture.set(\"src\", event.dataUrl);\n\t\t\t\tif (!this._skipRender) {\n\t\t\t\t\tthis.set(\"markerState\", event.state);\n\t\t\t\t}\n\t\t\t\tthis._skipRender = false;\n\t\t\t}));\n\n\t\t\tthis._markerArea = markerArea;\n\t\t}\n\t}\n\n\t/**\n\t * @ignore\n\t */\n\tprivate async _getMarkerJS(): Promise<any> {\n\t\treturn await import(/* webpackChunkName: \"markerjs2\" */ \"markerjs2\");\n\t}\n\n\t/**\n\t * An instance of MarkerJS's [[MarkerArea]].\n\t *\n\t * @see {@link https://markerjs.com/docs/getting-started} for more info\n\t * @return MarkerArea\n\t */\n\tpublic async getMarkerArea(): Promise<any> {\n\t\tawait this._maybeInit();\n\t\treturn this._markerArea;\n\t}\n\n}\n"]}
|
package/CHANGELOG.md
CHANGED
|
@@ -5,6 +5,14 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/).
|
|
|
5
5
|
Please note, that this project, while following numbering syntax, it DOES NOT
|
|
6
6
|
adhere to [Semantic Versioning](http://semver.org/spec/v2.0.0.html) rules.
|
|
7
7
|
|
|
8
|
+
## [5.3.16] - 2023-06-13
|
|
9
|
+
|
|
10
|
+
### Fixed
|
|
11
|
+
- Legend label's were losing their disabled state if labels were updated by moving cursor.
|
|
12
|
+
- `Treemap`'s focus navigation using arrow keys and `focusableGroup` was not working properly.
|
|
13
|
+
- `Annotator` plugin was sometimes retaining drawings after drawing was cancelled.
|
|
14
|
+
|
|
15
|
+
|
|
8
16
|
## [5.3.15] - 2023-06-01
|
|
9
17
|
|
|
10
18
|
### Fixed
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
"name": "amcharts5-example-xy-animated-bullet-at-the-end-of-the-series",
|
|
4
4
|
"version": "0.1.0",
|
|
5
5
|
"devDependencies": {
|
|
6
|
-
"@amcharts/amcharts5": "^5.3.
|
|
6
|
+
"@amcharts/amcharts5": "^5.3.16",
|
|
7
7
|
"source-map-loader": "^4.0.1",
|
|
8
8
|
"webpack": "^5.1.3",
|
|
9
9
|
"webpack-cli": "^5.1.1",
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
"name": "amcharts5-example-xy-comparing-series-google-analytics-style",
|
|
4
4
|
"version": "0.1.0",
|
|
5
5
|
"devDependencies": {
|
|
6
|
-
"@amcharts/amcharts5": "^5.3.
|
|
6
|
+
"@amcharts/amcharts5": "^5.3.16",
|
|
7
7
|
"source-map-loader": "^4.0.1",
|
|
8
8
|
"webpack": "^5.1.3",
|
|
9
9
|
"webpack-cli": "^5.1.1",
|