@amcharts/amcharts5 5.1.9 → 5.1.12

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.
Files changed (288) hide show
  1. package/.internal/charts/hierarchy/ForceDirected.d.ts +1 -0
  2. package/.internal/charts/hierarchy/ForceDirected.d.ts.map +1 -1
  3. package/.internal/charts/hierarchy/ForceDirected.js +9 -0
  4. package/.internal/charts/hierarchy/ForceDirected.js.map +1 -1
  5. package/.internal/charts/hierarchy/LinkedHierarchy.d.ts +1 -0
  6. package/.internal/charts/hierarchy/LinkedHierarchy.d.ts.map +1 -1
  7. package/.internal/charts/hierarchy/LinkedHierarchy.js +12 -3
  8. package/.internal/charts/hierarchy/LinkedHierarchy.js.map +1 -1
  9. package/.internal/charts/radar/RadarChart.d.ts.map +1 -1
  10. package/.internal/charts/radar/RadarChart.js +0 -2
  11. package/.internal/charts/radar/RadarChart.js.map +1 -1
  12. package/.internal/charts/xy/XYChart.d.ts +8 -1
  13. package/.internal/charts/xy/XYChart.d.ts.map +1 -1
  14. package/.internal/charts/xy/XYChart.js +22 -3
  15. package/.internal/charts/xy/XYChart.js.map +1 -1
  16. package/.internal/charts/xy/XYChartDefaultTheme.d.ts.map +1 -1
  17. package/.internal/charts/xy/XYChartDefaultTheme.js +0 -2
  18. package/.internal/charts/xy/XYChartDefaultTheme.js.map +1 -1
  19. package/.internal/charts/xy/axes/Axis.d.ts.map +1 -1
  20. package/.internal/charts/xy/axes/Axis.js +1 -0
  21. package/.internal/charts/xy/axes/Axis.js.map +1 -1
  22. package/.internal/charts/xy/axes/AxisRendererX.d.ts.map +1 -1
  23. package/.internal/charts/xy/axes/AxisRendererX.js +1 -0
  24. package/.internal/charts/xy/axes/AxisRendererX.js.map +1 -1
  25. package/.internal/charts/xy/axes/DateAxis.d.ts.map +1 -1
  26. package/.internal/charts/xy/axes/DateAxis.js +46 -4
  27. package/.internal/charts/xy/axes/DateAxis.js.map +1 -1
  28. package/.internal/charts/xy/axes/ValueAxis.d.ts +13 -0
  29. package/.internal/charts/xy/axes/ValueAxis.d.ts.map +1 -1
  30. package/.internal/charts/xy/axes/ValueAxis.js +125 -75
  31. package/.internal/charts/xy/axes/ValueAxis.js.map +1 -1
  32. package/.internal/charts/xy/series/BaseColumnSeries.d.ts.map +1 -1
  33. package/.internal/charts/xy/series/BaseColumnSeries.js +9 -0
  34. package/.internal/charts/xy/series/BaseColumnSeries.js.map +1 -1
  35. package/.internal/charts/xy/series/XYSeries.d.ts +11 -0
  36. package/.internal/charts/xy/series/XYSeries.d.ts.map +1 -1
  37. package/.internal/charts/xy/series/XYSeries.js +44 -11
  38. package/.internal/charts/xy/series/XYSeries.js.map +1 -1
  39. package/.internal/core/Root.d.ts +1 -0
  40. package/.internal/core/Root.d.ts.map +1 -1
  41. package/.internal/core/Root.js +11 -2
  42. package/.internal/core/Root.js.map +1 -1
  43. package/.internal/core/render/GridLayout.d.ts.map +1 -1
  44. package/.internal/core/render/GridLayout.js +11 -9
  45. package/.internal/core/render/GridLayout.js.map +1 -1
  46. package/.internal/core/render/HorizontalLayout.d.ts.map +1 -1
  47. package/.internal/core/render/HorizontalLayout.js +40 -34
  48. package/.internal/core/render/HorizontalLayout.js.map +1 -1
  49. package/.internal/core/render/Legend.d.ts.map +1 -1
  50. package/.internal/core/render/Legend.js +7 -0
  51. package/.internal/core/render/Legend.js.map +1 -1
  52. package/.internal/core/render/Scrollbar.d.ts.map +1 -1
  53. package/.internal/core/render/Scrollbar.js +3 -0
  54. package/.internal/core/render/Scrollbar.js.map +1 -1
  55. package/.internal/core/render/Series.d.ts +5 -0
  56. package/.internal/core/render/Series.d.ts.map +1 -1
  57. package/.internal/core/render/Series.js +40 -10
  58. package/.internal/core/render/Series.js.map +1 -1
  59. package/.internal/core/render/Sprite.d.ts +4 -0
  60. package/.internal/core/render/Sprite.d.ts.map +1 -1
  61. package/.internal/core/render/Sprite.js +14 -0
  62. package/.internal/core/render/Sprite.js.map +1 -1
  63. package/.internal/core/render/VerticalLayout.d.ts.map +1 -1
  64. package/.internal/core/render/VerticalLayout.js +40 -34
  65. package/.internal/core/render/VerticalLayout.js.map +1 -1
  66. package/.internal/core/render/backend/CanvasRenderer.d.ts +1 -0
  67. package/.internal/core/render/backend/CanvasRenderer.d.ts.map +1 -1
  68. package/.internal/core/render/backend/CanvasRenderer.js +17 -1
  69. package/.internal/core/render/backend/CanvasRenderer.js.map +1 -1
  70. package/.internal/core/render/backend/Renderer.d.ts +1 -0
  71. package/.internal/core/render/backend/Renderer.d.ts.map +1 -1
  72. package/.internal/core/render/backend/Renderer.js.map +1 -1
  73. package/.internal/core/util/PopulateString.js +12 -2
  74. package/.internal/core/util/PopulateString.js.map +1 -1
  75. package/.internal/core/util/Time.d.ts.map +1 -1
  76. package/.internal/core/util/Time.js +4 -0
  77. package/.internal/core/util/Time.js.map +1 -1
  78. package/.internal/plugins/exporting/ExportingMenu.d.ts.map +1 -1
  79. package/.internal/plugins/exporting/ExportingMenu.js +3 -2
  80. package/.internal/plugins/exporting/ExportingMenu.js.map +1 -1
  81. package/.internal/plugins/json/Classes-script.d.ts +271 -0
  82. package/.internal/plugins/json/Classes-script.d.ts.map +1 -0
  83. package/.internal/plugins/json/Classes-script.js +139 -0
  84. package/.internal/plugins/json/Classes-script.js.map +1 -0
  85. package/.internal/plugins/json/Classes.d.ts +262 -262
  86. package/.internal/plugins/json/Classes.d.ts.map +1 -1
  87. package/.internal/plugins/json/Classes.js +131 -262
  88. package/.internal/plugins/json/Classes.js.map +1 -1
  89. package/.internal/plugins/json/Json.d.ts +3 -3
  90. package/.internal/plugins/json/Json.d.ts.map +1 -1
  91. package/.internal/plugins/json/Json.js +301 -34
  92. package/.internal/plugins/json/Json.js.map +1 -1
  93. package/CHANGELOG.md +45 -0
  94. package/examples/javascript/flow-chord/package.json +1 -1
  95. package/examples/javascript/flow-chord-directed/package.json +1 -1
  96. package/examples/javascript/flow-chord-non-ribbon/package.json +1 -1
  97. package/examples/javascript/flow-sankey/package.json +1 -1
  98. package/examples/javascript/gauge/package.json +1 -1
  99. package/examples/javascript/gauge-bands/package.json +1 -1
  100. package/examples/javascript/hierarchy-force-directed/package.json +1 -1
  101. package/examples/javascript/hierarchy-pack/package.json +1 -1
  102. package/examples/javascript/hierarchy-partition/package.json +1 -1
  103. package/examples/javascript/hierarchy-sunburst/package.json +1 -1
  104. package/examples/javascript/hierarchy-tree/package.json +1 -1
  105. package/examples/javascript/hierarchy-treemap/package.json +1 -1
  106. package/examples/javascript/json/README.md +6 -0
  107. package/examples/javascript/json/index.css +11 -0
  108. package/examples/javascript/json/index.html +12 -0
  109. package/examples/javascript/json/index.js +206 -0
  110. package/examples/javascript/json/package.json +16 -0
  111. package/examples/javascript/json/webpack.config.js +38 -0
  112. package/examples/javascript/map-animating-along-lines/package.json +1 -1
  113. package/examples/javascript/map-day-and-night/package.json +1 -1
  114. package/examples/javascript/map-globe-rotate-to-country/package.json +1 -1
  115. package/examples/javascript/map-globe-with-projected-circles/package.json +1 -1
  116. package/examples/javascript/map-with-bubbles/package.json +1 -1
  117. package/examples/javascript/map-zoom-to-country/package.json +1 -1
  118. package/examples/javascript/misc-40-charts/package.json +1 -1
  119. package/examples/javascript/misc-microchart-grid/package.json +1 -1
  120. package/examples/javascript/pie-chart/package.json +1 -1
  121. package/examples/javascript/pie-donut-chart/package.json +1 -1
  122. package/examples/javascript/pie-variable-radius/package.json +1 -1
  123. package/examples/javascript/radar-column-iwatch-style/package.json +1 -1
  124. package/examples/javascript/radar-heat-map/package.json +1 -1
  125. package/examples/javascript/radar-line/package.json +1 -1
  126. package/examples/javascript/radar-time-line/package.json +1 -1
  127. package/examples/javascript/sliced-funnel/package.json +1 -1
  128. package/examples/javascript/sliced-pictorial-stacked/package.json +1 -1
  129. package/examples/javascript/sliced-pyramid/package.json +1 -1
  130. package/examples/javascript/venn-diagram/package.json +1 -1
  131. package/examples/javascript/wordcloud-with-data/package.json +1 -1
  132. package/examples/javascript/wordcloud-with-text/package.json +1 -1
  133. package/examples/javascript/xy-100-percent-stacked-column/package.json +1 -1
  134. package/examples/javascript/xy-animated-bullet-at-the-end-of-the-series/package.json +1 -1
  135. package/examples/javascript/xy-bubble/package.json +1 -1
  136. package/examples/javascript/xy-candlestick/package.json +1 -1
  137. package/examples/javascript/xy-clustered-column/package.json +1 -1
  138. package/examples/javascript/xy-column/package.json +1 -1
  139. package/examples/javascript/xy-comparing-series-google-analytics-style/package.json +1 -1
  140. package/examples/javascript/xy-data-grouping/package.json +1 -1
  141. package/examples/javascript/xy-draggable-range/package.json +1 -1
  142. package/examples/javascript/xy-drawing-series-with-mouse-or-touch/package.json +1 -1
  143. package/examples/javascript/xy-dumbbell plot/package.json +1 -1
  144. package/examples/javascript/xy-evenly-spaced-date-axis/package.json +1 -1
  145. package/examples/javascript/xy-line/package.json +1 -1
  146. package/examples/javascript/xy-line-highlight-on-legend-hover/package.json +1 -1
  147. package/examples/javascript/xy-live-data/package.json +1 -1
  148. package/examples/javascript/xy-multiple-synced-value-axes/package.json +1 -1
  149. package/examples/javascript/xy-ohlc/package.json +1 -1
  150. package/examples/javascript/xy-real-time-data-sorting/package.json +1 -1
  151. package/examples/javascript/xy-smoothed-line/package.json +1 -1
  152. package/examples/javascript/xy-stacked-and-clustered-column/package.json +1 -1
  153. package/examples/javascript/xy-stacked-column/package.json +1 -1
  154. package/examples/javascript/xy-stacked-step/package.json +1 -1
  155. package/examples/javascript/xy-stock/package.json +1 -1
  156. package/examples/javascript/xy-stock-comparing/package.json +1 -1
  157. package/examples/typescript/flow-chord/package.json +1 -1
  158. package/examples/typescript/flow-chord/webpack.config.js +1 -1
  159. package/examples/typescript/flow-chord-directed/package.json +1 -1
  160. package/examples/typescript/flow-chord-directed/webpack.config.js +1 -1
  161. package/examples/typescript/flow-chord-non-ribbon/package.json +1 -1
  162. package/examples/typescript/flow-chord-non-ribbon/webpack.config.js +1 -1
  163. package/examples/typescript/flow-sankey/package.json +1 -1
  164. package/examples/typescript/flow-sankey/webpack.config.js +1 -1
  165. package/examples/typescript/gauge/package.json +1 -1
  166. package/examples/typescript/gauge/webpack.config.js +1 -1
  167. package/examples/typescript/gauge-bands/package.json +1 -1
  168. package/examples/typescript/gauge-bands/webpack.config.js +1 -1
  169. package/examples/typescript/hierarchy-force-directed/package.json +1 -1
  170. package/examples/typescript/hierarchy-force-directed/webpack.config.js +1 -1
  171. package/examples/typescript/hierarchy-pack/package.json +1 -1
  172. package/examples/typescript/hierarchy-pack/webpack.config.js +1 -1
  173. package/examples/typescript/hierarchy-partition/package.json +1 -1
  174. package/examples/typescript/hierarchy-partition/webpack.config.js +1 -1
  175. package/examples/typescript/hierarchy-sunburst/package.json +1 -1
  176. package/examples/typescript/hierarchy-sunburst/webpack.config.js +1 -1
  177. package/examples/typescript/hierarchy-tree/package.json +1 -1
  178. package/examples/typescript/hierarchy-tree/webpack.config.js +1 -1
  179. package/examples/typescript/hierarchy-treemap/package.json +1 -1
  180. package/examples/typescript/hierarchy-treemap/webpack.config.js +1 -1
  181. package/examples/typescript/json/README.md +6 -0
  182. package/examples/typescript/json/index.css +11 -0
  183. package/examples/typescript/json/index.html +12 -0
  184. package/examples/typescript/json/index.ts +206 -0
  185. package/examples/typescript/json/package.json +18 -0
  186. package/examples/typescript/json/tsconfig.json +12 -0
  187. package/examples/typescript/json/webpack.config.js +45 -0
  188. package/examples/typescript/map-animating-along-lines/package.json +1 -1
  189. package/examples/typescript/map-animating-along-lines/webpack.config.js +1 -1
  190. package/examples/typescript/map-day-and-night/package.json +1 -1
  191. package/examples/typescript/map-day-and-night/webpack.config.js +1 -1
  192. package/examples/typescript/map-globe-rotate-to-country/package.json +1 -1
  193. package/examples/typescript/map-globe-rotate-to-country/webpack.config.js +1 -1
  194. package/examples/typescript/map-globe-with-projected-circles/package.json +1 -1
  195. package/examples/typescript/map-globe-with-projected-circles/webpack.config.js +1 -1
  196. package/examples/typescript/map-with-bubbles/package.json +1 -1
  197. package/examples/typescript/map-with-bubbles/webpack.config.js +1 -1
  198. package/examples/typescript/map-zoom-to-country/package.json +1 -1
  199. package/examples/typescript/map-zoom-to-country/webpack.config.js +1 -1
  200. package/examples/typescript/misc-40-charts/package.json +1 -1
  201. package/examples/typescript/misc-40-charts/webpack.config.js +1 -1
  202. package/examples/typescript/misc-microchart-grid/package.json +1 -1
  203. package/examples/typescript/misc-microchart-grid/webpack.config.js +1 -1
  204. package/examples/typescript/pie-chart/package.json +1 -1
  205. package/examples/typescript/pie-chart/webpack.config.js +1 -1
  206. package/examples/typescript/pie-donut-chart/package.json +1 -1
  207. package/examples/typescript/pie-donut-chart/webpack.config.js +1 -1
  208. package/examples/typescript/pie-variable-radius/package.json +1 -1
  209. package/examples/typescript/pie-variable-radius/webpack.config.js +1 -1
  210. package/examples/typescript/radar-column-iwatch-style/package.json +1 -1
  211. package/examples/typescript/radar-column-iwatch-style/webpack.config.js +1 -1
  212. package/examples/typescript/radar-heat-map/package.json +1 -1
  213. package/examples/typescript/radar-heat-map/webpack.config.js +1 -1
  214. package/examples/typescript/radar-line/package.json +1 -1
  215. package/examples/typescript/radar-line/webpack.config.js +1 -1
  216. package/examples/typescript/radar-time-line/package.json +1 -1
  217. package/examples/typescript/radar-time-line/webpack.config.js +1 -1
  218. package/examples/typescript/sliced-funnel/package.json +1 -1
  219. package/examples/typescript/sliced-funnel/webpack.config.js +1 -1
  220. package/examples/typescript/sliced-pictorial-stacked/package.json +1 -1
  221. package/examples/typescript/sliced-pictorial-stacked/webpack.config.js +1 -1
  222. package/examples/typescript/sliced-pyramid/package.json +1 -1
  223. package/examples/typescript/sliced-pyramid/webpack.config.js +1 -1
  224. package/examples/typescript/venn-diagram/package.json +1 -1
  225. package/examples/typescript/venn-diagram/webpack.config.js +1 -1
  226. package/examples/typescript/wordcloud-with-data/package.json +1 -1
  227. package/examples/typescript/wordcloud-with-data/webpack.config.js +1 -1
  228. package/examples/typescript/wordcloud-with-text/package.json +1 -1
  229. package/examples/typescript/wordcloud-with-text/webpack.config.js +1 -1
  230. package/examples/typescript/xy-100-percent-stacked-column/package.json +1 -1
  231. package/examples/typescript/xy-100-percent-stacked-column/webpack.config.js +1 -1
  232. package/examples/typescript/xy-animated-bullet-at-the-end-of-the-series/package.json +1 -1
  233. package/examples/typescript/xy-animated-bullet-at-the-end-of-the-series/webpack.config.js +1 -1
  234. package/examples/typescript/xy-bubble/package.json +1 -1
  235. package/examples/typescript/xy-bubble/webpack.config.js +1 -1
  236. package/examples/typescript/xy-candlestick/package.json +1 -1
  237. package/examples/typescript/xy-candlestick/webpack.config.js +1 -1
  238. package/examples/typescript/xy-clustered-column/package.json +1 -1
  239. package/examples/typescript/xy-clustered-column/webpack.config.js +1 -1
  240. package/examples/typescript/xy-column/package.json +1 -1
  241. package/examples/typescript/xy-column/webpack.config.js +1 -1
  242. package/examples/typescript/xy-comparing-series-google-analytics-style/package.json +1 -1
  243. package/examples/typescript/xy-comparing-series-google-analytics-style/webpack.config.js +1 -1
  244. package/examples/typescript/xy-data-grouping/package.json +1 -1
  245. package/examples/typescript/xy-data-grouping/webpack.config.js +1 -1
  246. package/examples/typescript/xy-draggable-range/package.json +1 -1
  247. package/examples/typescript/xy-draggable-range/webpack.config.js +1 -1
  248. package/examples/typescript/xy-drawing-series-with-mouse-or-touch/package.json +1 -1
  249. package/examples/typescript/xy-drawing-series-with-mouse-or-touch/webpack.config.js +1 -1
  250. package/examples/typescript/xy-dumbbell plot/package.json +1 -1
  251. package/examples/typescript/xy-dumbbell plot/webpack.config.js +1 -1
  252. package/examples/typescript/xy-evenly-spaced-date-axis/package.json +1 -1
  253. package/examples/typescript/xy-evenly-spaced-date-axis/webpack.config.js +1 -1
  254. package/examples/typescript/xy-line/package.json +1 -1
  255. package/examples/typescript/xy-line/webpack.config.js +1 -1
  256. package/examples/typescript/xy-line-highlight-on-legend-hover/package.json +1 -1
  257. package/examples/typescript/xy-line-highlight-on-legend-hover/webpack.config.js +1 -1
  258. package/examples/typescript/xy-live-data/package.json +1 -1
  259. package/examples/typescript/xy-live-data/webpack.config.js +1 -1
  260. package/examples/typescript/xy-multiple-synced-value-axes/package.json +1 -1
  261. package/examples/typescript/xy-multiple-synced-value-axes/webpack.config.js +1 -1
  262. package/examples/typescript/xy-ohlc/package.json +1 -1
  263. package/examples/typescript/xy-ohlc/webpack.config.js +1 -1
  264. package/examples/typescript/xy-real-time-data-sorting/package.json +1 -1
  265. package/examples/typescript/xy-real-time-data-sorting/webpack.config.js +1 -1
  266. package/examples/typescript/xy-smoothed-line/package.json +1 -1
  267. package/examples/typescript/xy-smoothed-line/webpack.config.js +1 -1
  268. package/examples/typescript/xy-stacked-and-clustered-column/package.json +1 -1
  269. package/examples/typescript/xy-stacked-and-clustered-column/webpack.config.js +1 -1
  270. package/examples/typescript/xy-stacked-column/package.json +1 -1
  271. package/examples/typescript/xy-stacked-column/webpack.config.js +1 -1
  272. package/examples/typescript/xy-stacked-step/package.json +1 -1
  273. package/examples/typescript/xy-stacked-step/webpack.config.js +1 -1
  274. package/examples/typescript/xy-stock/package.json +1 -1
  275. package/examples/typescript/xy-stock/webpack.config.js +1 -1
  276. package/examples/typescript/xy-stock-comparing/package.json +1 -1
  277. package/examples/typescript/xy-stock-comparing/webpack.config.js +1 -1
  278. package/index.d.ts +4 -0
  279. package/index.d.ts.map +1 -1
  280. package/index.js +4 -0
  281. package/index.js.map +1 -1
  282. package/locales/lt_LT.js +25 -25
  283. package/locales/lt_LT.js.map +1 -1
  284. package/package.json +9 -9
  285. package/xy.d.ts +1 -0
  286. package/xy.d.ts.map +1 -1
  287. package/xy.js +1 -0
  288. package/xy.js.map +1 -1
@@ -1 +1 @@
1
- {"version":3,"file":"Root.js","sourceRoot":"","sources":["../../../../src/.internal/core/Root.ts"],"names":[],"mappings":"AASA,OAAO,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAC;AAC/C,OAAO,EAAE,gBAAgB,EAAE,MAAM,2BAA2B,CAAC;AAC7D,OAAO,EAAE,cAAc,EAAE,MAAM,yBAAyB,CAAC;AACzD,OAAO,EAAE,U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G,IAAI,CAAC,GAAG,CAAC,qBAAqB,EAAE,CAAC;YAC9C,OAAO;gBACN,CAAC,EAAE,KAAK,CAAC,CAAC,GAAG,IAAI,CAAC,IAAI;gBACtB,CAAC,EAAE,KAAK,CAAC,CAAC,GAAG,IAAI,CAAC,GAAG;aACrB,CAAC;QACH,CAAC;;IAED;;OAEG;;;;;eACH,UAAwC,QAAW;YAClD,IAAI,CAAC,UAAU,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;YAC/B,OAAO,QAAQ,CAAC;QACjB,CAAC;;IAED;;;;;;;;;;;;GAYE;;;;;eACF;YACC,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,QAAQ,CAAC,QAAQ,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE;gBAClD,IAAI,QAAQ,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,aAAa,CAAC,EAAE;oBAC9C,OAAO,IAAI,CAAC;iBACZ;aACD;YACD,OAAO,KAAK,CAAC;QACd,CAAC;;IAEF,WAAC;AAAD,CAAC,AA1xCD,IA0xCC","sourcesContent":["import type { IAnimation } from \"./util/Animation\";\nimport type { Entity } from \"./util/Entity\";\nimport type { Sprite } from \"./render/Sprite\";\nimport type { Text } from \"./render/Text\";\nimport type { Theme } from \"./Theme\";\nimport type { IPoint } from \"./util/IPoint\";\nimport type { IRenderer } from \"./render/backend/Renderer\";\nimport type { Timezone } from \"./util/Timezone\";\n\nimport { Container } from \"./render/Container\";\nimport { HorizontalLayout } from \"./render/HorizontalLayout\";\nimport { VerticalLayout } from \"./render/VerticalLayout\";\nimport { GridLayout } from \"./render/GridLayout\";\nimport { IDisposer, Disposer } from \"./util/Disposer\";\nimport { ResizeSensor } from \"./util/ResizeSensor\";\nimport { InterfaceColors } from \"./util/InterfaceColors\";\nimport { Graphics } from \"./render/Graphics\";\nimport { Rectangle } from \"./render/Rectangle\";\nimport { Tooltip } from \"./render/Tooltip\";\nimport { NumberFormatter } from \"./util/NumberFormatter\";\nimport { DateFormatter } from \"./util/DateFormatter\";\nimport { DurationFormatter } from \"./util/DurationFormatter\";\nimport { ILocale, Language } from \"./util/Language\";\nimport { Events, EventDispatcher } from \"./util/EventDispatcher\";\nimport { DefaultTheme } from \"../themes/DefaultTheme\";\nimport { CanvasRenderer } from \"./render/backend/CanvasRenderer\";\nimport { p100, percent } from \"./util/Percent\";\nimport { color } from \"./util/Color\";\nimport { populateString } from \"./util/PopulateString\";\nimport { registry } from \"./Registry\";\n\nimport * as $order from \"./util/Order\";\nimport * as $array from \"./util/Array\";\nimport * as $object from \"./util/Object\";\nimport * as $utils from \"./util/Utils\";\n\n\nimport en from \"../../locales/en\";\n\n\nfunction rAF(fps: number | undefined, callback: (currentTime: number) => void): void {\n\tif (fps == null) {\n\t\trequestAnimationFrame(callback);\n\n\t} else {\n\t\tsetTimeout(() => {\n\t\t\trequestAnimationFrame(callback);\n\t\t}, 1000 / fps);\n\t}\n}\n\n\n/**\n * @ignore\n */\ninterface IParent extends Entity {\n\t_prepareChildren(): void;\n\t_updateChildren(): void;\n}\n\ninterface IBounds extends Entity {\n\tdepth(): number;\n\t_updateBounds(): void;\n}\n\n\nexport interface IRootEvents {\n\tframestarted: {\n\t\ttimestamp: number;\n\t};\n\tframeended: {\n\t\ttimestamp: number;\n\t};\n}\n\n\nexport interface IRootSettings {\n\tuseSafeResolution?: boolean;\n}\n\n\n// TODO implement Disposer\n/**\n * Root element of the chart.\n *\n * @see {@link https://www.amcharts.com/docs/v5/getting-started/#Root_element} for more info\n */\nexport class Root implements IDisposer {\n\n\t/**\n\t * A reference to original chart container (div element).\n\t */\n\tpublic dom: HTMLElement;\n\tpublic _inner: HTMLElement;\n\n\tprotected _isDirty: boolean = false;\n\tprotected _isDirtyParents: boolean = false;\n\tprotected _dirty: { [id: number]: Entity } = {};\n\tprotected _dirtyParents: { [id: number]: IParent } = {};\n\tprotected _dirtyBounds: { [id: number]: IBounds } = {};\n\tprotected _dirtyPositions: { [id: number]: Sprite } = {};\n\n\tprotected _ticker: ((currentTime: number) => void) | null = null;\n\tprotected _tickers: Array<(currentTime: number) => void> = [];\n\n\t/**\n\t * Root's event dispatcher.\n\t *\n\t * @see {@link https://www.amcharts.com/docs/v5/concepts/events/} for more info\n\t */\n\tpublic events: EventDispatcher<Events<this, IRootEvents>> = new EventDispatcher();\n\n\t/**\n\t * @ignore\n\t * @todo needs description\n\t */\n\tpublic animationTime: number | null = null;\n\n\tprivate _animations: Array<IAnimation> = [];\n\n\tpublic _renderer: IRenderer;\n\n\tpublic _rootContainer!: Container;\n\n\t/**\n\t * Main content container.\n\t */\n\tpublic container!: Container;\n\n\t/**\n\t * A [[Container]] used to display tooltips in.\n\t */\n\tpublic tooltipContainer!: Container\n\n\tpublic _tooltip!: Tooltip;\n\n\t// Locale-related\n\n\t/**\n\t * @ignore\n\t */\n\tpublic language: Language = Language.new(this, {});\n\n\t/**\n\t * Locale used by the chart.\n\t *\n\t * @see {@link https://www.amcharts.com/docs/v5/concepts/locales/}\n\t */\n\tpublic locale: ILocale = en;\n\n\t// Date-time related\n\n\t/**\n\t * Use UTC when formatting date/time.\n\t *\n\t * @see {@link https://www.amcharts.com/docs/v5/concepts/formatters/formatting-dates/#UTC_and_time_zones} for more info\n\t */\n\tpublic utc: boolean = false;\n\n\t/**\n\t * If set, will format date/time in specific time zone.\n\t *\n\t * The value should be named time zone, e.g.:\n\t * `\"America/Vancouver\"`, `\"Australia/Sydney\"`, `\"UTC\"`.\n\t *\n\t * @see {@link https://www.amcharts.com/docs/v5/getting-started/root-element/#Time_zone} for more info\n\t * @since 5.1.0\n\t */\n\tpublic timezone?: Timezone;\n\n\t/**\n\t * The maximum FPS that the Root will run at.\n\t *\n\t * If `undefined` it will run at the highest FPS.\n\t *\n\t * @see {@link https://www.amcharts.com/docs/v5/getting-started/root-element/#Performance} for more info\n\t */\n\tpublic fps: number | undefined;\n\n\t/**\n\t * Number formatter.\n\t *\n\t * @see {@link https://www.amcharts.com/docs/v5/concepts/formatters/formatting-numbers/} for more info\n\t */\n\tpublic numberFormatter: NumberFormatter = NumberFormatter.new(this, {});\n\n\t/**\n\t * Date/time formatter.\n\t *\n\t * @see {@link https://www.amcharts.com/docs/v5/concepts/formatters/formatting-dates/} for more info\n\t */\n\tpublic dateFormatter: DateFormatter = DateFormatter.new(this, {});\n\n\t/**\n\t * Duration formatter.\n\t *\n\t * @see {@link https://www.amcharts.com/docs/v5/concepts/formatters/formatting-dates/} for more info\n\t */\n\tpublic durationFormatter: DurationFormatter = DurationFormatter.new(this, {});\n\n\n\t// Accessibility\n\n\t/**\n\t * Global tab index for using for the whole chart\n\t *\n\t * @see {@link https://www.amcharts.com/docs/v5/concepts/accessibility/} for more info\n\t */\n\tpublic tabindex: number = 0;\n\n\t//@todo maybe make this better\n\tprotected _tabindexes: Sprite[] = [];\n\n\tprotected _focusElementDirty: boolean = false;\n\tprotected _focusElementContainer: HTMLDivElement | undefined;\n\tprotected _focusedSprite: Sprite | undefined;\n\tprotected _keyboardDragPoint: IPoint | undefined;\n\tprotected _tooltipElementContainer: HTMLDivElement | undefined;\n\tprotected _readerAlertElement: HTMLDivElement | undefined;\n\n\tpublic _logo?: Container;\n\n\t/**\n\t * Used for dynamically-created CSS and JavaScript with strict source policies.\n\t */\n\tpublic nonce?: string;\n\n\t/**\n\t * Special color set to be used for various controls.\n\t *\n\t * @see {@link https://www.amcharts.com/docs/v5/concepts/colors-gradients-and-patterns/#Interface_colors} for more info\n\t */\n\tpublic interfaceColors: InterfaceColors;\n\n\t/**\n\t * An instance of vertical layout object that can be used to set `layout` setting\n\t * of a [[Container]].\n\t *\n\t * @default VerticalLayout.new()\n\t */\n\tpublic verticalLayout: VerticalLayout = VerticalLayout.new(this, {});\n\n\t/**\n\t * An instance of horizontal layout object that can be used to set `layout` setting\n\t * of a [[Container]].\n\t *\n\t * @default HorizontalLayout.new()\n\t */\n\tpublic horizontalLayout: VerticalLayout = HorizontalLayout.new(this, {});\n\n\t/**\n\t * An instance of grid layout object that can be used to set `layout` setting\n\t * of a [[Container]].\n\t *\n\t * @default VerticalLayout.new()\n\t */\n\tpublic gridLayout: VerticalLayout = GridLayout.new(this, {});\n\n\t/**\n\t * Indicates whether chart should resized automatically when parent container\n\t * width and/or height changes.\n\t *\n\t * If disabled (`autoResize = false`) you can make the chart resize manually\n\t * by calling root element's `resize()` method.\n\t */\n\tpublic autoResize: boolean = true;\n\n\tprotected _isDisposed: boolean = false;\n\tprotected _disposers: Array<IDisposer> = [];\n\n\tprotected _resizeSensorDisposer?: IDisposer;\n\n\tpublic _tooltips: Array<Tooltip> = [];\n\n\tprotected constructor(id: string | HTMLElement, settings: IRootSettings = {}, isReal: boolean) {\n\n\t\tif (!isReal) {\n\t\t\tthrow new Error(\"You cannot use `new Class()`, instead use `Class.new()`\");\n\t\t}\n\n\t\tif (settings.useSafeResolution == null) {\n\t\t\tsettings.useSafeResolution = true;\n\t\t}\n\n\t\tlet resolution;\n\n\t\tif (settings.useSafeResolution) {\n\t\t\tresolution = $utils.getSafeResolution();\n\t\t}\n\n\t\tthis._renderer = new CanvasRenderer(resolution);\n\n\t\tlet dom: HTMLElement | null;\n\n\t\tif (id instanceof HTMLElement) {\n\t\t\tdom = id;\n\t\t}\n\t\telse {\n\t\t\tdom = document.getElementById(id);\n\t\t}\n\n\t\t$array.each(registry.rootElements, (root) => {\n\t\t\tif (root.dom === dom) {\n\t\t\t\tthrow new Error(\"You cannot have multiple Roots on the same DOM node\");\n\t\t\t}\n\t\t});\n\n\t\tthis.interfaceColors = InterfaceColors.new(this, {});\n\n\t\tif (dom === null) {\n\t\t\tthrow new Error(\"Could not find HTML element with id `\" + id + \"`\");\n\t\t}\n\n\t\tthis.dom = dom;\n\n\t\tlet inner: HTMLDivElement = document.createElement(\"div\");\n\t\tinner.style.position = \"relative\";\n\t\tdom.appendChild(inner);\n\n\t\tthis._inner = inner;\n\n\t\tregistry.rootElements.push(this);\n\t}\n\n\tpublic static new(id: string | HTMLElement, settings?: IRootSettings): Root {\n\t\tconst root = new Root(id, settings, true);\n\t\troot._init();\n\t\treturn root;\n\t}\n\n\tpublic moveDOM(id: string | HTMLElement): void {\n\t\tlet dom: HTMLElement | null;\n\n\t\tif (id instanceof HTMLElement) {\n\t\t\tdom = id;\n\t\t}\n\t\telse {\n\t\t\tdom = document.getElementById(id);\n\t\t}\n\n\t\tif (dom) {\n\t\t\twhile (this.dom.childNodes.length > 0) {\n\t\t\t\tdom.appendChild(this.dom.childNodes[0]);\n\t\t\t}\n\t\t\tthis.dom = dom;\n\t\t\tthis._initResizeSensor();\n\t\t\tthis.resize();\n\t\t}\n\n\t}\n\n\n\tprotected _handleLogo(): void {\n\t\tif (this._logo) {\n\t\t\tconst w = this.dom.offsetWidth;\n\t\t\tconst h = this.dom.offsetHeight;\n\t\t\tif ((w <= 150) || (h <= 60)) {\n\t\t\t\tthis._logo.hide();\n\t\t\t}\n\t\t\telse {\n\t\t\t\tthis._logo.show();\n\t\t\t}\n\t\t}\n\t}\n\n\tpublic _showBranding(): void {\n\t\tif (!this._logo) {\n\t\t\tconst logo = this.tooltipContainer.children.push(Container.new(this, {\n\t\t\t\tinteractive: true,\n\t\t\t\tinteractiveChildren: false,\n\t\t\t\tposition: \"absolute\",\n\t\t\t\tsetStateOnChildren: true,\n\t\t\t\tpaddingTop: 9,\n\t\t\t\tpaddingRight: 9,\n\t\t\t\tpaddingBottom: 9,\n\t\t\t\tpaddingLeft: 9,\n\t\t\t\tscale: .6,\n\t\t\t\ty: percent(100),\n\t\t\t\tcenterY: p100,\n\t\t\t\ttooltipText: \"Created using amCharts 5\",\n\t\t\t\ttooltipX: p100,\n\t\t\t\tcursorOverStyle: \"pointer\",\n\t\t\t\tbackground: Rectangle.new(this, {\n\t\t\t\t\tfill: color(0x474758),\n\t\t\t\t\tfillOpacity: 0,\n\t\t\t\t\ttooltipY: 5\n\t\t\t\t})\n\t\t\t}));\n\n\t\t\tconst tooltip = Tooltip.new(this, {\n\t\t\t\tpointerOrientation: \"horizontal\",\n\t\t\t\tpaddingTop: 4,\n\t\t\t\tpaddingRight: 7,\n\t\t\t\tpaddingBottom: 4,\n\t\t\t\tpaddingLeft: 7\n\t\t\t});\n\t\t\ttooltip.label.setAll({\n\t\t\t\tfontSize: 12\n\t\t\t});\n\t\t\ttooltip.get(\"background\")!.setAll({\n\t\t\t\tfill: this.interfaceColors.get(\"background\"),\n\t\t\t\tstroke: this.interfaceColors.get(\"grid\"),\n\t\t\t\tstrokeOpacity: 0.3\n\t\t\t})\n\t\t\tlogo.set(\"tooltip\", tooltip);\n\n\t\t\tlogo.events.on(\"click\", () => {\n\t\t\t\twindow.open(\"https://www.amcharts.com/\", \"_blank\");\n\t\t\t});\n\n\t\t\tlogo.states.create(\"hover\", {});\n\n\t\t\tconst m = logo.children.push(Graphics.new(this, {\n\t\t\t\tstroke: color(0xcccccc),\n\t\t\t\tstrokeWidth: 3,\n\t\t\t\tsvgPath: \"M5 25 L13 25h13.6c3.4 0 6 0 10.3-4.3s5.2-12 8.6-12c3.4 0 4.3 8.6 7.7 8.6M83.4 25H79.8c-3.4 0-6 0-10.3-4.3s-5.2-12-8.6-12-4.3 8.6-7.7 8.6\"\n\t\t\t}));\n\n\t\t\tm.states.create(\"hover\", { stroke: color(0x3CABFF) });\n\n\t\t\tconst a = logo.children.push(Graphics.new(this, {\n\t\t\t\tstroke: color(0x888888),\n\t\t\t\tstrokeWidth: 3,\n\t\t\t\tsvgPath: \"M83.4 25h-31C37 25 39.5 4.4 28.4 4.4S18.9 24.2 4.3 25H0\"\n\t\t\t}));\n\n\t\t\ta.states.create(\"hover\", { stroke: color(0x474758) });\n\n\t\t\t//logo.set(\"tooltip\", this._tooltip);\n\t\t\t//logo.setPrivate(\"tooltipTarget\", logo.get(\"background\"));\n\t\t\tthis._logo = logo;\n\n\t\t\tthis._handleLogo();\n\t\t}\n\t}\n\n\tprotected _init(): void {\n\t\tconst renderer = this._renderer;\n\t\tconst rootContainer = Container.new(this, { visible: true, width: this.dom.clientWidth, height: this.dom.clientHeight });\n\t\tthis._rootContainer = rootContainer;\n\t\tthis._rootContainer._defaultThemes.push(DefaultTheme.new(this));\n\n\t\tconst container = rootContainer.children.push(Container.new(this, { visible: true, width: p100, height: p100 }));\n\t\tthis.container = container;\n\n\t\trenderer.resize(this.dom.clientWidth, this.dom.clientHeight);\n\n\t\t//@todo: better appendChild - refer\n\t\tthis._inner.appendChild(renderer.view);\n\n\t\t// TODO: TMP TMP TMP for testing only, remove\n\t\t//document.body.appendChild((<any>renderer)._ghostView);\n\n\t\tthis._initResizeSensor();\n\n\t\t// Create element which is used to make announcements to screen reader\n\t\tconst readerAlertElement = document.createElement(\"div\");\n\t\treaderAlertElement.setAttribute(\"role\", \"alert\");\n\t\treaderAlertElement.style.zIndex = \"-100000\";\n\t\treaderAlertElement.style.opacity = \"0\";\n\t\treaderAlertElement.style.position = \"absolute\";\n\t\treaderAlertElement.style.top = \"0\";\n\t\tthis._readerAlertElement = readerAlertElement;\n\t\tthis._inner.appendChild(this._readerAlertElement);\n\n\t\tconst focusElementContainer = document.createElement(\"div\");\n\t\tfocusElementContainer.style.position = \"absolute\";\n\t\tfocusElementContainer.style.pointerEvents = \"none\";\n\t\tfocusElementContainer.style.top = \"0px\";\n\t\tfocusElementContainer.style.left = \"0px\";\n\t\tfocusElementContainer.style.overflow = \"hidden\";\n\t\tfocusElementContainer.style.width = this.dom.clientWidth + \"px\";\n\t\tfocusElementContainer.style.height = this.dom.clientHeight + \"px\";\n\n\t\tfocusElementContainer.setAttribute(\"role\", \"application\");\n\n\t\t$utils.setInteractive(focusElementContainer, false);\n\t\tthis._focusElementContainer = focusElementContainer;\n\t\tthis._inner.appendChild(this._focusElementContainer);\n\n\t\tthis._tooltipElementContainer = document.createElement(\"div\");\n\t\tthis._inner.appendChild(this._tooltipElementContainer);\n\n\t\t// Add keyboard events for accessibility, e.g. simulating drag with arrow\n\t\t// keys and click with ENTER\n\t\tif ($utils.supports(\"keyboardevents\")) {\n\t\t\tthis._disposers.push($utils.addEventListener(focusElementContainer, \"keydown\", (ev: KeyboardEvent) => {\n\t\t\t\tconst focusedSprite = this._focusedSprite;\n\t\t\t\tif (focusedSprite) {\n\t\t\t\t\tif (ev.keyCode == 27) {\n\t\t\t\t\t\t// ESC pressed - lose current focus\n\t\t\t\t\t\t$utils.blur();\n\t\t\t\t\t\tthis._focusedSprite = undefined;\n\t\t\t\t\t}\n\t\t\t\t\tlet dragOffsetX = 0;\n\t\t\t\t\tlet dragOffsetY = 0;\n\t\t\t\t\t// TODO: figure out if using bogus MouseEvent is fine, or it will\n\t\t\t\t\t// fail on some platforms\n\t\t\t\t\tswitch (ev.keyCode) {\n\t\t\t\t\t\tcase 13:\n\t\t\t\t\t\t\tev.preventDefault();\n\t\t\t\t\t\t\tconst downEvent = renderer.getEvent(new MouseEvent(\"click\"));\n\t\t\t\t\t\t\tfocusedSprite.events.dispatch(\"click\", {\n\t\t\t\t\t\t\t\ttype: \"click\",\n\t\t\t\t\t\t\t\toriginalEvent: downEvent.event,\n\t\t\t\t\t\t\t\tpoint: downEvent.point,\n\t\t\t\t\t\t\t\tsimulated: true,\n\t\t\t\t\t\t\t\ttarget: focusedSprite\n\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\tcase 37:\n\t\t\t\t\t\t\tdragOffsetX = -6;\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase 39:\n\t\t\t\t\t\t\tdragOffsetX = 6;\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase 38:\n\t\t\t\t\t\t\tdragOffsetY = -6;\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase 40:\n\t\t\t\t\t\t\tdragOffsetY = 6;\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tdefault:\n\t\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\n\t\t\t\t\tif (dragOffsetX != 0 || dragOffsetY != 0) {\n\t\t\t\t\t\tev.preventDefault();\n\n\t\t\t\t\t\tif (!focusedSprite.isDragging()) {\n\t\t\t\t\t\t\t// Start dragging\n\t\t\t\t\t\t\tthis._keyboardDragPoint = {\n\t\t\t\t\t\t\t\tx: 0,\n\t\t\t\t\t\t\t\ty: 0\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\tconst downEvent = renderer.getEvent(new MouseEvent(\"mousedown\", {\n\t\t\t\t\t\t\t\tclientX: 0,\n\t\t\t\t\t\t\t\tclientY: 0\n\t\t\t\t\t\t\t}));\n\n\t\t\t\t\t\t\tif (focusedSprite.events.isEnabled(\"pointerdown\")) {\n\t\t\t\t\t\t\t\tfocusedSprite.events.dispatch(\"pointerdown\", {\n\t\t\t\t\t\t\t\t\ttype: \"pointerdown\",\n\t\t\t\t\t\t\t\t\toriginalEvent: downEvent.event,\n\t\t\t\t\t\t\t\t\tpoint: downEvent.point,\n\t\t\t\t\t\t\t\t\tsimulated: true,\n\t\t\t\t\t\t\t\t\ttarget: focusedSprite\n\t\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse {\n\t\t\t\t\t\t\t// Move focus marker\n\t\t\t\t\t\t\t//this._positionFocusElement(focusedSprite);\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t// Move incrementally\n\t\t\t\t\t\tconst dragPoint = this._keyboardDragPoint!;\n\t\t\t\t\t\tdragPoint.x += dragOffsetX;\n\t\t\t\t\t\tdragPoint.y += dragOffsetY;\n\t\t\t\t\t\tconst moveEvent = renderer.getEvent(new MouseEvent(\"mousemove\", {\n\t\t\t\t\t\t\tclientX: dragPoint.x,\n\t\t\t\t\t\t\tclientY: dragPoint.y\n\t\t\t\t\t\t}), false);\n\n\t\t\t\t\t\tif (focusedSprite.events.isEnabled(\"globalpointermove\")) {\n\t\t\t\t\t\t\tfocusedSprite.events.dispatch(\"globalpointermove\", {\n\t\t\t\t\t\t\t\ttype: \"globalpointermove\",\n\t\t\t\t\t\t\t\toriginalEvent: moveEvent.event,\n\t\t\t\t\t\t\t\tpoint: moveEvent.point,\n\t\t\t\t\t\t\t\tsimulated: true,\n\t\t\t\t\t\t\t\ttarget: focusedSprite\n\t\t\t\t\t\t\t});\n\t\t\t\t\t\t}\n\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}));\n\n\t\t\tthis._disposers.push($utils.addEventListener(focusElementContainer, \"keyup\", (ev: KeyboardEvent) => {\n\t\t\t\tif (this._focusedSprite) {\n\t\t\t\t\tconst focusedSprite = this._focusedSprite;\n\t\t\t\t\tconst keyCode = ev.keyCode;\n\t\t\t\t\tswitch (keyCode) {\n\t\t\t\t\t\tcase 37:\n\t\t\t\t\t\tcase 39:\n\t\t\t\t\t\tcase 38:\n\t\t\t\t\t\tcase 40:\n\t\t\t\t\t\t\tif (focusedSprite.isDragging()) {\n\t\t\t\t\t\t\t\t// Simulate drag stop\n\t\t\t\t\t\t\t\tconst dragPoint = this._keyboardDragPoint!;\n\t\t\t\t\t\t\t\tconst upEvent = renderer.getEvent(new MouseEvent(\"mouseup\", {\n\t\t\t\t\t\t\t\t\tclientX: dragPoint.x,\n\t\t\t\t\t\t\t\t\tclientY: dragPoint.y\n\t\t\t\t\t\t\t\t}));\n\n\t\t\t\t\t\t\t\tif (focusedSprite.events.isEnabled(\"globalpointerup\")) {\n\t\t\t\t\t\t\t\t\tfocusedSprite.events.dispatch(\"globalpointerup\", {\n\t\t\t\t\t\t\t\t\t\ttype: \"globalpointerup\",\n\t\t\t\t\t\t\t\t\t\toriginalEvent: upEvent.event,\n\t\t\t\t\t\t\t\t\t\tpoint: upEvent.point,\n\t\t\t\t\t\t\t\t\t\tsimulated: true,\n\t\t\t\t\t\t\t\t\t\ttarget: focusedSprite\n\t\t\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t//this._positionFocusElement(focusedSprite);\n\t\t\t\t\t\t\t\tthis._keyboardDragPoint = undefined;\n\t\t\t\t\t\t\t\t// @todo dispatch mouseup event instead of calling dragStop?\n\t\t\t\t\t\t\t\t// this._dispatchEvent(\"globalpointerup\", target, upEvent);\n\t\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\telse if (focusedSprite.get(\"focusableGroup\")) {\n\t\t\t\t\t\t\t\t// Find next item in focusable group\n\t\t\t\t\t\t\t\tconst group = focusedSprite.get(\"focusableGroup\");\n\t\t\t\t\t\t\t\tconst items = this._tabindexes.filter(item => item.get(\"focusableGroup\") == group);\n\t\t\t\t\t\t\t\tlet index = items.indexOf(focusedSprite);\n\t\t\t\t\t\t\t\tconst lastIndex = items.length - 1;\n\t\t\t\t\t\t\t\tindex += (keyCode == 39 || keyCode == 40) ? 1 : -1;\n\t\t\t\t\t\t\t\tif (index < 0) {\n\t\t\t\t\t\t\t\t\tindex = lastIndex;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\telse if (index > lastIndex) {\n\t\t\t\t\t\t\t\t\tindex = 0;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t$utils.focus(items[index].getPrivate(\"focusElement\")!.dom);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}));\n\t\t}\n\n\t\tthis._startTicker();\n\t\tthis.setThemes([]);\n\n\t\tthis._addTooltip();\n\n\t\tif (!this._hasLicense()) {\n\t\t\tthis._showBranding();\n\t\t}\n\t}\n\n\tprivate _initResizeSensor(): void {\n\t\tif (this._resizeSensorDisposer) {\n\t\t\tthis._resizeSensorDisposer.dispose();\n\t\t}\n\t\tthis._resizeSensorDisposer = new ResizeSensor(this.dom, () => {\n\t\t\tif (this.autoResize) {\n\t\t\t\tthis.resize();\n\t\t\t}\n\t\t});\n\t\tthis._disposers.push(this._resizeSensorDisposer);\n\t}\n\n\t/**\n\t * If automatic resizing of char is disabled (`root.autoResize = false`), it\n\t * can be resized manually by calling this method.\n\t */\n\tpublic resize(): void {\n\t\tconst dom = this.dom;\n\t\tconst w = dom.clientWidth;\n\t\tconst h = dom.clientHeight;\n\t\tif (w > 0 && h > 0) {\n\t\t\tconst focusElementContainer = this._focusElementContainer!;\n\n\t\t\tfocusElementContainer.style.width = w + \"px\";\n\t\t\tfocusElementContainer.style.height = h + \"px\";\n\n\t\t\tthis._renderer.resize(w, h);\n\n\t\t\tconst rootContainer = this._rootContainer;\n\n\t\t\trootContainer.setPrivate(\"width\", w);\n\t\t\trootContainer.setPrivate(\"height\", h);\n\t\t\tthis._render();\n\t\t\tthis._handleLogo();\n\t\t}\n\t}\n\n\tprivate _render() {\n\t\tthis._renderer.render(this._rootContainer._display);\n\n\t\tif (this._focusElementDirty) {\n\t\t\tthis._updateCurrentFocus();\n\t\t\tthis._focusElementDirty = false;\n\t\t}\n\t}\n\n\tprivate _runTickers(currentTime: number) {\n\t\t$array.each(this._tickers, (f) => {\n\t\t\tf(currentTime);\n\t\t});\n\t}\n\n\tprivate _runAnimations(currentTime: number) {\n\t\t$array.keepIf(this._animations, (animation) => {\n\t\t\treturn !animation._runAnimation(currentTime);\n\t\t});\n\t}\n\n\tprivate _runDirties() {\n\t\t//console.log(\"tick **************************************************************\");\n\t\tlet allParents: { [id: number]: IParent } = {};\n\n\t\twhile (this._isDirtyParents) {\n\t\t\t// This must be before calling _prepareChildren\n\t\t\tthis._isDirtyParents = false;\n\n\t\t\t$object.keys(this._dirtyParents).forEach((key) => {\n\t\t\t\tconst parent = this._dirtyParents[key];\n\n\t\t\t\tdelete this._dirtyParents[key];\n\n\t\t\t\tif (!parent.isDisposed()) {\n\t\t\t\t\tallParents[parent.uid] = parent;\n\t\t\t\t\tparent._prepareChildren();\n\t\t\t\t}\n\t\t\t});\n\t\t}\n\n\t\t$object.keys(allParents).forEach((key) => {\n\t\t\tallParents[key]._updateChildren();\n\t\t});\n\n\t\tconst objects: Array<Entity> = [];\n\n\t\t//\t\tconsole.log(\"_beforeChanged\")\n\t\t$object.keys(this._dirty).forEach((key) => {\n\t\t\tconst entity = this._dirty[key];\n\n\t\t\tif (entity.isDisposed()) {\n\t\t\t\tdelete this._dirty[entity.uid];\n\n\t\t\t} else {\n\t\t\t\tobjects.push(entity);\n\t\t\t\tentity._beforeChanged();\n\t\t\t}\n\t\t});\n\n\t\t//\t\tconsole.log(\"_changed\")\n\t\tobjects.forEach((entity) => {\n\t\t\tentity._changed();\n\t\t\tdelete this._dirty[entity.uid];\n\t\t\tentity._clearDirty();\n\t\t});\n\n\t\tthis._isDirty = false;\n\n\t\tconst depths: { [id: number]: number } = {};\n\t\tconst bounds: Array<IBounds> = [];\n\n\t\t$object.keys(this._dirtyBounds).forEach((key) => {\n\t\t\tconst entity = this._dirtyBounds[key];\n\n\t\t\tdelete this._dirtyBounds[key];\n\n\t\t\tif (!entity.isDisposed()) {\n\t\t\t\tdepths[entity.uid] = entity.depth();\n\t\t\t\tbounds.push(entity);\n\t\t\t}\n\t\t});\n\n\t\t// High depth -> low depth\n\t\tbounds.sort((x, y) => {\n\t\t\treturn $order.compare(depths[y.uid], depths[x.uid]);\n\t\t});\n\n\t\t//\t\tconsole.log(\"_updateBounds\")\n\t\tbounds.forEach((entity) => {\n\t\t\tentity._updateBounds();\n\t\t});\n\n\t\t//\t\tconsole.log(\"_updatePosition\")\n\t\tconst dirtyPositions = this._dirtyPositions;\n\t\t$object.keys(dirtyPositions).forEach((key) => {\n\t\t\tconst sprite = dirtyPositions[key];\n\n\t\t\tdelete dirtyPositions[key];\n\n\t\t\tif (!sprite.isDisposed()) {\n\t\t\t\tsprite._updatePosition();\n\t\t\t}\n\t\t});\n\n\t\t//\t\tconsole.log(\"_afterChanged\")\n\t\tobjects.forEach((entity) => {\n\t\t\tentity._afterChanged();\n\t\t});\n\n\t}\n\n\tprivate _runTicker(currentTime: number) {\n\t\tif (!this.isDisposed()) {\n\t\t\tthis.animationTime = currentTime;\n\n\t\t\tif (this.events.isEnabled(\"framestarted\")) {\n\t\t\t\tthis.events.dispatch(\"framestarted\", {\n\t\t\t\t\ttype: \"framestarted\",\n\t\t\t\t\ttarget: this,\n\t\t\t\t\ttimestamp: currentTime,\n\t\t\t\t});\n\t\t\t}\n\n\t\t\tthis._runTickers(currentTime);\n\t\t\tthis._runAnimations(currentTime);\n\t\t\tthis._runDirties();\n\t\t\tthis._render();\n\n\t\t\tif (this.events.isEnabled(\"frameended\")) {\n\t\t\t\tthis.events.dispatch(\"frameended\", {\n\t\t\t\t\ttype: \"frameended\",\n\t\t\t\t\ttarget: this,\n\t\t\t\t\ttimestamp: currentTime,\n\t\t\t\t});\n\t\t\t}\n\n\t\t\t// No more work to do\n\t\t\tif (this._tickers.length === 0 &&\n\t\t\t\tthis._animations.length === 0 &&\n\t\t\t\t!this._isDirty) {\n\n\t\t\t\tthis._ticker = null;\n\t\t\t\tthis.animationTime = null;\n\n\t\t\t} else {\n\t\t\t\trAF(this.fps, this._ticker!);\n\t\t\t}\n\t\t}\n\t}\n\n\tprivate _startTicker() {\n\t\tif (this._ticker === null) {\n\t\t\tthis.animationTime = null;\n\n\t\t\tthis._ticker = (currentTime) => {\n\t\t\t\tthis._runTicker(currentTime);\n\t\t\t};\n\n\t\t\trAF(this.fps, this._ticker!);\n\t\t}\n\t}\n\n\tpublic _addDirtyEntity(entity: Entity) {\n\t\tif (this._dirty[entity.uid] === undefined) {\n\t\t\tthis._isDirty = true;\n\t\t\tthis._dirty[entity.uid] = entity;\n\t\t\tthis._startTicker();\n\t\t}\n\t}\n\n\tpublic _addDirtyParent(parent: IParent) {\n\t\tif (this._dirtyParents[parent.uid] === undefined) {\n\t\t\tthis._isDirty = true;\n\t\t\tthis._isDirtyParents = true;\n\t\t\tthis._dirtyParents[parent.uid] = parent;\n\t\t\tthis._startTicker();\n\t\t}\n\t}\n\n\tpublic _addDirtyBounds(entity: IBounds) {\n\t\tif (this._dirtyBounds[entity.uid] === undefined) {\n\t\t\tthis._isDirty = true;\n\t\t\tthis._dirtyBounds[entity.uid] = entity;\n\t\t\tthis._startTicker();\n\t\t}\n\t}\n\n\tpublic _addDirtyPosition(sprite: Sprite) {\n\t\tif (this._dirtyPositions[sprite.uid] === undefined) {\n\t\t\tthis._isDirty = true;\n\t\t\tthis._dirtyPositions[sprite.uid] = sprite;\n\t\t\tthis._startTicker();\n\t\t}\n\t}\n\n\tpublic _addAnimation(animation: IAnimation) {\n\t\t// TODO use numeric id instead\n\t\tif (this._animations.indexOf(animation) === -1) {\n\t\t\tthis._animations.push(animation);\n\t\t\tthis._startTicker();\n\t\t}\n\t}\n\n\tpublic eachFrame(f: (currentTime: number) => void): IDisposer {\n\t\tthis._tickers.push(f);\n\t\tthis._startTicker();\n\n\t\treturn new Disposer(() => {\n\t\t\t$array.removeFirst(this._tickers, f);\n\t\t});\n\t}\n\n\t/**\n\t * Returns width of the target container, in pixels.\n\t *\n\t * @return Width\n\t */\n\tpublic width(): number {\n\t\treturn this.dom.clientWidth;\n\t}\n\n\t/**\n\t * Returns height of the target container, in pixels.\n\t *\n\t * @return Height\n\t */\n\tpublic height(): number {\n\t\treturn this.dom.clientHeight;\n\t}\n\n\t/**\n\t * Disposes root and all the content in it.\n\t */\n\tpublic dispose(): void {\n\t\tif (!this._isDisposed) {\n\t\t\tthis._isDisposed = true;\n\n\t\t\tthis._rootContainer.dispose();\n\t\t\tthis._renderer.dispose();\n\t\t\tthis.horizontalLayout.dispose();\n\t\t\tthis.verticalLayout.dispose();\n\t\t\tthis.interfaceColors.dispose();\n\n\t\t\t$array.each(this._disposers, (x) => {\n\t\t\t\tx.dispose();\n\t\t\t});\n\n\t\t\tif (this._inner) {\n\t\t\t\t$utils.removeElement(this._inner);\n\t\t\t}\n\n\t\t\t$array.remove(registry.rootElements, this);\n\t\t}\n\t}\n\n\t/**\n\t * Returns `true` if root element is disposed.\n\t *\n\t * @return Disposed?\n\t */\n\tpublic isDisposed(): boolean {\n\t\treturn this._isDisposed;\n\t}\n\n\t/**\n\t * Triggers screen reader read out a message.\n\t *\n\t * @see {@link https://www.amcharts.com/docs/v5/concepts/accessibility/} for more info\n\t * @param text Alert text\n\t */\n\tpublic readerAlert(text: string): void {\n\t\tthis._readerAlertElement!.innerHTML = text;\n\t}\n\n\t/**\n\t * Sets themes to be used for the chart.\n\t *\n\t * @see {@link https://www.amcharts.com/docs/v5/concepts/themes/} for more info\n\t * @param themes A list of themes\n\t */\n\tpublic setThemes(themes: Array<Theme>): void {\n\t\tthis._rootContainer.set(\"themes\", themes);\n\n\t\t// otherwise new themes are not applied\n\t\tconst tooltipContainer = this.tooltipContainer;\n\t\tif (tooltipContainer) {\n\t\t\ttooltipContainer._applyThemes();\n\t\t}\n\n\t\t// @todo review this\n\t\tconst interfaceColors = this.interfaceColors;\n\t\tif (interfaceColors) {\n\t\t\tinterfaceColors._applyThemes();\n\t\t}\n\t}\n\n\tprotected _addTooltip() {\n\t\tif (!this.tooltipContainer) {\n\t\t\tconst tooltipContainer = this._rootContainer.children.push(Container.new(this, { position: \"absolute\", isMeasured: false, width: p100, height: p100, layer: 30 }));\n\t\t\tthis.tooltipContainer = tooltipContainer;\n\n\t\t\tconst tooltip = Tooltip.new(this, {});\n\t\t\tthis.container.set(\"tooltip\", tooltip);\n\t\t\ttooltip.hide(0);\n\t\t\tthis._tooltip = tooltip;\n\t\t}\n\t}\n\n\t/**\n\t * Accesibility\n\t */\n\n\tpublic _registerTabindexOrder(target: Sprite): void {\n\t\tif (target.get(\"focusable\")) {\n\t\t\t$array.pushOne(this._tabindexes, target);\n\t\t}\n\t\telse {\n\t\t\t$array.remove(this._tabindexes, target);\n\t\t}\n\t\tthis._invalidateTabindexes();\n\t}\n\n\tpublic _unregisterTabindexOrder(target: Sprite): void {\n\t\t$array.remove(this._tabindexes, target);\n\t\tthis._invalidateTabindexes();\n\t}\n\n\tpublic _invalidateTabindexes(): void {\n\n\t\tthis._tabindexes.sort((a: Sprite, b: Sprite) => {\n\t\t\tconst aindex = a.get(\"tabindexOrder\", 0);\n\t\t\tconst bindex = b.get(\"tabindexOrder\", 0);\n\t\t\tif (aindex == bindex) {\n\t\t\t\treturn 0;\n\t\t\t}\n\t\t\telse if (aindex > bindex) {\n\t\t\t\treturn 1;\n\t\t\t}\n\t\t\telse {\n\t\t\t\treturn -1;\n\t\t\t}\n\t\t});\n\n\t\tconst groups: Array<string | number> = [];\n\t\t$array.each(this._tabindexes, (item, index) => {\n\t\t\tif (!item.getPrivate(\"focusElement\")) {\n\t\t\t\tthis._makeFocusElement(index, item);\n\t\t\t}\n\t\t\telse {\n\t\t\t\tthis._moveFocusElement(index, item);\n\t\t\t}\n\t\t\tconst group = item.get(\"focusableGroup\");\n\t\t\tif (group) {\n\t\t\t\tif (groups.indexOf(group) !== -1) {\n\t\t\t\t\t// Non-first element in the group, make it not directly focusable\n\t\t\t\t\titem.getPrivate(\"focusElement\")!.dom.setAttribute(\"tabindex\", \"-1\");\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tgroups.push(group);\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\n\t}\n\n\tpublic _updateCurrentFocus(): void {\n\t\tif (this._focusedSprite) {\n\t\t\tthis._decorateFocusElement(this._focusedSprite);\n\t\t\tthis._positionFocusElement(this._focusedSprite);\n\t\t}\n\t}\n\n\tpublic _decorateFocusElement(target: Sprite, focusElement?: HTMLDivElement): void {\n\n\t\t// Decorate with proper accessibility attributes\n\t\tif (!focusElement) {\n\t\t\tfocusElement = target.getPrivate(\"focusElement\")!.dom;\n\t\t}\n\n\t\tif (!focusElement) {\n\t\t\treturn;\n\t\t}\n\n\t\tif (target.get(\"visible\") && target.get(\"role\") != \"tooltip\" && !target.isHidden()) {\n\t\t\tif (focusElement.getAttribute(\"tabindex\") != \"-1\") {\n\t\t\t\tfocusElement.setAttribute(\"tabindex\", \"\" + this.tabindex);\n\t\t\t}\n\t\t}\n\t\telse {\n\t\t\tfocusElement.removeAttribute(\"tabindex\")\n\t\t}\n\n\t\tconst role = target.get(\"role\");\n\t\tif (role) {\n\t\t\tfocusElement.setAttribute(\"role\", role);\n\t\t}\n\t\telse {\n\t\t\tfocusElement.removeAttribute(\"role\");\n\t\t}\n\n\t\tconst ariaLabel = target.get(\"ariaLabel\");\n\t\tif (ariaLabel) {\n\t\t\tconst label = populateString(target, ariaLabel);\n\t\t\tfocusElement.setAttribute(\"aria-label\", label);\n\t\t}\n\t\telse {\n\t\t\tfocusElement.removeAttribute(\"aria-label\");\n\t\t}\n\n\t\tconst ariaLive = target.get(\"ariaLive\");\n\t\tif (ariaLive) {\n\t\t\tfocusElement.setAttribute(\"aria-live\", ariaLive);\n\t\t}\n\t\telse {\n\t\t\tfocusElement.removeAttribute(\"aria-live\");\n\t\t}\n\n\t\tconst ariaChecked = target.get(\"ariaChecked\");\n\t\tif (ariaChecked != null) {\n\t\t\tfocusElement.setAttribute(\"aria-checked\", ariaChecked ? \"true\" : \"false\");\n\t\t}\n\t\telse {\n\t\t\tfocusElement.removeAttribute(\"aria-checked\");\n\t\t}\n\n\t\tif (target.get(\"ariaHidden\")) {\n\t\t\tfocusElement.setAttribute(\"aria-hidden\", \"hidden\");\n\t\t}\n\t\telse {\n\t\t\tfocusElement.removeAttribute(\"aria-hidden\");\n\t\t}\n\n\t\tconst ariaOrientation = target.get(\"ariaOrientation\");\n\t\tif (ariaOrientation) {\n\t\t\tfocusElement.setAttribute(\"aria-orientation\", ariaOrientation);\n\t\t}\n\t\telse {\n\t\t\tfocusElement.removeAttribute(\"aria-orientation\");\n\t\t}\n\n\t\tconst ariaValueNow = target.get(\"ariaValueNow\");\n\t\tif (ariaValueNow) {\n\t\t\tfocusElement.setAttribute(\"aria-valuenow\", ariaValueNow);\n\t\t}\n\t\telse {\n\t\t\tfocusElement.removeAttribute(\"aria-valuenow\");\n\t\t}\n\n\t\tconst ariaValueMin = target.get(\"ariaValueMin\");\n\t\tif (ariaValueMin) {\n\t\t\tfocusElement.setAttribute(\"aria-valuemin\", ariaValueMin);\n\t\t}\n\t\telse {\n\t\t\tfocusElement.removeAttribute(\"aria-valuemin\");\n\t\t}\n\n\t\tconst ariaValueMax = target.get(\"ariaValueMax\");\n\t\tif (ariaValueMax) {\n\t\t\tfocusElement.setAttribute(\"aria-valuemax\", ariaValueMax);\n\t\t}\n\t\telse {\n\t\t\tfocusElement.removeAttribute(\"aria-valuemax\");\n\t\t}\n\n\t\tconst ariaValueText = target.get(\"ariaValueText\");\n\t\tif (ariaValueText) {\n\t\t\tfocusElement.setAttribute(\"aria-valuetext\", ariaValueText);\n\t\t}\n\t\telse {\n\t\t\tfocusElement.removeAttribute(\"aria-valuetext\");\n\t\t}\n\n\t\tconst ariaControls = target.get(\"ariaControls\");\n\t\tif (ariaControls) {\n\t\t\tfocusElement.setAttribute(\"aria-controls\", ariaControls);\n\t\t}\n\t\telse {\n\t\t\tfocusElement.removeAttribute(\"aria-controls\");\n\t\t}\n\t}\n\n\tpublic _makeFocusElement(index: number, target: Sprite): void {\n\n\t\tif (target.getPrivate(\"focusElement\")) {\n\t\t\treturn;\n\t\t}\n\n\t\t// Init\n\t\tconst focusElement = document.createElement(\"div\");\n\t\tif (target.get(\"role\") != \"tooltip\") {\n\t\t\tfocusElement.tabIndex = this.tabindex;\n\t\t}\n\t\tfocusElement.style.position = \"absolute\";\n\t\t$utils.setInteractive(focusElement, false);\n\n\t\tconst disposers: Array<IDisposer> = [];\n\n\t\ttarget.setPrivate(\"focusElement\", {\n\t\t\tdom: focusElement,\n\t\t\tdisposers,\n\t\t});\n\n\t\tthis._decorateFocusElement(target);\n\n\t\tdisposers.push($utils.addEventListener(focusElement, \"focus\", (ev: FocusEvent) => {\n\t\t\tthis._handleFocus(ev, index);\n\t\t}));\n\n\t\tdisposers.push($utils.addEventListener(focusElement, \"blur\", (ev: FocusEvent) => {\n\t\t\tthis._handleBlur(ev, index);\n\t\t}));\n\n\t\tthis._moveFocusElement(index, target);\n\n\t}\n\n\tpublic _removeFocusElement(target: Sprite): void {\n\n\t\t// Init\n\t\tconst container = this._focusElementContainer!;\n\t\tconst focusElement = target.getPrivate(\"focusElement\")!;\n\t\tcontainer.removeChild(focusElement.dom);\n\t\t$array.each(focusElement.disposers, (x) => {\n\t\t\tx.dispose();\n\t\t});\n\t}\n\n\tprotected _moveFocusElement(index: number, target: Sprite): void {\n\n\t\t// Get container\n\t\tconst container = this._focusElementContainer!;\n\t\tconst focusElement = target.getPrivate(\"focusElement\")!.dom;\n\n\t\tif (focusElement === this._focusElementContainer!.children[index]) {\n\t\t\t// Nothing to do\n\t\t\treturn;\n\t\t}\n\n\t\tconst next = this._focusElementContainer!.children[index + 1];\n\t\tif (next) {\n\t\t\tcontainer.insertBefore(focusElement, next);\n\t\t}\n\t\telse {\n\t\t\tcontainer.append(focusElement);\n\t\t}\n\t}\n\n\tprotected _positionFocusElement(target: Sprite): void {\n\t\tconst bounds = target.globalBounds();\n\n\t\tconst width = bounds.right == bounds.left ? target.width() : bounds.right - bounds.left;\n\t\tconst height = bounds.top == bounds.bottom ? target.height() : bounds.bottom - bounds.top;\n\n\t\tconst focusElement = target.getPrivate(\"focusElement\")!.dom;\n\t\tfocusElement.style.top = (bounds.top - 2) + \"px\";\n\t\tfocusElement.style.left = (bounds.left - 2) + \"px\";\n\t\tfocusElement.style.width = (width + 4) + \"px\";\n\t\tfocusElement.style.height = (height + 4) + \"px\";\n\n\t}\n\n\tprotected _handleFocus(ev: FocusEvent, index: number): void {\n\t\t// Get element\n\t\tconst focused = this._tabindexes[index];\n\n\t\t// Size and position\n\t\tthis._positionFocusElement(focused);\n\t\t//this._decorateFocusElement(focused);\n\n\t\tthis._focusedSprite = focused;\n\n\t\tif (focused.events.isEnabled(\"focus\")) {\n\t\t\tfocused.events.dispatch(\"focus\", {\n\t\t\t\ttype: \"focus\",\n\t\t\t\toriginalEvent: ev,\n\t\t\t\ttarget: focused\n\t\t\t});\n\t\t}\n\t}\n\n\tprotected _handleBlur(ev: FocusEvent, _index: number): void {\n\t\tconst focused = this._focusedSprite;\n\t\tif (focused && focused.events.isEnabled(\"blur\")) {\n\t\t\tfocused.events.dispatch(\"blur\", {\n\t\t\t\ttype: \"blur\",\n\t\t\t\toriginalEvent: ev,\n\t\t\t\ttarget: focused\n\t\t\t});\n\t\t}\n\t\tthis._focusedSprite = undefined;\n\t}\n\n\t/**\n\t * @ignore\n\t */\n\tpublic updateTooltip(target: Text): void {\n\t\tconst text = target._getText();\n\t\tlet tooltipElement = target.getPrivate(\"tooltipElement\");\n\t\tif (target.get(\"role\") == \"tooltip\" && text != \"\") {\n\t\t\tif (!tooltipElement) {\n\t\t\t\ttooltipElement = this._makeTooltipElement(target);\n\t\t\t}\n\t\t\tif (tooltipElement.innerHTML != text) {\n\t\t\t\ttooltipElement.innerHTML = text!;\n\t\t\t}\n\t\t}\n\t\telse if (tooltipElement) {\n\t\t\ttooltipElement.remove();\n\t\t\ttarget.removePrivate(\"tooltipElement\");\n\t\t}\n\t}\n\n\tpublic _makeTooltipElement(target: Text): HTMLDivElement {\n\t\tconst container = this._tooltipElementContainer!;\n\t\tconst tooltipElement = document.createElement(\"div\");\n\t\ttooltipElement.style.position = \"absolute\";\n\t\ttooltipElement.style.opacity = \"0.0000001\";\n\n\t\t$utils.setInteractive(tooltipElement, false);\n\n\t\tthis._decorateFocusElement(target, tooltipElement);\n\t\tcontainer.append(tooltipElement);\n\t\ttarget.setPrivate(\"tooltipElement\", tooltipElement);\n\t\treturn tooltipElement;\n\t}\n\n\tpublic _invalidateAccessibility(target: Sprite): void {\n\t\tthis._focusElementDirty = true;\n\t\tconst focusElement = target.getPrivate(\"focusElement\");\n\t\tif (target.get(\"focusable\")) {\n\t\t\tif (focusElement) {\n\t\t\t\tthis._decorateFocusElement(target);\n\t\t\t\tthis._positionFocusElement(target);\n\t\t\t}\n\t\t\t// else {\n\t\t\t// \tthis._renderer._makeFocusElement(0, this);\n\t\t\t// }\n\t\t}\n\t\telse if (focusElement) {\n\t\t\tthis._removeFocusElement(target);\n\t\t}\n\t\t//this.updateCurrentFocus();\n\t}\n\n\t/**\n\t * Returns `true` if `target` is currently focused.\n\t *\n\t * @param target Target\n\t * @return Focused?\n\t */\n\tpublic focused(target: Sprite): boolean {\n\t\treturn this._focusedSprite === target;\n\t}\n\n\t/**\n\t * Converts document coordinates to coordinates withing root element.\n\t *\n\t * @param point Document point\n\t * @return Root point\n\t */\n\tpublic documentPointToRoot(point: IPoint): IPoint {\n\t\tconst bbox = this.dom.getBoundingClientRect();\n\t\treturn {\n\t\t\tx: point.x - bbox.left,\n\t\t\ty: point.y - bbox.top\n\t\t};\n\t}\n\n\t/**\n\t * Converts root coordinates to document\n\t *\n\t * @param point Document point\n\t * @return Root point\n\t */\n\tpublic rootPointToDocument(point: IPoint): IPoint {\n\t\tconst bbox = this.dom.getBoundingClientRect();\n\t\treturn {\n\t\t\tx: point.x + bbox.left,\n\t\t\ty: point.y + bbox.top\n\t\t};\n\t}\n\n\t/**\n\t * @ignore\n\t */\n\tpublic addDisposer<T extends IDisposer>(disposer: T): T {\n\t\tthis._disposers.push(disposer);\n\t\treturn disposer;\n\t}\n\n\t/**\n * To all the clever heads out there. Yes, we did not make any attempts to\n * scramble this.\n *\n * This is a part of a tool meant for our users to manage their commercial\n * licenses for removal of amCharts branding from charts.\n *\n * The only legit way to do so is to purchase a commercial license for amCharts:\n * https://www.amcharts.com/online-store/\n *\n * Removing or altering this code, or disabling amCharts branding in any other\n * way is against the license and thus illegal.\n */\n\tprotected _hasLicense(): boolean {\n\t\tfor (let i = 0; i < registry.licenses.length; i++) {\n\t\t\tif (registry.licenses[i].match(/^AM5C.{5,}/i)) {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\t\treturn false;\n\t}\n\n}\n"]}
1
+ {"version":3,"file":"Root.js","sourceRoot":"","sources":["../../../../src/.internal/core/Root.ts"],"names":[],"mappings":"AASA,OAAO,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAC;AAC/C,OAAO,EAAE,gBAAgB,EAAE,MAAM,2BAA2B,CAAC;AAC7D,OAAO,EAAE,cAAc,EAAE,MAAM,yBAAyB,CAAC;AACzD,OAAO,EAAE,UAAU,EAAE,MAAM,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AAI,CAAC,IAAI;gBACtB,CAAC,EAAE,KAAK,CAAC,CAAC,GAAG,IAAI,CAAC,GAAG;aACrB,CAAC;QACH,CAAC;;IAED;;;;;OAKG;;;;;eACH,UAA2B,KAAa;YACvC,IAAM,IAAI,GAAG,IAAI,CAAC,GAAG,CAAC,qBAAqB,EAAE,CAAC;YAC9C,OAAO;gBACN,CAAC,EAAE,KAAK,CAAC,CAAC,GAAG,IAAI,CAAC,IAAI;gBACtB,CAAC,EAAE,KAAK,CAAC,CAAC,GAAG,IAAI,CAAC,GAAG;aACrB,CAAC;QACH,CAAC;;IAED;;OAEG;;;;;eACH,UAAwC,QAAW;YAClD,IAAI,CAAC,UAAU,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;YAC/B,OAAO,QAAQ,CAAC;QACjB,CAAC;;IAED;;;;;;;;;;;;GAYE;;;;;eACF;YACC,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,QAAQ,CAAC,QAAQ,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE;gBAClD,IAAI,QAAQ,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,aAAa,CAAC,EAAE;oBAC9C,OAAO,IAAI,CAAC;iBACZ;aACD;YACD,OAAO,KAAK,CAAC;QACd,CAAC;;IAEF,WAAC;AAAD,CAAC,AA/xCD,IA+xCC","sourcesContent":["import type { IAnimation } from \"./util/Animation\";\nimport type { Entity } from \"./util/Entity\";\nimport type { Sprite } from \"./render/Sprite\";\nimport type { Text } from \"./render/Text\";\nimport type { Theme } from \"./Theme\";\nimport type { IPoint } from \"./util/IPoint\";\nimport type { IRenderer } from \"./render/backend/Renderer\";\nimport type { Timezone } from \"./util/Timezone\";\n\nimport { Container } from \"./render/Container\";\nimport { HorizontalLayout } from \"./render/HorizontalLayout\";\nimport { VerticalLayout } from \"./render/VerticalLayout\";\nimport { GridLayout } from \"./render/GridLayout\";\nimport { IDisposer, Disposer } from \"./util/Disposer\";\nimport { ResizeSensor } from \"./util/ResizeSensor\";\nimport { InterfaceColors } from \"./util/InterfaceColors\";\nimport { Graphics } from \"./render/Graphics\";\nimport { Rectangle } from \"./render/Rectangle\";\nimport { Tooltip } from \"./render/Tooltip\";\nimport { NumberFormatter } from \"./util/NumberFormatter\";\nimport { DateFormatter } from \"./util/DateFormatter\";\nimport { DurationFormatter } from \"./util/DurationFormatter\";\nimport { ILocale, Language } from \"./util/Language\";\nimport { Events, EventDispatcher } from \"./util/EventDispatcher\";\nimport { DefaultTheme } from \"../themes/DefaultTheme\";\nimport { CanvasRenderer } from \"./render/backend/CanvasRenderer\";\nimport { p100, percent } from \"./util/Percent\";\nimport { color } from \"./util/Color\";\nimport { populateString } from \"./util/PopulateString\";\nimport { registry } from \"./Registry\";\n\nimport * as $order from \"./util/Order\";\nimport * as $array from \"./util/Array\";\nimport * as $object from \"./util/Object\";\nimport * as $utils from \"./util/Utils\";\n\n\nimport en from \"../../locales/en\";\n\n\nfunction rAF(fps: number | undefined, callback: (currentTime: number) => void): void {\n\tif (fps == null) {\n\t\trequestAnimationFrame(callback);\n\n\t} else {\n\t\tsetTimeout(() => {\n\t\t\trequestAnimationFrame(callback);\n\t\t}, 1000 / fps);\n\t}\n}\n\n\n/**\n * @ignore\n */\ninterface IParent extends Entity {\n\t_prepareChildren(): void;\n\t_updateChildren(): void;\n}\n\ninterface IBounds extends Entity {\n\tdepth(): number;\n\t_updateBounds(): void;\n}\n\n\nexport interface IRootEvents {\n\tframestarted: {\n\t\ttimestamp: number;\n\t};\n\tframeended: {\n\t\ttimestamp: number;\n\t};\n}\n\n\nexport interface IRootSettings {\n\tuseSafeResolution?: boolean;\n}\n\n\n// TODO implement Disposer\n/**\n * Root element of the chart.\n *\n * @see {@link https://www.amcharts.com/docs/v5/getting-started/#Root_element} for more info\n */\nexport class Root implements IDisposer {\n\n\t/**\n\t * A reference to original chart container (div element).\n\t */\n\tpublic dom: HTMLElement;\n\tpublic _inner: HTMLElement;\n\n\tprotected _isDirty: boolean = false;\n\tprotected _isDirtyParents: boolean = false;\n\tprotected _dirty: { [id: number]: Entity } = {};\n\tprotected _dirtyParents: { [id: number]: IParent } = {};\n\tprotected _dirtyBounds: { [id: number]: IBounds } = {};\n\tprotected _dirtyPositions: { [id: number]: Sprite } = {};\n\n\tprotected _ticker: ((currentTime: number) => void) | null = null;\n\tprotected _tickers: Array<(currentTime: number) => void> = [];\n\n\t/**\n\t * Root's event dispatcher.\n\t *\n\t * @see {@link https://www.amcharts.com/docs/v5/concepts/events/} for more info\n\t */\n\tpublic events: EventDispatcher<Events<this, IRootEvents>> = new EventDispatcher();\n\n\t/**\n\t * @ignore\n\t * @todo needs description\n\t */\n\tpublic animationTime: number | null = null;\n\n\tprivate _animations: Array<IAnimation> = [];\n\n\tpublic _renderer: IRenderer;\n\n\tpublic _rootContainer!: Container;\n\n\t/**\n\t * Main content container.\n\t */\n\tpublic container!: Container;\n\n\t/**\n\t * A [[Container]] used to display tooltips in.\n\t */\n\tpublic tooltipContainer!: Container\n\n\tpublic _tooltip!: Tooltip;\n\n\t// Locale-related\n\n\t/**\n\t * @ignore\n\t */\n\tpublic language: Language = Language.new(this, {});\n\n\t/**\n\t * Locale used by the chart.\n\t *\n\t * @see {@link https://www.amcharts.com/docs/v5/concepts/locales/}\n\t */\n\tpublic locale: ILocale = en;\n\n\t// Date-time related\n\n\t/**\n\t * Use UTC when formatting date/time.\n\t *\n\t * @see {@link https://www.amcharts.com/docs/v5/concepts/formatters/formatting-dates/#UTC_and_time_zones} for more info\n\t */\n\tpublic utc: boolean = false;\n\n\t/**\n\t * If set, will format date/time in specific time zone.\n\t *\n\t * The value should be named time zone, e.g.:\n\t * `\"America/Vancouver\"`, `\"Australia/Sydney\"`, `\"UTC\"`.\n\t *\n\t * @see {@link https://www.amcharts.com/docs/v5/getting-started/root-element/#Time_zone} for more info\n\t * @since 5.1.0\n\t */\n\tpublic timezone?: Timezone;\n\n\t/**\n\t * The maximum FPS that the Root will run at.\n\t *\n\t * If `undefined` it will run at the highest FPS.\n\t *\n\t * @see {@link https://www.amcharts.com/docs/v5/getting-started/root-element/#Performance} for more info\n\t */\n\tpublic fps: number | undefined;\n\n\t/**\n\t * Number formatter.\n\t *\n\t * @see {@link https://www.amcharts.com/docs/v5/concepts/formatters/formatting-numbers/} for more info\n\t */\n\tpublic numberFormatter: NumberFormatter = NumberFormatter.new(this, {});\n\n\t/**\n\t * Date/time formatter.\n\t *\n\t * @see {@link https://www.amcharts.com/docs/v5/concepts/formatters/formatting-dates/} for more info\n\t */\n\tpublic dateFormatter: DateFormatter = DateFormatter.new(this, {});\n\n\t/**\n\t * Duration formatter.\n\t *\n\t * @see {@link https://www.amcharts.com/docs/v5/concepts/formatters/formatting-dates/} for more info\n\t */\n\tpublic durationFormatter: DurationFormatter = DurationFormatter.new(this, {});\n\n\n\t// Accessibility\n\n\t/**\n\t * Global tab index for using for the whole chart\n\t *\n\t * @see {@link https://www.amcharts.com/docs/v5/concepts/accessibility/} for more info\n\t */\n\tpublic tabindex: number = 0;\n\n\t//@todo maybe make this better\n\tprotected _tabindexes: Sprite[] = [];\n\n\tprotected _focusElementDirty: boolean = false;\n\tprotected _focusElementContainer: HTMLDivElement | undefined;\n\tprotected _focusedSprite: Sprite | undefined;\n\tprotected _keyboardDragPoint: IPoint | undefined;\n\tprotected _tooltipElementContainer: HTMLDivElement | undefined;\n\tprotected _readerAlertElement: HTMLDivElement | undefined;\n\n\tpublic _logo?: Container;\n\n\t/**\n\t * Used for dynamically-created CSS and JavaScript with strict source policies.\n\t */\n\tpublic nonce?: string;\n\n\t/**\n\t * Special color set to be used for various controls.\n\t *\n\t * @see {@link https://www.amcharts.com/docs/v5/concepts/colors-gradients-and-patterns/#Interface_colors} for more info\n\t */\n\tpublic interfaceColors: InterfaceColors;\n\n\t/**\n\t * An instance of vertical layout object that can be used to set `layout` setting\n\t * of a [[Container]].\n\t *\n\t * @default VerticalLayout.new()\n\t */\n\tpublic verticalLayout: VerticalLayout = VerticalLayout.new(this, {});\n\n\t/**\n\t * An instance of horizontal layout object that can be used to set `layout` setting\n\t * of a [[Container]].\n\t *\n\t * @default HorizontalLayout.new()\n\t */\n\tpublic horizontalLayout: VerticalLayout = HorizontalLayout.new(this, {});\n\n\t/**\n\t * An instance of grid layout object that can be used to set `layout` setting\n\t * of a [[Container]].\n\t *\n\t * @default VerticalLayout.new()\n\t */\n\tpublic gridLayout: VerticalLayout = GridLayout.new(this, {});\n\n\t/**\n\t * Indicates whether chart should resized automatically when parent container\n\t * width and/or height changes.\n\t *\n\t * If disabled (`autoResize = false`) you can make the chart resize manually\n\t * by calling root element's `resize()` method.\n\t */\n\tpublic autoResize: boolean = true;\n\n\tprotected _isDisposed: boolean = false;\n\tprotected _disposers: Array<IDisposer> = [];\n\n\tprotected _resizeSensorDisposer?: IDisposer;\n\n\tpublic _tooltips: Array<Tooltip> = [];\n\n\tprotected constructor(id: string | HTMLElement, settings: IRootSettings = {}, isReal: boolean) {\n\n\t\tif (!isReal) {\n\t\t\tthrow new Error(\"You cannot use `new Class()`, instead use `Class.new()`\");\n\t\t}\n\n\t\tif (settings.useSafeResolution == null) {\n\t\t\tsettings.useSafeResolution = true;\n\t\t}\n\n\t\tlet resolution;\n\n\t\tif (settings.useSafeResolution) {\n\t\t\tresolution = $utils.getSafeResolution();\n\t\t}\n\n\t\tthis._renderer = new CanvasRenderer(resolution);\n\n\t\tlet dom: HTMLElement | null;\n\n\t\tif (id instanceof HTMLElement) {\n\t\t\tdom = id;\n\t\t}\n\t\telse {\n\t\t\tdom = document.getElementById(id);\n\t\t}\n\n\t\t$array.each(registry.rootElements, (root) => {\n\t\t\tif (root.dom === dom) {\n\t\t\t\tthrow new Error(\"You cannot have multiple Roots on the same DOM node\");\n\t\t\t}\n\t\t});\n\n\t\tthis.interfaceColors = InterfaceColors.new(this, {});\n\n\t\tif (dom === null) {\n\t\t\tthrow new Error(\"Could not find HTML element with id `\" + id + \"`\");\n\t\t}\n\n\t\tthis.dom = dom;\n\n\t\tlet inner: HTMLDivElement = document.createElement(\"div\");\n\t\tinner.style.position = \"relative\";\n\t\tinner.style.height = \"100%\";\n\t\tdom.appendChild(inner);\n\n\t\tthis._inner = inner;\n\n\t\tregistry.rootElements.push(this);\n\t}\n\n\tpublic static new(id: string | HTMLElement, settings?: IRootSettings): Root {\n\t\tconst root = new Root(id, settings, true);\n\t\troot._init();\n\t\treturn root;\n\t}\n\n\tpublic moveDOM(id: string | HTMLElement): void {\n\t\tlet dom: HTMLElement | null;\n\n\t\tif (id instanceof HTMLElement) {\n\t\t\tdom = id;\n\t\t}\n\t\telse {\n\t\t\tdom = document.getElementById(id);\n\t\t}\n\n\t\tif (dom) {\n\t\t\twhile (this.dom.childNodes.length > 0) {\n\t\t\t\tdom.appendChild(this.dom.childNodes[0]);\n\t\t\t}\n\t\t\tthis.dom = dom;\n\t\t\tthis._initResizeSensor();\n\t\t\tthis.resize();\n\t\t}\n\n\t}\n\n\n\tprotected _handleLogo(): void {\n\t\tif (this._logo) {\n\t\t\tconst w = this.dom.offsetWidth;\n\t\t\tconst h = this.dom.offsetHeight;\n\t\t\tif ((w <= 150) || (h <= 60)) {\n\t\t\t\tthis._logo.hide();\n\t\t\t}\n\t\t\telse {\n\t\t\t\tthis._logo.show();\n\t\t\t}\n\t\t}\n\t}\n\n\tpublic _showBranding(): void {\n\t\tif (!this._logo) {\n\t\t\tconst logo = this.tooltipContainer.children.push(Container.new(this, {\n\t\t\t\tinteractive: true,\n\t\t\t\tinteractiveChildren: false,\n\t\t\t\tposition: \"absolute\",\n\t\t\t\tsetStateOnChildren: true,\n\t\t\t\tpaddingTop: 9,\n\t\t\t\tpaddingRight: 9,\n\t\t\t\tpaddingBottom: 9,\n\t\t\t\tpaddingLeft: 9,\n\t\t\t\tscale: .6,\n\t\t\t\ty: percent(100),\n\t\t\t\tcenterY: p100,\n\t\t\t\ttooltipText: \"Created using amCharts 5\",\n\t\t\t\ttooltipX: p100,\n\t\t\t\tcursorOverStyle: \"pointer\",\n\t\t\t\tbackground: Rectangle.new(this, {\n\t\t\t\t\tfill: color(0x474758),\n\t\t\t\t\tfillOpacity: 0,\n\t\t\t\t\ttooltipY: 5\n\t\t\t\t})\n\t\t\t}));\n\n\t\t\tconst tooltip = Tooltip.new(this, {\n\t\t\t\tpointerOrientation: \"horizontal\",\n\t\t\t\tpaddingTop: 4,\n\t\t\t\tpaddingRight: 7,\n\t\t\t\tpaddingBottom: 4,\n\t\t\t\tpaddingLeft: 7\n\t\t\t});\n\t\t\ttooltip.label.setAll({\n\t\t\t\tfontSize: 12\n\t\t\t});\n\t\t\ttooltip.get(\"background\")!.setAll({\n\t\t\t\tfill: this.interfaceColors.get(\"background\"),\n\t\t\t\tstroke: this.interfaceColors.get(\"grid\"),\n\t\t\t\tstrokeOpacity: 0.3\n\t\t\t})\n\t\t\tlogo.set(\"tooltip\", tooltip);\n\n\t\t\tlogo.events.on(\"click\", () => {\n\t\t\t\twindow.open(\"https://www.amcharts.com/\", \"_blank\");\n\t\t\t});\n\n\t\t\tlogo.states.create(\"hover\", {});\n\n\t\t\tconst m = logo.children.push(Graphics.new(this, {\n\t\t\t\tstroke: color(0xcccccc),\n\t\t\t\tstrokeWidth: 3,\n\t\t\t\tsvgPath: \"M5 25 L13 25h13.6c3.4 0 6 0 10.3-4.3s5.2-12 8.6-12c3.4 0 4.3 8.6 7.7 8.6M83.4 25H79.8c-3.4 0-6 0-10.3-4.3s-5.2-12-8.6-12-4.3 8.6-7.7 8.6\"\n\t\t\t}));\n\n\t\t\tm.states.create(\"hover\", { stroke: color(0x3CABFF) });\n\n\t\t\tconst a = logo.children.push(Graphics.new(this, {\n\t\t\t\tstroke: color(0x888888),\n\t\t\t\tstrokeWidth: 3,\n\t\t\t\tsvgPath: \"M83.4 25h-31C37 25 39.5 4.4 28.4 4.4S18.9 24.2 4.3 25H0\"\n\t\t\t}));\n\n\t\t\ta.states.create(\"hover\", { stroke: color(0x474758) });\n\n\t\t\t//logo.set(\"tooltip\", this._tooltip);\n\t\t\t//logo.setPrivate(\"tooltipTarget\", logo.get(\"background\"));\n\t\t\tthis._logo = logo;\n\n\t\t\tthis._handleLogo();\n\t\t}\n\t}\n\n\tprotected _init(): void {\n\t\tconst renderer = this._renderer;\n\t\tconst rootContainer = Container.new(this, { visible: true, width: this.dom.clientWidth, height: this.dom.clientHeight });\n\t\tthis._rootContainer = rootContainer;\n\t\tthis._rootContainer._defaultThemes.push(DefaultTheme.new(this));\n\n\t\tconst container = rootContainer.children.push(Container.new(this, { visible: true, width: p100, height: p100 }));\n\t\tthis.container = container;\n\n\t\trenderer.resize(this.dom.clientWidth, this.dom.clientHeight);\n\n\t\t//@todo: better appendChild - refer\n\t\tthis._inner.appendChild(renderer.view);\n\n\t\t// TODO: TMP TMP TMP for testing only, remove\n\t\t//document.body.appendChild((<any>renderer)._ghostView);\n\n\t\tthis._initResizeSensor();\n\n\t\t// Create element which is used to make announcements to screen reader\n\t\tconst readerAlertElement = document.createElement(\"div\");\n\t\treaderAlertElement.setAttribute(\"role\", \"alert\");\n\t\treaderAlertElement.style.zIndex = \"-100000\";\n\t\treaderAlertElement.style.opacity = \"0\";\n\t\treaderAlertElement.style.position = \"absolute\";\n\t\treaderAlertElement.style.top = \"0\";\n\t\tthis._readerAlertElement = readerAlertElement;\n\t\tthis._inner.appendChild(this._readerAlertElement);\n\n\t\tconst focusElementContainer = document.createElement(\"div\");\n\t\tfocusElementContainer.style.position = \"absolute\";\n\t\tfocusElementContainer.style.pointerEvents = \"none\";\n\t\tfocusElementContainer.style.top = \"0px\";\n\t\tfocusElementContainer.style.left = \"0px\";\n\t\tfocusElementContainer.style.overflow = \"hidden\";\n\t\tfocusElementContainer.style.width = this.dom.clientWidth + \"px\";\n\t\tfocusElementContainer.style.height = this.dom.clientHeight + \"px\";\n\n\t\tfocusElementContainer.setAttribute(\"role\", \"application\");\n\n\t\t$utils.setInteractive(focusElementContainer, false);\n\t\tthis._focusElementContainer = focusElementContainer;\n\t\tthis._inner.appendChild(this._focusElementContainer);\n\n\t\tthis._tooltipElementContainer = document.createElement(\"div\");\n\t\tthis._inner.appendChild(this._tooltipElementContainer);\n\n\t\t// Add keyboard events for accessibility, e.g. simulating drag with arrow\n\t\t// keys and click with ENTER\n\t\tif ($utils.supports(\"keyboardevents\")) {\n\t\t\tthis._disposers.push($utils.addEventListener(focusElementContainer, \"keydown\", (ev: KeyboardEvent) => {\n\t\t\t\tconst focusedSprite = this._focusedSprite;\n\t\t\t\tif (focusedSprite) {\n\t\t\t\t\tif (ev.keyCode == 27) {\n\t\t\t\t\t\t// ESC pressed - lose current focus\n\t\t\t\t\t\t$utils.blur();\n\t\t\t\t\t\tthis._focusedSprite = undefined;\n\t\t\t\t\t}\n\t\t\t\t\tlet dragOffsetX = 0;\n\t\t\t\t\tlet dragOffsetY = 0;\n\t\t\t\t\t// TODO: figure out if using bogus MouseEvent is fine, or it will\n\t\t\t\t\t// fail on some platforms\n\t\t\t\t\tswitch (ev.keyCode) {\n\t\t\t\t\t\tcase 13:\n\t\t\t\t\t\t\tev.preventDefault();\n\t\t\t\t\t\t\tconst downEvent = renderer.getEvent(new MouseEvent(\"click\"));\n\t\t\t\t\t\t\tfocusedSprite.events.dispatch(\"click\", {\n\t\t\t\t\t\t\t\ttype: \"click\",\n\t\t\t\t\t\t\t\toriginalEvent: downEvent.event,\n\t\t\t\t\t\t\t\tpoint: downEvent.point,\n\t\t\t\t\t\t\t\tsimulated: true,\n\t\t\t\t\t\t\t\ttarget: focusedSprite\n\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\tcase 37:\n\t\t\t\t\t\t\tdragOffsetX = -6;\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase 39:\n\t\t\t\t\t\t\tdragOffsetX = 6;\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase 38:\n\t\t\t\t\t\t\tdragOffsetY = -6;\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase 40:\n\t\t\t\t\t\t\tdragOffsetY = 6;\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tdefault:\n\t\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\n\t\t\t\t\tif (dragOffsetX != 0 || dragOffsetY != 0) {\n\t\t\t\t\t\tev.preventDefault();\n\n\t\t\t\t\t\tif (!focusedSprite.isDragging()) {\n\t\t\t\t\t\t\t// Start dragging\n\t\t\t\t\t\t\tthis._keyboardDragPoint = {\n\t\t\t\t\t\t\t\tx: 0,\n\t\t\t\t\t\t\t\ty: 0\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\tconst downEvent = renderer.getEvent(new MouseEvent(\"mousedown\", {\n\t\t\t\t\t\t\t\tclientX: 0,\n\t\t\t\t\t\t\t\tclientY: 0\n\t\t\t\t\t\t\t}));\n\n\t\t\t\t\t\t\tif (focusedSprite.events.isEnabled(\"pointerdown\")) {\n\t\t\t\t\t\t\t\tfocusedSprite.events.dispatch(\"pointerdown\", {\n\t\t\t\t\t\t\t\t\ttype: \"pointerdown\",\n\t\t\t\t\t\t\t\t\toriginalEvent: downEvent.event,\n\t\t\t\t\t\t\t\t\tpoint: downEvent.point,\n\t\t\t\t\t\t\t\t\tsimulated: true,\n\t\t\t\t\t\t\t\t\ttarget: focusedSprite\n\t\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse {\n\t\t\t\t\t\t\t// Move focus marker\n\t\t\t\t\t\t\t//this._positionFocusElement(focusedSprite);\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t// Move incrementally\n\t\t\t\t\t\tconst dragPoint = this._keyboardDragPoint!;\n\t\t\t\t\t\tdragPoint.x += dragOffsetX;\n\t\t\t\t\t\tdragPoint.y += dragOffsetY;\n\t\t\t\t\t\tconst moveEvent = renderer.getEvent(new MouseEvent(\"mousemove\", {\n\t\t\t\t\t\t\tclientX: dragPoint.x,\n\t\t\t\t\t\t\tclientY: dragPoint.y\n\t\t\t\t\t\t}), false);\n\n\t\t\t\t\t\tif (focusedSprite.events.isEnabled(\"globalpointermove\")) {\n\t\t\t\t\t\t\tfocusedSprite.events.dispatch(\"globalpointermove\", {\n\t\t\t\t\t\t\t\ttype: \"globalpointermove\",\n\t\t\t\t\t\t\t\toriginalEvent: moveEvent.event,\n\t\t\t\t\t\t\t\tpoint: moveEvent.point,\n\t\t\t\t\t\t\t\tsimulated: true,\n\t\t\t\t\t\t\t\ttarget: focusedSprite\n\t\t\t\t\t\t\t});\n\t\t\t\t\t\t}\n\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}));\n\n\t\t\tthis._disposers.push($utils.addEventListener(focusElementContainer, \"keyup\", (ev: KeyboardEvent) => {\n\t\t\t\tif (this._focusedSprite) {\n\t\t\t\t\tconst focusedSprite = this._focusedSprite;\n\t\t\t\t\tconst keyCode = ev.keyCode;\n\t\t\t\t\tswitch (keyCode) {\n\t\t\t\t\t\tcase 37:\n\t\t\t\t\t\tcase 39:\n\t\t\t\t\t\tcase 38:\n\t\t\t\t\t\tcase 40:\n\t\t\t\t\t\t\tif (focusedSprite.isDragging()) {\n\t\t\t\t\t\t\t\t// Simulate drag stop\n\t\t\t\t\t\t\t\tconst dragPoint = this._keyboardDragPoint!;\n\t\t\t\t\t\t\t\tconst upEvent = renderer.getEvent(new MouseEvent(\"mouseup\", {\n\t\t\t\t\t\t\t\t\tclientX: dragPoint.x,\n\t\t\t\t\t\t\t\t\tclientY: dragPoint.y\n\t\t\t\t\t\t\t\t}));\n\n\t\t\t\t\t\t\t\tif (focusedSprite.events.isEnabled(\"globalpointerup\")) {\n\t\t\t\t\t\t\t\t\tfocusedSprite.events.dispatch(\"globalpointerup\", {\n\t\t\t\t\t\t\t\t\t\ttype: \"globalpointerup\",\n\t\t\t\t\t\t\t\t\t\toriginalEvent: upEvent.event,\n\t\t\t\t\t\t\t\t\t\tpoint: upEvent.point,\n\t\t\t\t\t\t\t\t\t\tsimulated: true,\n\t\t\t\t\t\t\t\t\t\ttarget: focusedSprite\n\t\t\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t//this._positionFocusElement(focusedSprite);\n\t\t\t\t\t\t\t\tthis._keyboardDragPoint = undefined;\n\t\t\t\t\t\t\t\t// @todo dispatch mouseup event instead of calling dragStop?\n\t\t\t\t\t\t\t\t// this._dispatchEvent(\"globalpointerup\", target, upEvent);\n\t\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\telse if (focusedSprite.get(\"focusableGroup\")) {\n\t\t\t\t\t\t\t\t// Find next item in focusable group\n\t\t\t\t\t\t\t\tconst group = focusedSprite.get(\"focusableGroup\");\n\t\t\t\t\t\t\t\tconst items = this._tabindexes.filter(item => item.get(\"focusableGroup\") == group);\n\t\t\t\t\t\t\t\tlet index = items.indexOf(focusedSprite);\n\t\t\t\t\t\t\t\tconst lastIndex = items.length - 1;\n\t\t\t\t\t\t\t\tindex += (keyCode == 39 || keyCode == 40) ? 1 : -1;\n\t\t\t\t\t\t\t\tif (index < 0) {\n\t\t\t\t\t\t\t\t\tindex = lastIndex;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\telse if (index > lastIndex) {\n\t\t\t\t\t\t\t\t\tindex = 0;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t$utils.focus(items[index].getPrivate(\"focusElement\")!.dom);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}));\n\t\t}\n\n\t\tthis._startTicker();\n\t\tthis.setThemes([]);\n\n\t\tthis._addTooltip();\n\n\t\tif (!this._hasLicense()) {\n\t\t\tthis._showBranding();\n\t\t}\n\t}\n\n\tprivate _initResizeSensor(): void {\n\t\tif (this._resizeSensorDisposer) {\n\t\t\tthis._resizeSensorDisposer.dispose();\n\t\t}\n\t\tthis._resizeSensorDisposer = new ResizeSensor(this.dom, () => {\n\t\t\tif (this.autoResize) {\n\t\t\t\tthis.resize();\n\t\t\t}\n\t\t});\n\t\tthis._disposers.push(this._resizeSensorDisposer);\n\t}\n\n\t/**\n\t * If automatic resizing of char is disabled (`root.autoResize = false`), it\n\t * can be resized manually by calling this method.\n\t */\n\tpublic resize(): void {\n\t\tconst dom = this.dom;\n\t\tconst w = dom.clientWidth;\n\t\tconst h = dom.clientHeight;\n\t\tif (w > 0 && h > 0) {\n\t\t\tconst focusElementContainer = this._focusElementContainer!;\n\n\t\t\tfocusElementContainer.style.width = w + \"px\";\n\t\t\tfocusElementContainer.style.height = h + \"px\";\n\n\t\t\tthis._renderer.resize(w, h);\n\n\t\t\tconst rootContainer = this._rootContainer;\n\n\t\t\trootContainer.setPrivate(\"width\", w);\n\t\t\trootContainer.setPrivate(\"height\", h);\n\t\t\tthis._render();\n\t\t\tthis._handleLogo();\n\t\t}\n\t}\n\n\tprivate _render() {\n\t\tthis._renderer.render(this._rootContainer._display);\n\n\t\tif (this._focusElementDirty) {\n\t\t\tthis._updateCurrentFocus();\n\t\t\tthis._focusElementDirty = false;\n\t\t}\n\t}\n\n\tprivate _runTickers(currentTime: number) {\n\t\t$array.each(this._tickers, (f) => {\n\t\t\tf(currentTime);\n\t\t});\n\t}\n\n\tprivate _runAnimations(currentTime: number) {\n\t\t$array.keepIf(this._animations, (animation) => {\n\t\t\treturn !animation._runAnimation(currentTime);\n\t\t});\n\t}\n\n\tprivate _runDirties() {\n\t\t//console.log(\"tick **************************************************************\");\n\t\tlet allParents: { [id: number]: IParent } = {};\n\n\t\twhile (this._isDirtyParents) {\n\t\t\t// This must be before calling _prepareChildren\n\t\t\tthis._isDirtyParents = false;\n\n\t\t\t$object.keys(this._dirtyParents).forEach((key) => {\n\t\t\t\tconst parent = this._dirtyParents[key];\n\n\t\t\t\tdelete this._dirtyParents[key];\n\n\t\t\t\tif (!parent.isDisposed()) {\n\t\t\t\t\tallParents[parent.uid] = parent;\n\t\t\t\t\tparent._prepareChildren();\n\t\t\t\t}\n\t\t\t});\n\t\t}\n\n\t\t$object.keys(allParents).forEach((key) => {\n\t\t\tallParents[key]._updateChildren();\n\t\t});\n\n\t\tconst objects: Array<Entity> = [];\n\n\t\t//\t\tconsole.log(\"_beforeChanged\")\n\t\t$object.keys(this._dirty).forEach((key) => {\n\t\t\tconst entity = this._dirty[key];\n\n\t\t\tif (entity.isDisposed()) {\n\t\t\t\tdelete this._dirty[entity.uid];\n\n\t\t\t} else {\n\t\t\t\tobjects.push(entity);\n\t\t\t\tentity._beforeChanged();\n\t\t\t}\n\t\t});\n\n\t\t//\t\tconsole.log(\"_changed\")\n\t\tobjects.forEach((entity) => {\n\t\t\tentity._changed();\n\t\t\tdelete this._dirty[entity.uid];\n\t\t\tentity._clearDirty();\n\t\t});\n\n\t\tthis._isDirty = false;\n\n\t\tconst depths: { [id: number]: number } = {};\n\t\tconst bounds: Array<IBounds> = [];\n\n\t\t$object.keys(this._dirtyBounds).forEach((key) => {\n\t\t\tconst entity = this._dirtyBounds[key];\n\n\t\t\tdelete this._dirtyBounds[key];\n\n\t\t\tif (!entity.isDisposed()) {\n\t\t\t\tdepths[entity.uid] = entity.depth();\n\t\t\t\tbounds.push(entity);\n\t\t\t}\n\t\t});\n\n\t\t// High depth -> low depth\n\t\tbounds.sort((x, y) => {\n\t\t\treturn $order.compare(depths[y.uid], depths[x.uid]);\n\t\t});\n\n\t\t//\t\tconsole.log(\"_updateBounds\")\n\t\tbounds.forEach((entity) => {\n\t\t\tentity._updateBounds();\n\t\t});\n\n\t\t//\t\tconsole.log(\"_updatePosition\")\n\t\tconst dirtyPositions = this._dirtyPositions;\n\t\t$object.keys(dirtyPositions).forEach((key) => {\n\t\t\tconst sprite = dirtyPositions[key];\n\n\t\t\tdelete dirtyPositions[key];\n\n\t\t\tif (!sprite.isDisposed()) {\n\t\t\t\tsprite._updatePosition();\n\t\t\t}\n\t\t});\n\n\t\t//\t\tconsole.log(\"_afterChanged\")\n\t\tobjects.forEach((entity) => {\n\t\t\tentity._afterChanged();\n\t\t});\n\n\t}\n\n\tprivate _runTicker(currentTime: number) {\n\t\tif (!this.isDisposed()) {\n\t\t\tthis.animationTime = currentTime;\n\n\t\t\tif (this.events.isEnabled(\"framestarted\")) {\n\t\t\t\tthis.events.dispatch(\"framestarted\", {\n\t\t\t\t\ttype: \"framestarted\",\n\t\t\t\t\ttarget: this,\n\t\t\t\t\ttimestamp: currentTime,\n\t\t\t\t});\n\t\t\t}\n\n\t\t\tthis._runTickers(currentTime);\n\t\t\tthis._runAnimations(currentTime);\n\t\t\tthis._runDirties();\n\t\t\tthis._render();\n\n\t\t\tif (this.events.isEnabled(\"frameended\")) {\n\t\t\t\tthis.events.dispatch(\"frameended\", {\n\t\t\t\t\ttype: \"frameended\",\n\t\t\t\t\ttarget: this,\n\t\t\t\t\ttimestamp: currentTime,\n\t\t\t\t});\n\t\t\t}\n\n\t\t\t// No more work to do\n\t\t\tif (this._tickers.length === 0 &&\n\t\t\t\tthis._animations.length === 0 &&\n\t\t\t\t!this._isDirty) {\n\n\t\t\t\tthis._ticker = null;\n\t\t\t\tthis.animationTime = null;\n\n\t\t\t} else {\n\t\t\t\trAF(this.fps, this._ticker!);\n\t\t\t}\n\t\t}\n\t}\n\n\tprivate _startTicker() {\n\t\tif (this._ticker === null) {\n\t\t\tthis.animationTime = null;\n\n\t\t\tthis._ticker = (currentTime) => {\n\t\t\t\tthis._runTicker(currentTime);\n\t\t\t};\n\n\t\t\trAF(this.fps, this._ticker!);\n\t\t}\n\t}\n\n\tpublic _addDirtyEntity(entity: Entity) {\n\t\tif (this._dirty[entity.uid] === undefined) {\n\t\t\tthis._isDirty = true;\n\t\t\tthis._dirty[entity.uid] = entity;\n\t\t\tthis._startTicker();\n\t\t}\n\t}\n\n\tpublic _addDirtyParent(parent: IParent) {\n\t\tif (this._dirtyParents[parent.uid] === undefined) {\n\t\t\tthis._isDirty = true;\n\t\t\tthis._isDirtyParents = true;\n\t\t\tthis._dirtyParents[parent.uid] = parent;\n\t\t\tthis._startTicker();\n\t\t}\n\t}\n\n\tpublic _addDirtyBounds(entity: IBounds) {\n\t\tif (this._dirtyBounds[entity.uid] === undefined) {\n\t\t\tthis._isDirty = true;\n\t\t\tthis._dirtyBounds[entity.uid] = entity;\n\t\t\tthis._startTicker();\n\t\t}\n\t}\n\n\tpublic _addDirtyPosition(sprite: Sprite) {\n\t\tif (this._dirtyPositions[sprite.uid] === undefined) {\n\t\t\tthis._isDirty = true;\n\t\t\tthis._dirtyPositions[sprite.uid] = sprite;\n\t\t\tthis._startTicker();\n\t\t}\n\t}\n\n\tpublic _addAnimation(animation: IAnimation) {\n\t\t// TODO use numeric id instead\n\t\tif (this._animations.indexOf(animation) === -1) {\n\t\t\tthis._animations.push(animation);\n\t\t\tthis._startTicker();\n\t\t}\n\t}\n\n\tpublic _markDirty(){\n\t\tthis._isDirty = true;\n\t}\n\n\tpublic eachFrame(f: (currentTime: number) => void): IDisposer {\n\t\tthis._tickers.push(f);\n\t\tthis._startTicker();\n\n\t\treturn new Disposer(() => {\n\t\t\t$array.removeFirst(this._tickers, f);\n\t\t});\n\t}\n\n\t/**\n\t * Returns width of the target container, in pixels.\n\t *\n\t * @return Width\n\t */\n\tpublic width(): number {\n\t\treturn this.dom.clientWidth;\n\t}\n\n\t/**\n\t * Returns height of the target container, in pixels.\n\t *\n\t * @return Height\n\t */\n\tpublic height(): number {\n\t\treturn this.dom.clientHeight;\n\t}\n\n\t/**\n\t * Disposes root and all the content in it.\n\t */\n\tpublic dispose(): void {\n\t\tif (!this._isDisposed) {\n\t\t\tthis._isDisposed = true;\n\n\t\t\tthis._rootContainer.dispose();\n\t\t\tthis._renderer.dispose();\n\t\t\tthis.horizontalLayout.dispose();\n\t\t\tthis.verticalLayout.dispose();\n\t\t\tthis.interfaceColors.dispose();\n\n\t\t\t$array.each(this._disposers, (x) => {\n\t\t\t\tx.dispose();\n\t\t\t});\n\n\t\t\tif (this._inner) {\n\t\t\t\t$utils.removeElement(this._inner);\n\t\t\t}\n\n\t\t\t$array.remove(registry.rootElements, this);\n\t\t}\n\t}\n\n\t/**\n\t * Returns `true` if root element is disposed.\n\t *\n\t * @return Disposed?\n\t */\n\tpublic isDisposed(): boolean {\n\t\treturn this._isDisposed;\n\t}\n\n\t/**\n\t * Triggers screen reader read out a message.\n\t *\n\t * @see {@link https://www.amcharts.com/docs/v5/concepts/accessibility/} for more info\n\t * @param text Alert text\n\t */\n\tpublic readerAlert(text: string): void {\n\t\tthis._readerAlertElement!.innerHTML = $utils.stripTags(text);\n\t}\n\n\t/**\n\t * Sets themes to be used for the chart.\n\t *\n\t * @see {@link https://www.amcharts.com/docs/v5/concepts/themes/} for more info\n\t * @param themes A list of themes\n\t */\n\tpublic setThemes(themes: Array<Theme>): void {\n\t\tthis._rootContainer.set(\"themes\", themes);\n\n\t\t// otherwise new themes are not applied\n\t\tconst tooltipContainer = this.tooltipContainer;\n\t\tif (tooltipContainer) {\n\t\t\ttooltipContainer._applyThemes();\n\t\t}\n\n\t\t// @todo review this\n\t\tconst interfaceColors = this.interfaceColors;\n\t\tif (interfaceColors) {\n\t\t\tinterfaceColors._applyThemes();\n\t\t}\n\t}\n\n\tprotected _addTooltip() {\n\t\tif (!this.tooltipContainer) {\n\t\t\tconst tooltipContainer = this._rootContainer.children.push(Container.new(this, { position: \"absolute\", isMeasured: false, width: p100, height: p100, layer: 30 }));\n\t\t\tthis.tooltipContainer = tooltipContainer;\n\n\t\t\tconst tooltip = Tooltip.new(this, {});\n\t\t\tthis.container.set(\"tooltip\", tooltip);\n\t\t\ttooltip.hide(0);\n\t\t\tthis._tooltip = tooltip;\n\t\t}\n\t}\n\n\t/**\n\t * Accesibility\n\t */\n\n\tpublic _registerTabindexOrder(target: Sprite): void {\n\t\tif (target.get(\"focusable\")) {\n\t\t\t$array.pushOne(this._tabindexes, target);\n\t\t}\n\t\telse {\n\t\t\t$array.remove(this._tabindexes, target);\n\t\t}\n\t\tthis._invalidateTabindexes();\n\t}\n\n\tpublic _unregisterTabindexOrder(target: Sprite): void {\n\t\t$array.remove(this._tabindexes, target);\n\t\tthis._invalidateTabindexes();\n\t}\n\n\tpublic _invalidateTabindexes(): void {\n\n\t\tthis._tabindexes.sort((a: Sprite, b: Sprite) => {\n\t\t\tconst aindex = a.get(\"tabindexOrder\", 0);\n\t\t\tconst bindex = b.get(\"tabindexOrder\", 0);\n\t\t\tif (aindex == bindex) {\n\t\t\t\treturn 0;\n\t\t\t}\n\t\t\telse if (aindex > bindex) {\n\t\t\t\treturn 1;\n\t\t\t}\n\t\t\telse {\n\t\t\t\treturn -1;\n\t\t\t}\n\t\t});\n\n\t\tconst groups: Array<string | number> = [];\n\t\t$array.each(this._tabindexes, (item, index) => {\n\t\t\tif (!item.getPrivate(\"focusElement\")) {\n\t\t\t\tthis._makeFocusElement(index, item);\n\t\t\t}\n\t\t\telse {\n\t\t\t\tthis._moveFocusElement(index, item);\n\t\t\t}\n\t\t\tconst group = item.get(\"focusableGroup\");\n\t\t\tif (group) {\n\t\t\t\tif (groups.indexOf(group) !== -1) {\n\t\t\t\t\t// Non-first element in the group, make it not directly focusable\n\t\t\t\t\titem.getPrivate(\"focusElement\")!.dom.setAttribute(\"tabindex\", \"-1\");\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tgroups.push(group);\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\n\t}\n\n\tpublic _updateCurrentFocus(): void {\n\t\tif (this._focusedSprite) {\n\t\t\tthis._decorateFocusElement(this._focusedSprite);\n\t\t\tthis._positionFocusElement(this._focusedSprite);\n\t\t}\n\t}\n\n\tpublic _decorateFocusElement(target: Sprite, focusElement?: HTMLDivElement): void {\n\n\t\t// Decorate with proper accessibility attributes\n\t\tif (!focusElement) {\n\t\t\tfocusElement = target.getPrivate(\"focusElement\")!.dom;\n\t\t}\n\n\t\tif (!focusElement) {\n\t\t\treturn;\n\t\t}\n\n\t\tif (target.get(\"visible\") && target.get(\"role\") != \"tooltip\" && !target.isHidden()) {\n\t\t\tif (focusElement.getAttribute(\"tabindex\") != \"-1\") {\n\t\t\t\tfocusElement.setAttribute(\"tabindex\", \"\" + this.tabindex);\n\t\t\t}\n\t\t}\n\t\telse {\n\t\t\tfocusElement.removeAttribute(\"tabindex\")\n\t\t}\n\n\t\tconst role = target.get(\"role\");\n\t\tif (role) {\n\t\t\tfocusElement.setAttribute(\"role\", role);\n\t\t}\n\t\telse {\n\t\t\tfocusElement.removeAttribute(\"role\");\n\t\t}\n\n\t\tconst ariaLabel = target.get(\"ariaLabel\");\n\t\tif (ariaLabel) {\n\t\t\tconst label = populateString(target, ariaLabel);\n\t\t\tfocusElement.setAttribute(\"aria-label\", label);\n\t\t}\n\t\telse {\n\t\t\tfocusElement.removeAttribute(\"aria-label\");\n\t\t}\n\n\t\tconst ariaLive = target.get(\"ariaLive\");\n\t\tif (ariaLive) {\n\t\t\tfocusElement.setAttribute(\"aria-live\", ariaLive);\n\t\t}\n\t\telse {\n\t\t\tfocusElement.removeAttribute(\"aria-live\");\n\t\t}\n\n\t\tconst ariaChecked = target.get(\"ariaChecked\");\n\t\tif (ariaChecked != null) {\n\t\t\tfocusElement.setAttribute(\"aria-checked\", ariaChecked ? \"true\" : \"false\");\n\t\t}\n\t\telse {\n\t\t\tfocusElement.removeAttribute(\"aria-checked\");\n\t\t}\n\n\t\tif (target.get(\"ariaHidden\")) {\n\t\t\tfocusElement.setAttribute(\"aria-hidden\", \"hidden\");\n\t\t}\n\t\telse {\n\t\t\tfocusElement.removeAttribute(\"aria-hidden\");\n\t\t}\n\n\t\tconst ariaOrientation = target.get(\"ariaOrientation\");\n\t\tif (ariaOrientation) {\n\t\t\tfocusElement.setAttribute(\"aria-orientation\", ariaOrientation);\n\t\t}\n\t\telse {\n\t\t\tfocusElement.removeAttribute(\"aria-orientation\");\n\t\t}\n\n\t\tconst ariaValueNow = target.get(\"ariaValueNow\");\n\t\tif (ariaValueNow) {\n\t\t\tfocusElement.setAttribute(\"aria-valuenow\", ariaValueNow);\n\t\t}\n\t\telse {\n\t\t\tfocusElement.removeAttribute(\"aria-valuenow\");\n\t\t}\n\n\t\tconst ariaValueMin = target.get(\"ariaValueMin\");\n\t\tif (ariaValueMin) {\n\t\t\tfocusElement.setAttribute(\"aria-valuemin\", ariaValueMin);\n\t\t}\n\t\telse {\n\t\t\tfocusElement.removeAttribute(\"aria-valuemin\");\n\t\t}\n\n\t\tconst ariaValueMax = target.get(\"ariaValueMax\");\n\t\tif (ariaValueMax) {\n\t\t\tfocusElement.setAttribute(\"aria-valuemax\", ariaValueMax);\n\t\t}\n\t\telse {\n\t\t\tfocusElement.removeAttribute(\"aria-valuemax\");\n\t\t}\n\n\t\tconst ariaValueText = target.get(\"ariaValueText\");\n\t\tif (ariaValueText) {\n\t\t\tfocusElement.setAttribute(\"aria-valuetext\", ariaValueText);\n\t\t}\n\t\telse {\n\t\t\tfocusElement.removeAttribute(\"aria-valuetext\");\n\t\t}\n\n\t\tconst ariaControls = target.get(\"ariaControls\");\n\t\tif (ariaControls) {\n\t\t\tfocusElement.setAttribute(\"aria-controls\", ariaControls);\n\t\t}\n\t\telse {\n\t\t\tfocusElement.removeAttribute(\"aria-controls\");\n\t\t}\n\t}\n\n\tpublic _makeFocusElement(index: number, target: Sprite): void {\n\n\t\tif (target.getPrivate(\"focusElement\")) {\n\t\t\treturn;\n\t\t}\n\n\t\t// Init\n\t\tconst focusElement = document.createElement(\"div\");\n\t\tif (target.get(\"role\") != \"tooltip\") {\n\t\t\tfocusElement.tabIndex = this.tabindex;\n\t\t}\n\t\tfocusElement.style.position = \"absolute\";\n\t\t$utils.setInteractive(focusElement, false);\n\n\t\tconst disposers: Array<IDisposer> = [];\n\n\t\ttarget.setPrivate(\"focusElement\", {\n\t\t\tdom: focusElement,\n\t\t\tdisposers,\n\t\t});\n\n\t\tthis._decorateFocusElement(target);\n\n\t\tdisposers.push($utils.addEventListener(focusElement, \"focus\", (ev: FocusEvent) => {\n\t\t\tthis._handleFocus(ev, index);\n\t\t}));\n\n\t\tdisposers.push($utils.addEventListener(focusElement, \"blur\", (ev: FocusEvent) => {\n\t\t\tthis._handleBlur(ev, index);\n\t\t}));\n\n\t\tthis._moveFocusElement(index, target);\n\n\t}\n\n\tpublic _removeFocusElement(target: Sprite): void {\n\n\t\t// Init\n\t\tconst container = this._focusElementContainer!;\n\t\tconst focusElement = target.getPrivate(\"focusElement\")!;\n\t\tcontainer.removeChild(focusElement.dom);\n\t\t$array.each(focusElement.disposers, (x) => {\n\t\t\tx.dispose();\n\t\t});\n\t}\n\n\tprotected _moveFocusElement(index: number, target: Sprite): void {\n\n\t\t// Get container\n\t\tconst container = this._focusElementContainer!;\n\t\tconst focusElement = target.getPrivate(\"focusElement\")!.dom;\n\n\t\tif (focusElement === this._focusElementContainer!.children[index]) {\n\t\t\t// Nothing to do\n\t\t\treturn;\n\t\t}\n\n\t\tconst next = this._focusElementContainer!.children[index + 1];\n\t\tif (next) {\n\t\t\tcontainer.insertBefore(focusElement, next);\n\t\t}\n\t\telse {\n\t\t\tcontainer.append(focusElement);\n\t\t}\n\t}\n\n\tprotected _positionFocusElement(target: Sprite): void {\n\t\tconst bounds = target.globalBounds();\n\n\t\tconst width = bounds.right == bounds.left ? target.width() : bounds.right - bounds.left;\n\t\tconst height = bounds.top == bounds.bottom ? target.height() : bounds.bottom - bounds.top;\n\n\t\tconst focusElement = target.getPrivate(\"focusElement\")!.dom;\n\t\tfocusElement.style.top = (bounds.top - 2) + \"px\";\n\t\tfocusElement.style.left = (bounds.left - 2) + \"px\";\n\t\tfocusElement.style.width = (width + 4) + \"px\";\n\t\tfocusElement.style.height = (height + 4) + \"px\";\n\n\t}\n\n\tprotected _handleFocus(ev: FocusEvent, index: number): void {\n\t\t// Get element\n\t\tconst focused = this._tabindexes[index];\n\n\t\t// Size and position\n\t\tthis._positionFocusElement(focused);\n\t\t//this._decorateFocusElement(focused);\n\n\t\tthis._focusedSprite = focused;\n\n\t\tif (focused.events.isEnabled(\"focus\")) {\n\t\t\tfocused.events.dispatch(\"focus\", {\n\t\t\t\ttype: \"focus\",\n\t\t\t\toriginalEvent: ev,\n\t\t\t\ttarget: focused\n\t\t\t});\n\t\t}\n\t}\n\n\tprotected _handleBlur(ev: FocusEvent, _index: number): void {\n\t\tconst focused = this._focusedSprite;\n\t\tif (focused && focused.events.isEnabled(\"blur\")) {\n\t\t\tfocused.events.dispatch(\"blur\", {\n\t\t\t\ttype: \"blur\",\n\t\t\t\toriginalEvent: ev,\n\t\t\t\ttarget: focused\n\t\t\t});\n\t\t}\n\t\tthis._focusedSprite = undefined;\n\t}\n\n\t/**\n\t * @ignore\n\t */\n\tpublic updateTooltip(target: Text): void {\n\t\tconst text = $utils.stripTags(target._getText());\n\t\tlet tooltipElement = target.getPrivate(\"tooltipElement\");\n\t\tif (target.get(\"role\") == \"tooltip\" && text != \"\") {\n\t\t\tif (!tooltipElement) {\n\t\t\t\ttooltipElement = this._makeTooltipElement(target);\n\t\t\t}\n\t\t\tif (tooltipElement.innerHTML != text) {\n\t\t\t\ttooltipElement.innerHTML = text!;\n\t\t\t}\n\t\t}\n\t\telse if (tooltipElement) {\n\t\t\ttooltipElement.remove();\n\t\t\ttarget.removePrivate(\"tooltipElement\");\n\t\t}\n\t}\n\n\tpublic _makeTooltipElement(target: Text): HTMLDivElement {\n\t\tconst container = this._tooltipElementContainer!;\n\t\tconst tooltipElement = document.createElement(\"div\");\n\t\ttooltipElement.style.position = \"absolute\";\n\t\ttooltipElement.style.opacity = \"0.0000001\";\n\n\t\t$utils.setInteractive(tooltipElement, false);\n\n\t\tthis._decorateFocusElement(target, tooltipElement);\n\t\tcontainer.append(tooltipElement);\n\t\ttarget.setPrivate(\"tooltipElement\", tooltipElement);\n\t\treturn tooltipElement;\n\t}\n\n\tpublic _invalidateAccessibility(target: Sprite): void {\n\t\tthis._focusElementDirty = true;\n\t\tconst focusElement = target.getPrivate(\"focusElement\");\n\t\tif (target.get(\"focusable\")) {\n\t\t\tif (focusElement) {\n\t\t\t\tthis._decorateFocusElement(target);\n\t\t\t\tthis._positionFocusElement(target);\n\t\t\t}\n\t\t\t// else {\n\t\t\t// \tthis._renderer._makeFocusElement(0, this);\n\t\t\t// }\n\t\t}\n\t\telse if (focusElement) {\n\t\t\tthis._removeFocusElement(target);\n\t\t}\n\t\t//this.updateCurrentFocus();\n\t}\n\n\t/**\n\t * Returns `true` if `target` is currently focused.\n\t *\n\t * @param target Target\n\t * @return Focused?\n\t */\n\tpublic focused(target: Sprite): boolean {\n\t\treturn this._focusedSprite === target;\n\t}\n\n\t/**\n\t * Converts document coordinates to coordinates withing root element.\n\t *\n\t * @param point Document point\n\t * @return Root point\n\t */\n\tpublic documentPointToRoot(point: IPoint): IPoint {\n\t\tconst bbox = this.dom.getBoundingClientRect();\n\t\treturn {\n\t\t\tx: point.x - bbox.left,\n\t\t\ty: point.y - bbox.top\n\t\t};\n\t}\n\n\t/**\n\t * Converts root coordinates to document\n\t *\n\t * @param point Document point\n\t * @return Root point\n\t */\n\tpublic rootPointToDocument(point: IPoint): IPoint {\n\t\tconst bbox = this.dom.getBoundingClientRect();\n\t\treturn {\n\t\t\tx: point.x + bbox.left,\n\t\t\ty: point.y + bbox.top\n\t\t};\n\t}\n\n\t/**\n\t * @ignore\n\t */\n\tpublic addDisposer<T extends IDisposer>(disposer: T): T {\n\t\tthis._disposers.push(disposer);\n\t\treturn disposer;\n\t}\n\n\t/**\n * To all the clever heads out there. Yes, we did not make any attempts to\n * scramble this.\n *\n * This is a part of a tool meant for our users to manage their commercial\n * licenses for removal of amCharts branding from charts.\n *\n * The only legit way to do so is to purchase a commercial license for amCharts:\n * https://www.amcharts.com/online-store/\n *\n * Removing or altering this code, or disabling amCharts branding in any other\n * way is against the license and thus illegal.\n */\n\tprotected _hasLicense(): boolean {\n\t\tfor (let i = 0; i < registry.licenses.length; i++) {\n\t\t\tif (registry.licenses[i].match(/^AM5C.{5,}/i)) {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\t\treturn false;\n\t}\n\n}\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"GridLayout.d.ts","sourceRoot":"","sources":["../../../../../src/.internal/core/render/GridLayout.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,eAAe,EAAE,cAAc,EAAgB,MAAM,UAAU,CAAC;AAGjF,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAG7C,MAAM,WAAW,mBAAoB,SAAQ,eAAe;IAE3D;;;;OAIG;IACH,cAAc,CAAC,EAAE,OAAO,CAAC;IAEzB;;OAEG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC;CAEpB;AAED,MAAM,WAAW,kBAAmB,SAAQ,cAAc;CACzD;AAED;;;;GAIG;AACH,qBAAa,UAAW,SAAQ,MAAM;IAErC,OAAc,SAAS,EAAE,MAAM,CAAgB;IAC/C,OAAc,UAAU,EAAE,KAAK,CAAC,MAAM,CAAC,CAAoD;IAE5E,SAAS,EAAE,mBAAmB,CAAC;IAC/B,gBAAgB,EAAE,kBAAkB,CAAC;IAGpD,SAAS,CAAC,SAAS;IAKnB;;OAEG;IACI,eAAe,CAAC,SAAS,EAAE,SAAS,GAAG,IAAI;IA8ElD;;OAEG;IACI,eAAe,CAAC,SAAS,EAAE,SAAS,EAAE,WAAW,EAAE,MAAM,EAAE,YAAY,EAAE,MAAM,EAAE,cAAc,EAAE,MAAM,GAAG,MAAM,EAAE;CAwCzH"}
1
+ {"version":3,"file":"GridLayout.d.ts","sourceRoot":"","sources":["../../../../../src/.internal/core/render/GridLayout.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,eAAe,EAAE,cAAc,EAAgB,MAAM,UAAU,CAAC;AAGjF,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAG7C,MAAM,WAAW,mBAAoB,SAAQ,eAAe;IAE3D;;;;OAIG;IACH,cAAc,CAAC,EAAE,OAAO,CAAC;IAEzB;;OAEG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC;CAEpB;AAED,MAAM,WAAW,kBAAmB,SAAQ,cAAc;CACzD;AAED;;;;GAIG;AACH,qBAAa,UAAW,SAAQ,MAAM;IAErC,OAAc,SAAS,EAAE,MAAM,CAAgB;IAC/C,OAAc,UAAU,EAAE,KAAK,CAAC,MAAM,CAAC,CAAoD;IAE5E,SAAS,EAAE,mBAAmB,CAAC;IAC/B,gBAAgB,EAAE,kBAAkB,CAAC;IAGpD,SAAS,CAAC,SAAS;IAKnB;;OAEG;IACI,eAAe,CAAC,SAAS,EAAE,SAAS,GAAG,IAAI;IAgFlD;;OAEG;IACI,eAAe,CAAC,SAAS,EAAE,SAAS,EAAE,WAAW,EAAE,MAAM,EAAE,YAAY,EAAE,MAAM,EAAE,cAAc,EAAE,MAAM,GAAG,MAAM,EAAE;CAwCzH"}
@@ -36,13 +36,15 @@ var GridLayout = /** @class */ (function (_super) {
36
36
  var minCellWidth = availableWidth;
37
37
  var maxCellWidth = 1;
38
38
  eachChildren(container, function (child) {
39
- if (child.get("position") != "absolute") {
40
- var childWidth = child.width();
41
- if (childWidth < minCellWidth) {
42
- minCellWidth = childWidth;
43
- }
44
- if (childWidth > maxCellWidth) {
45
- maxCellWidth = childWidth;
39
+ if (child.get("visible") && child.getPrivate("visible") && !child.get("forceHidden")) {
40
+ if (child.get("position") != "absolute") {
41
+ var childWidth = child.width();
42
+ if (childWidth < minCellWidth) {
43
+ minCellWidth = childWidth;
44
+ }
45
+ if (childWidth > maxCellWidth) {
46
+ maxCellWidth = childWidth;
47
+ }
46
48
  }
47
49
  }
48
50
  });
@@ -64,7 +66,7 @@ var GridLayout = /** @class */ (function (_super) {
64
66
  columnCount = columnWidths.length;
65
67
  var prevX = paddingLeft;
66
68
  eachChildren(container, function (child) {
67
- if (child.get("position") == "relative" && !child.isHidden()) {
69
+ if (child.get("position") == "relative" && child.isVisible()) {
68
70
  var marginTop = child.get("marginTop", 0);
69
71
  var marginBottom = child.get("marginBottom", 0);
70
72
  var bounds = child.adjustedLocalBounds();
@@ -100,7 +102,7 @@ var GridLayout = /** @class */ (function (_super) {
100
102
  var column = 0;
101
103
  eachChildren(container, function (child) {
102
104
  var bounds = child.adjustedLocalBounds();
103
- if (child.get("position") != "absolute" && !child.isHidden()) {
105
+ if (child.get("position") != "absolute" && child.isVisible()) {
104
106
  if (_this.get("fixedWidthGrid")) {
105
107
  columnWidths[column] = maxCellWidth;
106
108
  }
@@ -1 +1 @@
1
- {"version":3,"file":"GridLayout.js","sourceRoot":"","sources":["../../../../../src/.internal/core/render/GridLayout.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,MAAM,EAAmC,YAAY,EAAE,MAAM,UAAU,CAAC;AACjF,OAAO,KAAK,MAAM,MAAM,eAAe,CAAC;AACxC,OAAO,KAAK,KAAK,MAAM,cAAc,CAAC;AAuBtC;;;;GAIG;AACH;IAAgC,8BAAM;IAAtC;;IA0IA,CAAC;;;;;eAjIA;YACC,IAAI,CAAC,cAAc,CAAC,YAAY,EAAE,MAAM,CAAC,SAAS,CAAC,CAAC;YACpD,iBAAM,SAAS,WAAE,CAAC;QACnB,CAAC;;IAED;;OAEG;;;;;eACH,UAAuB,SAAoB;YAC1C,IAAI,WAAW,GAAG,SAAS,CAAC,GAAG,CAAC,aAAa,EAAE,CAAC,CAAC,CAAC;YAClD,IAAI,YAAY,GAAG,SAAS,CAAC,GAAG,CAAC,cAAc,EAAE,CAAC,CAAC,CAAC;YACpD,IAAI,UAAU,GAAG,SAAS,CAAC,GAAG,CAAC,YAAY,EAAE,CAAC,CAAC,CAAC;YAEhD,IAAI,cAAc,GAAG,SAAS,CAAC,QAAQ,EAAE,GAAG,WAAW,GAAG,YAAY,CAAC;YAEvE,IAAI,YAAY,GAAG,cAAc,CAAC;YAClC,IAAI,YAAY,GAAG,CAAC,CAAC;YAErB,YAAY,CAAC,SAAS,EAAE,UAAC,KAAK;gBAC7B,IAAI,KAAK,CAAC,GAAG,CAAC,UAAU,CAAC,IAAI,UAAU,EAAE;oBACxC,IAAI,UAAU,GAAG,KAAK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,CAAC;;IAvID;;;;eAAkC,YAAY;OAAC;IAC/C;;;;eAA0C,MAAM,CAAC,UAAU,CAAC,MAAM,CAAC,CAAC,UAAU,CAAC,SAAS,CAAC,CAAC;OAAC;IAuI5F,iBAAC;CAAA,AA1ID,CAAgC,MAAM,GA0IrC;SA1IY,UAAU","sourcesContent":["import { Layout, ILayoutSettings, ILayoutPrivate, eachChildren } from \"./Layout\";\nimport * as $array from \"../util/Array\";\nimport * as $math from \"../util/Math\";\nimport type { Container } from \"./Container\";\n\n\nexport interface IGridLayoutSettings extends ILayoutSettings {\n\n\t/**\n\t * If set to `true` all columns in the grid will be equal width.\n\t *\n\t * @default false\n\t */\n\tfixedWidthGrid?: boolean;\n\n\t/**\n\t * Maximum number of columns in the grid.\n\t */\n\tmaxColumns?: number;\n\n}\n\nexport interface IGridLayoutPrivate extends ILayoutPrivate {\n}\n\n/**\n * A grid children layout for [[Container]].\n *\n * @see {@link https://www.amcharts.com/docs/v5/concepts/common-elements/containers/#Layout} for more info\n */\nexport class GridLayout extends Layout {\n\n\tpublic static className: string = \"GridLayout\";\n\tpublic static classNames: Array<string> = Layout.classNames.concat([GridLayout.className]);\n\n\tdeclare public _settings: IGridLayoutSettings;\n\tdeclare public _privateSettings: IGridLayoutPrivate;\n\n\n\tprotected _afterNew() {\n\t\tthis._setRawDefault(\"maxColumns\", Number.MAX_VALUE);\n\t\tsuper._afterNew();\n\t}\n\n\t/**\n\t * @ignore\n\t */\n\tpublic updateContainer(container: Container): void {\n\t\tlet paddingLeft = container.get(\"paddingLeft\", 0);\n\t\tlet paddingRight = container.get(\"paddingRight\", 0);\n\t\tlet paddingTop = container.get(\"paddingTop\", 0);\n\n\t\tlet availableWidth = container.maxWidth() - paddingLeft - paddingRight;\n\n\t\tlet minCellWidth = availableWidth;\n\t\tlet maxCellWidth = 1;\n\n\t\teachChildren(container, (child) => {\n\t\t\tif (child.get(\"position\") != \"absolute\") {\n\t\t\t\tlet childWidth = child.width();\n\n\t\t\t\tif (childWidth < minCellWidth) {\n\t\t\t\t\tminCellWidth = childWidth;\n\t\t\t\t}\n\t\t\t\tif (childWidth > maxCellWidth) {\n\t\t\t\t\tmaxCellWidth = childWidth;\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\n\t\tminCellWidth = $math.fitToRange(minCellWidth, 1, availableWidth);\n\t\tmaxCellWidth = $math.fitToRange(maxCellWidth, 1, availableWidth);\n\n\t\tlet columnCount = 1;\n\t\tif (this.get(\"fixedWidthGrid\")) {\n\t\t\tcolumnCount = availableWidth / maxCellWidth;\n\t\t}\n\t\telse {\n\t\t\tcolumnCount = availableWidth / minCellWidth;\n\t\t}\n\n\t\tcolumnCount = Math.max(1, Math.floor(columnCount));\n\t\tcolumnCount = Math.min(this.get(\"maxColumns\", Number.MAX_VALUE), columnCount);\n\n\t\tlet columnWidths = this.getColumnWidths(container, columnCount, maxCellWidth, availableWidth);\n\n\t\tlet prevY = paddingTop;\n\n\t\tlet column = 0;\n\t\tlet maxColumnHeight = 0;\n\n\t\tcolumnCount = columnWidths.length;\n\n\t\tlet prevX = paddingLeft;\n\n\t\teachChildren(container, (child) => {\n\t\t\tif (child.get(\"position\") == \"relative\" && !child.isHidden()) {\n\t\t\t\tconst marginTop = child.get(\"marginTop\", 0);\n\t\t\t\tconst marginBottom = child.get(\"marginBottom\", 0);\n\n\t\t\t\tlet bounds = child.adjustedLocalBounds();\n\n\t\t\t\tlet marginLeft = child.get(\"marginLeft\", 0);\n\t\t\t\tlet marginRight = child.get(\"marginRight\", 0);\n\t\t\t\tlet x = prevX + marginLeft - bounds.left;\n\t\t\t\tlet y = prevY + marginTop - bounds.top;\n\n\t\t\t\tchild.setPrivate(\"x\", x);\n\t\t\t\tchild.setPrivate(\"y\", y);\n\n\t\t\t\tprevX += columnWidths[column] + marginRight;\n\n\t\t\t\tmaxColumnHeight = Math.max(maxColumnHeight, child.height() + marginTop + marginBottom);\n\n\t\t\t\tcolumn++;\n\n\t\t\t\tif (column >= columnCount) {\n\t\t\t\t\tcolumn = 0;\n\t\t\t\t\tprevX = paddingLeft;\n\t\t\t\t\tprevY += maxColumnHeight;\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t}\n\n\t/**\n\t * @ignore\n\t */\n\tpublic getColumnWidths(container: Container, columnCount: number, maxCellWidth: number, availableWidth: number): number[] {\n\t\tlet totalWidth = 0;\n\t\tlet columnWidths: Array<number> = [];\n\t\tlet column = 0;\n\n\t\teachChildren(container, (child) => {\n\t\t\tlet bounds = child.adjustedLocalBounds();\n\t\t\tif (child.get(\"position\") != \"absolute\" && !child.isHidden()) {\n\t\t\t\tif (this.get(\"fixedWidthGrid\")) {\n\t\t\t\t\tcolumnWidths[column] = maxCellWidth;\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tcolumnWidths[column] = Math.max(columnWidths[column] | 0, bounds.right - bounds.left + child.get(\"marginLeft\", 0) + child.get(\"marginRight\", 0));\n\t\t\t\t}\n\n\t\t\t\tif (column < container.children.length - 1) {\n\t\t\t\t\tcolumn++;\n\t\t\t\t\tif (column == columnCount) {\n\t\t\t\t\t\tcolumn = 0;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\n\t\t$array.each(columnWidths, (w) => {\n\t\t\ttotalWidth += w;\n\t\t})\n\n\t\tif (totalWidth > availableWidth) {\n\t\t\tif (columnCount > 2) {\n\t\t\t\tcolumnCount -= 1;\n\t\t\t\treturn this.getColumnWidths(container, columnCount, maxCellWidth, availableWidth);\n\t\t\t}\n\t\t\telse {\n\t\t\t\treturn [availableWidth];\n\t\t\t}\n\t\t}\n\n\t\treturn columnWidths;\n\t}\n}\n"]}
1
+ {"version":3,"file":"GridLayout.js","sourceRoot":"","sources":["../../../../../src/.internal/core/render/GridLayout.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,MAAM,EAAmC,YAAY,EAAE,MAAM,UAAU,CAAC;AACjF,OAAO,KAAK,MAAM,MAAM,eAAe,CAAC;AACxC,OAAO,KAAK,KAAK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AG,YAAY,CAAC;qBACpC;yBACI;wBACJ,YAAY,CAAC,MAAM,CAAC,GAAG,IAAI,CAAC,GAAG,CAAC,YAAY,CAAC,MAAM,CAAC,GAAG,CAAC,EAAE,MAAM,CAAC,KAAK,GAAG,MAAM,CAAC,IAAI,GAAG,KAAK,CAAC,GAAG,CAAC,YAAY,EAAE,CAAC,CAAC,GAAG,KAAK,CAAC,GAAG,CAAC,aAAa,EAAE,CAAC,CAAC,CAAC,CAAC;qBACjJ;oBAED,IAAI,MAAM,GAAG,SAAS,CAAC,QAAQ,CAAC,MAAM,GAAG,CAAC,EAAE;wBAC3C,MAAM,EAAE,CAAC;wBACT,IAAI,MAAM,IAAI,WAAW,EAAE;4BAC1B,MAAM,GAAG,CAAC,CAAC;yBACX;qBACD;iBACD;YACF,CAAC,CAAC,CAAC;YAEH,MAAM,CAAC,IAAI,CAAC,YAAY,EAAE,UAAC,CAAC;gBAC3B,UAAU,IAAI,CAAC,CAAC;YACjB,CAAC,CAAC,CAAA;YAEF,IAAI,UAAU,GAAG,cAAc,EAAE;gBAChC,IAAI,WAAW,GAAG,CAAC,EAAE;oBACpB,WAAW,IAAI,CAAC,CAAC;oBACjB,OAAO,IAAI,CAAC,eAAe,CAAC,SAAS,EAAE,WAAW,EAAE,YAAY,EAAE,cAAc,CAAC,CAAC;iBAClF;qBACI;oBACJ,OAAO,CAAC,cAAc,CAAC,CAAC;iBACxB;aACD;YAED,OAAO,YAAY,CAAC;QACrB,CAAC;;IAzID;;;;eAAkC,YAAY;OAAC;IAC/C;;;;eAA0C,MAAM,CAAC,UAAU,CAAC,MAAM,CAAC,CAAC,UAAU,CAAC,SAAS,CAAC,CAAC;OAAC;IAyI5F,iBAAC;CAAA,AA5ID,CAAgC,MAAM,GA4IrC;SA5IY,UAAU","sourcesContent":["import { Layout, ILayoutSettings, ILayoutPrivate, eachChildren } from \"./Layout\";\nimport * as $array from \"../util/Array\";\nimport * as $math from \"../util/Math\";\nimport type { Container } from \"./Container\";\n\n\nexport interface IGridLayoutSettings extends ILayoutSettings {\n\n\t/**\n\t * If set to `true` all columns in the grid will be equal width.\n\t *\n\t * @default false\n\t */\n\tfixedWidthGrid?: boolean;\n\n\t/**\n\t * Maximum number of columns in the grid.\n\t */\n\tmaxColumns?: number;\n\n}\n\nexport interface IGridLayoutPrivate extends ILayoutPrivate {\n}\n\n/**\n * A grid children layout for [[Container]].\n *\n * @see {@link https://www.amcharts.com/docs/v5/concepts/common-elements/containers/#Layout} for more info\n */\nexport class GridLayout extends Layout {\n\n\tpublic static className: string = \"GridLayout\";\n\tpublic static classNames: Array<string> = Layout.classNames.concat([GridLayout.className]);\n\n\tdeclare public _settings: IGridLayoutSettings;\n\tdeclare public _privateSettings: IGridLayoutPrivate;\n\n\n\tprotected _afterNew() {\n\t\tthis._setRawDefault(\"maxColumns\", Number.MAX_VALUE);\n\t\tsuper._afterNew();\n\t}\n\n\t/**\n\t * @ignore\n\t */\n\tpublic updateContainer(container: Container): void {\n\t\tlet paddingLeft = container.get(\"paddingLeft\", 0);\n\t\tlet paddingRight = container.get(\"paddingRight\", 0);\n\t\tlet paddingTop = container.get(\"paddingTop\", 0);\n\n\t\tlet availableWidth = container.maxWidth() - paddingLeft - paddingRight;\n\n\t\tlet minCellWidth = availableWidth;\n\t\tlet maxCellWidth = 1;\n\n\t\teachChildren(container, (child) => {\n\t\t\tif(child.get(\"visible\") && child.getPrivate(\"visible\") && !child.get(\"forceHidden\")){\n\t\t\t\tif (child.get(\"position\") != \"absolute\") {\n\t\t\t\t\tlet childWidth = child.width();\n\n\t\t\t\t\tif (childWidth < minCellWidth) {\n\t\t\t\t\t\tminCellWidth = childWidth;\n\t\t\t\t\t}\n\t\t\t\t\tif (childWidth > maxCellWidth) {\n\t\t\t\t\t\tmaxCellWidth = childWidth;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\n\t\tminCellWidth = $math.fitToRange(minCellWidth, 1, availableWidth);\n\t\tmaxCellWidth = $math.fitToRange(maxCellWidth, 1, availableWidth);\n\n\t\tlet columnCount = 1;\n\t\tif (this.get(\"fixedWidthGrid\")) {\n\t\t\tcolumnCount = availableWidth / maxCellWidth;\n\t\t}\n\t\telse {\n\t\t\tcolumnCount = availableWidth / minCellWidth;\n\t\t}\n\n\t\tcolumnCount = Math.max(1, Math.floor(columnCount));\n\t\tcolumnCount = Math.min(this.get(\"maxColumns\", Number.MAX_VALUE), columnCount);\n\n\t\tlet columnWidths = this.getColumnWidths(container, columnCount, maxCellWidth, availableWidth);\n\n\t\tlet prevY = paddingTop;\n\n\t\tlet column = 0;\n\t\tlet maxColumnHeight = 0;\n\n\t\tcolumnCount = columnWidths.length;\n\n\t\tlet prevX = paddingLeft;\n\n\t\teachChildren(container, (child) => {\n\t\t\tif (child.get(\"position\") == \"relative\" && child.isVisible()) {\n\t\t\t\tconst marginTop = child.get(\"marginTop\", 0);\n\t\t\t\tconst marginBottom = child.get(\"marginBottom\", 0);\n\n\t\t\t\tlet bounds = child.adjustedLocalBounds();\n\n\t\t\t\tlet marginLeft = child.get(\"marginLeft\", 0);\n\t\t\t\tlet marginRight = child.get(\"marginRight\", 0);\n\t\t\t\tlet x = prevX + marginLeft - bounds.left;\n\t\t\t\tlet y = prevY + marginTop - bounds.top;\n\n\t\t\t\tchild.setPrivate(\"x\", x);\n\t\t\t\tchild.setPrivate(\"y\", y);\n\n\t\t\t\tprevX += columnWidths[column] + marginRight;\n\n\t\t\t\tmaxColumnHeight = Math.max(maxColumnHeight, child.height() + marginTop + marginBottom);\n\n\t\t\t\tcolumn++;\n\n\t\t\t\tif (column >= columnCount) {\n\t\t\t\t\tcolumn = 0;\n\t\t\t\t\tprevX = paddingLeft;\n\t\t\t\t\tprevY += maxColumnHeight;\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t}\n\n\t/**\n\t * @ignore\n\t */\n\tpublic getColumnWidths(container: Container, columnCount: number, maxCellWidth: number, availableWidth: number): number[] {\n\t\tlet totalWidth = 0;\n\t\tlet columnWidths: Array<number> = [];\n\t\tlet column = 0;\n\n\t\teachChildren(container, (child) => {\n\t\t\tlet bounds = child.adjustedLocalBounds();\n\t\t\tif (child.get(\"position\") != \"absolute\" && child.isVisible()) {\n\t\t\t\tif (this.get(\"fixedWidthGrid\")) {\n\t\t\t\t\tcolumnWidths[column] = maxCellWidth;\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tcolumnWidths[column] = Math.max(columnWidths[column] | 0, bounds.right - bounds.left + child.get(\"marginLeft\", 0) + child.get(\"marginRight\", 0));\n\t\t\t\t}\n\n\t\t\t\tif (column < container.children.length - 1) {\n\t\t\t\t\tcolumn++;\n\t\t\t\t\tif (column == columnCount) {\n\t\t\t\t\t\tcolumn = 0;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\n\t\t$array.each(columnWidths, (w) => {\n\t\t\ttotalWidth += w;\n\t\t})\n\n\t\tif (totalWidth > availableWidth) {\n\t\t\tif (columnCount > 2) {\n\t\t\t\tcolumnCount -= 1;\n\t\t\t\treturn this.getColumnWidths(container, columnCount, maxCellWidth, availableWidth);\n\t\t\t}\n\t\t\telse {\n\t\t\t\treturn [availableWidth];\n\t\t\t}\n\t\t}\n\n\t\treturn columnWidths;\n\t}\n}\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"HorizontalLayout.d.ts","sourceRoot":"","sources":["../../../../../src/.internal/core/render/HorizontalLayout.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAgB,MAAM,UAAU,CAAC;AAGhD,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAE7C;;;;GAIG;AACH,qBAAa,gBAAiB,SAAQ,MAAM;IAE3C,OAAc,SAAS,EAAE,MAAM,CAAsB;IACrD,OAAc,UAAU,EAAE,KAAK,CAAC,MAAM,CAAC,CAA0D;IAEjG;;OAEG;IACI,eAAe,CAAC,SAAS,EAAE,SAAS,GAAG,IAAI;CAiElD"}
1
+ {"version":3,"file":"HorizontalLayout.d.ts","sourceRoot":"","sources":["../../../../../src/.internal/core/render/HorizontalLayout.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAgB,MAAM,UAAU,CAAC;AAGhD,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAE7C;;;;GAIG;AACH,qBAAa,gBAAiB,SAAQ,MAAM;IAE3C,OAAc,SAAS,EAAE,MAAM,CAAsB;IACrD,OAAc,UAAU,EAAE,KAAK,CAAC,MAAM,CAAC,CAA0D;IAEjG;;OAEG;IACI,eAAe,CAAC,SAAS,EAAE,SAAS,GAAG,IAAI;CAuElD"}
@@ -24,53 +24,59 @@ var HorizontalLayout = /** @class */ (function (_super) {
24
24
  var availableWidth = container.innerWidth();
25
25
  var totalPercent = 0;
26
26
  eachChildren(container, function (child) {
27
- if (child.get("position") == "relative") {
28
- var childWidth = child.get("width");
29
- if (childWidth instanceof Percent) {
30
- totalPercent += childWidth.value;
31
- var w = availableWidth * childWidth.value;
32
- var minWidth = child.get("minWidth", -Infinity);
33
- if (minWidth > w) {
34
- availableWidth -= minWidth;
35
- totalPercent -= childWidth.value;
36
- }
37
- var maxWidth = child.get("maxWidth", Infinity);
38
- if (w > maxWidth) {
39
- availableWidth -= maxWidth;
40
- totalPercent -= childWidth.value;
27
+ if (child.isVisible()) {
28
+ if (child.get("position") == "relative") {
29
+ var childWidth = child.get("width");
30
+ if (childWidth instanceof Percent) {
31
+ totalPercent += childWidth.value;
32
+ var w = availableWidth * childWidth.value;
33
+ var minWidth = child.get("minWidth", -Infinity);
34
+ if (minWidth > w) {
35
+ availableWidth -= minWidth;
36
+ totalPercent -= childWidth.value;
37
+ }
38
+ var maxWidth = child.get("maxWidth", Infinity);
39
+ if (w > maxWidth) {
40
+ availableWidth -= maxWidth;
41
+ totalPercent -= childWidth.value;
42
+ }
41
43
  }
42
- }
43
- else {
44
- if (!$type.isNumber(childWidth)) {
45
- childWidth = child.width();
44
+ else {
45
+ if (!$type.isNumber(childWidth)) {
46
+ childWidth = child.width();
47
+ }
48
+ availableWidth -= childWidth + child.get("marginLeft", 0) + child.get("marginRight", 0);
46
49
  }
47
- availableWidth -= childWidth + child.get("marginLeft", 0) + child.get("marginRight", 0);
48
50
  }
49
51
  }
50
52
  });
51
53
  if (availableWidth > 0) {
52
54
  eachChildren(container, function (child) {
53
- if (child.get("position") == "relative") {
54
- var childWidth = child.get("width");
55
- if (childWidth instanceof Percent) {
56
- var privateWidth = availableWidth * childWidth.value / totalPercent - child.get("marginLeft", 0) - child.get("marginRight", 0);
57
- var minWidth = child.get("minWidth", -Infinity);
58
- var maxWidth = child.get("maxWidth", Infinity);
59
- privateWidth = Math.min(Math.max(minWidth, privateWidth), maxWidth);
60
- child.setPrivate("width", privateWidth);
55
+ if (child.isVisible()) {
56
+ if (child.get("position") == "relative") {
57
+ var childWidth = child.get("width");
58
+ if (childWidth instanceof Percent) {
59
+ var privateWidth = availableWidth * childWidth.value / totalPercent - child.get("marginLeft", 0) - child.get("marginRight", 0);
60
+ var minWidth = child.get("minWidth", -Infinity);
61
+ var maxWidth = child.get("maxWidth", Infinity);
62
+ privateWidth = Math.min(Math.max(minWidth, privateWidth), maxWidth);
63
+ child.setPrivate("width", privateWidth);
64
+ }
61
65
  }
62
66
  }
63
67
  });
64
68
  }
65
69
  var prevX = paddingLeft;
66
70
  eachChildren(container, function (child) {
67
- if (child.get("position") == "relative") {
68
- var bounds = child.adjustedLocalBounds();
69
- var marginLeft = child.get("marginLeft", 0);
70
- var marginRight = child.get("marginRight", 0);
71
- var x = prevX + marginLeft - bounds.left;
72
- child.setPrivate("x", x);
73
- prevX = x + bounds.right + marginRight;
71
+ if (child.isVisible()) {
72
+ if (child.get("position") == "relative") {
73
+ var bounds = child.adjustedLocalBounds();
74
+ var marginLeft = child.get("marginLeft", 0);
75
+ var marginRight = child.get("marginRight", 0);
76
+ var x = prevX + marginLeft - bounds.left;
77
+ child.setPrivate("x", x);
78
+ prevX = x + bounds.right + marginRight;
79
+ }
74
80
  }
75
81
  });
76
82
  }
@@ -1 +1 @@
1
- {"version":3,"file":"HorizontalLayout.js","sourceRoot":"","sources":["../../../../../src/.internal/core/render/HorizontalLayout.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,MAAM,EAAE,YAAY,EAAE,MAAM,UAAU,CAAC;AAChD,OAAO,KAAK,KAAK,MAAM,cAAc,CAAC;AACtC,OAAO,EAAE,OAAO,EAAE,MAAM,iBAAiB,CAAC;AAG1C;;;;GAIG;AACH;IAAsC,oCAAM;IAA5C;;IAyEA,CAAC;IApEA;;OAEG;;;;;eACH,UAAuB,SAAoB;YAE1C,IAAI,WAAW,GAAG,SAAS,CAAC,GAAG,CAAC,aAAa,EAAE,CAAC,CAAC,CAAC;YAElD,IAAI,cAAc,GAAG,SAAS,CAAC,UAAU,EAAE,CAAC;YAE5C,IAAI,YAAY,GAAG,CAAC,CAAC;YAErB,YAAY,CAAC,SAAS,EAAE,UAAC,KAAK;gBAC7B,IAAI,KAAK,CAAC,GAAG,CAAC,UAAU,CAAC,IAAI,UAAU,EAAE;oBACxC,IAAI,UAAU,GAAG,KAAK,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC;oBACpC,IAAI,UAAU,YAAY,OAAO,EAAE;wBAClC,YAAY,IAAI,UAAU,CAAC,KAAK,CAAC;wBAEjC,IAAI,CAAC,GAAG,cAAc,GAAG,UAAU,CAAC,KAAK,CAAC;wBAC1C,IAAI,QAAQ,GAAG,KAAK,CAAC,GAAG,CAAC,UAAU,EAAE,CAAC,QAAQ,CAAC,CAAC;wBAChD,IAAI,QAAQ,GAAG,CAAC,EAAE;4BACjB,cAAc,IAAI,QAAQ,CAAC;4BAC3B,YAAY,IAAI,UAAU,CAAC,KAAK,CAAC;yBACjC;wBACD,IAAI,QAAQ,GAAG,KAAK,CAAC,GAAG,CAAC,UAAU,EAAE,QAAQ,CAAC,CAAC;wBAC/C,IAAI,CAAC,GAAG,QAAQ,EAAE;4BACjB,cAAc,IAA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CAAC;YAExB,YAAY,CAAC,SAAS,EAAE,UAAC,KAAK;gBAC7B,IAAI,KAAK,CAAC,GAAG,CAAC,UAAU,CAAC,IAAI,UAAU,EAAE;oBACxC,IAAI,MAAM,GAAG,KAAK,CAAC,mBAAmB,EAAE,CAAC;oBACzC,IAAI,UAAU,GAAG,KAAK,CAAC,GAAG,CAAC,YAAY,EAAE,CAAC,CAAC,CAAC;oBAC5C,IAAI,WAAW,GAAG,KAAK,CAAC,GAAG,CAAC,aAAa,EAAE,CAAC,CAAC,CAAC;oBAE9C,IAAI,CAAC,GAAG,KAAK,GAAG,UAAU,GAAG,MAAM,CAAC,IAAI,CAAC;oBACzC,KAAK,CAAC,UAAU,CAAC,GAAG,EAAE,CAAC,CAAC,CAAC;oBACzB,KAAK,GAAG,CAAC,GAAG,MAAM,CAAC,KAAK,GAAG,WAAW,CAAC;iBACvC;YACF,CAAC,CAAC,CAAC;QACJ,CAAC;;IAtED;;;;eAAkC,kBAAkB;OAAC;IACrD;;;;eAA0C,MAAM,CAAC,UAAU,CAAC,MAAM,CAAC,CAAC,gBAAgB,CAAC,SAAS,CAAC,CAAC;OAAC;IAsElG,uBAAC;CAAA,AAzED,CAAsC,MAAM,GAyE3C;SAzEY,gBAAgB","sourcesContent":["import { Layout, eachChildren } from \"./Layout\";\nimport * as $type from \"../util/Type\";\nimport { Percent } from \"../util/Percent\";\nimport type { Container } from \"./Container\";\n\n/**\n * A horizontal children layout for [[Container]].\n *\n * @see {@link https://www.amcharts.com/docs/v5/concepts/common-elements/containers/#Layout} for more info\n */\nexport class HorizontalLayout extends Layout {\n\n\tpublic static className: string = \"HorizontalLayout\";\n\tpublic static classNames: Array<string> = Layout.classNames.concat([HorizontalLayout.className]);\n\n\t/**\n\t * @ignore\n\t */\n\tpublic updateContainer(container: Container): void {\n\n\t\tlet paddingLeft = container.get(\"paddingLeft\", 0);\n\n\t\tlet availableWidth = container.innerWidth();\n\n\t\tlet totalPercent = 0;\n\n\t\teachChildren(container, (child) => {\n\t\t\tif (child.get(\"position\") == \"relative\") {\n\t\t\t\tlet childWidth = child.get(\"width\");\n\t\t\t\tif (childWidth instanceof Percent) {\n\t\t\t\t\ttotalPercent += childWidth.value;\n\n\t\t\t\t\tlet w = availableWidth * childWidth.value;\n\t\t\t\t\tlet minWidth = child.get(\"minWidth\", -Infinity);\n\t\t\t\t\tif (minWidth > w) {\n\t\t\t\t\t\tavailableWidth -= minWidth;\n\t\t\t\t\t\ttotalPercent -= childWidth.value;\n\t\t\t\t\t}\n\t\t\t\t\tlet maxWidth = child.get(\"maxWidth\", Infinity);\n\t\t\t\t\tif (w > maxWidth) {\n\t\t\t\t\t\tavailableWidth -= maxWidth;\n\t\t\t\t\t\ttotalPercent -= childWidth.value;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tif (!$type.isNumber(childWidth)) {\n\t\t\t\t\t\tchildWidth = child.width();\n\t\t\t\t\t}\n\t\t\t\t\tavailableWidth -= childWidth + child.get(\"marginLeft\", 0) + child.get(\"marginRight\", 0);\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\n\t\tif (availableWidth > 0) {\n\t\t\teachChildren(container, (child) => {\n\t\t\t\tif (child.get(\"position\") == \"relative\") {\n\t\t\t\t\tlet childWidth = child.get(\"width\");\n\t\t\t\t\tif (childWidth instanceof Percent) {\n\t\t\t\t\t\tlet privateWidth = availableWidth * childWidth.value / totalPercent - child.get(\"marginLeft\", 0) - child.get(\"marginRight\", 0);\n\t\t\t\t\t\tlet minWidth = child.get(\"minWidth\", -Infinity);\n\t\t\t\t\t\tlet maxWidth = child.get(\"maxWidth\", Infinity);\n\t\t\t\t\t\tprivateWidth = Math.min(Math.max(minWidth, privateWidth), maxWidth);\n\n\t\t\t\t\t\tchild.setPrivate(\"width\", privateWidth);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t});\n\t\t}\n\n\t\tlet prevX = paddingLeft;\n\n\t\teachChildren(container, (child) => {\n\t\t\tif (child.get(\"position\") == \"relative\") {\n\t\t\t\tlet bounds = child.adjustedLocalBounds();\n\t\t\t\tlet marginLeft = child.get(\"marginLeft\", 0);\n\t\t\t\tlet marginRight = child.get(\"marginRight\", 0);\n\n\t\t\t\tlet x = prevX + marginLeft - bounds.left;\n\t\t\t\tchild.setPrivate(\"x\", x);\n\t\t\t\tprevX = x + bounds.right + marginRight;\n\t\t\t}\n\t\t});\n\t}\n}\n"]}
1
+ {"version":3,"file":"HorizontalLayout.js","sourceRoot":"","sources":["../../../../../src/.internal/core/render/HorizontalLayout.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,MAAM,EAAE,YAAY,EAAE,MAAM,UAAU,CAAC;AAChD,OAAO,KAAK,KAAK,MAAM,cAAc,CAAC;AACtC,OAAO,EAAE,OAAO,EAAE,MAAM,iBAAiB,CAAC;AAG1C;;;;GAIG;AACH;IAAsC,oCAAM;IAA5C;;IA+EA,CAAC;IA1EA;;OAEG;;;;;eACH,UAAuB,SAAoB;YAE1C,IAAI,WAAW,GAAG,SAAS,CAAC,GAAG,CAAC,aAAa,EAAE,CAAC,CAAC,CAAC;YAElD,IAAI,cAAc,GAAG,SAAS,CAAC,UAAU,EAAE,CAAC;YAE5C,IAAI,YAAY,GAAG,CAAC,CAAC;YAErB,YAAY,CAAC,SAAS,EAAE,UAAC,KAAK;gBAC7B,IAAG,KAAK,CAAC,SAAS,EAAE,EAAC;oBACpB,IAAI,KAAK,CAAC,GAAG,CAAC,UAAU,CAAC,IAAI,UAAU,EAAE;wBACxC,IAAI,UAAU,GAAG,KAAK,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC;wBACpC,IAAI,UAAU,YAAY,OAAO,EAAE;4BAClC,YAAY,IAAI,UAAU,CAAC,KAAK,CAAC;4BAEjC,IAAI,CAAC,GAAG,cAAc,GAAG,UAAU,CAAC,KAAK,CAAC;4BAC1C,IAAI,QAAQ,GAAG,KAAK,CAAC,GAAG,CAAC,UAAU,EAAE,CAAC,QAAQ,CAAC,C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GAAG,KAAK,CAAC,GAAG,CAAC,UAAU,EAAE,QAAQ,CAAC,CAAC;gCAC/C,YAAY,GAAG,IAAI,CAAC,GAAG,CAAC,IAAI,CAAC,GAAG,CAAC,QAAQ,EAAE,YAAY,CAAC,EAAE,QAAQ,CAAC,CAAC;gCAEpE,KAAK,CAAC,UAAU,CAAC,OAAO,EAAE,YAAY,CAAC,CAAC;6BACxC;yBACD;qBACD;gBACF,CAAC,CAAC,CAAC;aACH;YAED,IAAI,KAAK,GAAG,WAAW,CAAC;YAExB,YAAY,CAAC,SAAS,EAAE,UAAC,KAAK;gBAC7B,IAAG,KAAK,CAAC,SAAS,EAAE,EAAC;oBACpB,IAAI,KAAK,CAAC,GAAG,CAAC,UAAU,CAAC,IAAI,UAAU,EAAE;wBACxC,IAAI,MAAM,GAAG,KAAK,CAAC,mBAAmB,EAAE,CAAC;wBACzC,IAAI,UAAU,GAAG,KAAK,CAAC,GAAG,CAAC,YAAY,EAAE,CAAC,CAAC,CAAC;wBAC5C,IAAI,WAAW,GAAG,KAAK,CAAC,GAAG,CAAC,aAAa,EAAE,CAAC,CAAC,CAAC;wBAE9C,IAAI,CAAC,GAAG,KAAK,GAAG,UAAU,GAAG,MAAM,CAAC,IAAI,CAAC;wBACzC,KAAK,CAAC,UAAU,CAAC,GAAG,EAAE,CAAC,CAAC,CAAC;wBACzB,KAAK,GAAG,CAAC,GAAG,MAAM,CAAC,KAAK,GAAG,WAAW,CAAC;qBACvC;iBACD;YACF,CAAC,CAAC,CAAC;QACJ,CAAC;;IA5ED;;;;eAAkC,kBAAkB;OAAC;IACrD;;;;eAA0C,MAAM,CAAC,UAAU,CAAC,MAAM,CAAC,CAAC,gBAAgB,CAAC,SAAS,CAAC,CAAC;OAAC;IA4ElG,uBAAC;CAAA,AA/ED,CAAsC,MAAM,GA+E3C;SA/EY,gBAAgB","sourcesContent":["import { Layout, eachChildren } from \"./Layout\";\nimport * as $type from \"../util/Type\";\nimport { Percent } from \"../util/Percent\";\nimport type { Container } from \"./Container\";\n\n/**\n * A horizontal children layout for [[Container]].\n *\n * @see {@link https://www.amcharts.com/docs/v5/concepts/common-elements/containers/#Layout} for more info\n */\nexport class HorizontalLayout extends Layout {\n\n\tpublic static className: string = \"HorizontalLayout\";\n\tpublic static classNames: Array<string> = Layout.classNames.concat([HorizontalLayout.className]);\n\n\t/**\n\t * @ignore\n\t */\n\tpublic updateContainer(container: Container): void {\n\n\t\tlet paddingLeft = container.get(\"paddingLeft\", 0);\n\n\t\tlet availableWidth = container.innerWidth();\n\n\t\tlet totalPercent = 0;\n\n\t\teachChildren(container, (child) => {\n\t\t\tif(child.isVisible()){\n\t\t\t\tif (child.get(\"position\") == \"relative\") {\n\t\t\t\t\tlet childWidth = child.get(\"width\");\n\t\t\t\t\tif (childWidth instanceof Percent) {\n\t\t\t\t\t\ttotalPercent += childWidth.value;\n\n\t\t\t\t\t\tlet w = availableWidth * childWidth.value;\n\t\t\t\t\t\tlet minWidth = child.get(\"minWidth\", -Infinity);\n\t\t\t\t\t\tif (minWidth > w) {\n\t\t\t\t\t\t\tavailableWidth -= minWidth;\n\t\t\t\t\t\t\ttotalPercent -= childWidth.value;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tlet maxWidth = child.get(\"maxWidth\", Infinity);\n\t\t\t\t\t\tif (w > maxWidth) {\n\t\t\t\t\t\t\tavailableWidth -= maxWidth;\n\t\t\t\t\t\t\ttotalPercent -= childWidth.value;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\tif (!$type.isNumber(childWidth)) {\n\t\t\t\t\t\t\tchildWidth = child.width();\n\t\t\t\t\t\t}\n\t\t\t\t\t\tavailableWidth -= childWidth + child.get(\"marginLeft\", 0) + child.get(\"marginRight\", 0);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\n\t\tif (availableWidth > 0) {\n\t\t\teachChildren(container, (child) => {\n\t\t\t\tif(child.isVisible()){\n\t\t\t\t\tif (child.get(\"position\") == \"relative\") {\n\t\t\t\t\t\tlet childWidth = child.get(\"width\");\n\t\t\t\t\t\tif (childWidth instanceof Percent) {\n\t\t\t\t\t\t\tlet privateWidth = availableWidth * childWidth.value / totalPercent - child.get(\"marginLeft\", 0) - child.get(\"marginRight\", 0);\n\t\t\t\t\t\t\tlet minWidth = child.get(\"minWidth\", -Infinity);\n\t\t\t\t\t\t\tlet maxWidth = child.get(\"maxWidth\", Infinity);\n\t\t\t\t\t\t\tprivateWidth = Math.min(Math.max(minWidth, privateWidth), maxWidth);\n\n\t\t\t\t\t\t\tchild.setPrivate(\"width\", privateWidth);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t});\n\t\t}\n\n\t\tlet prevX = paddingLeft;\n\n\t\teachChildren(container, (child) => {\n\t\t\tif(child.isVisible()){\n\t\t\t\tif (child.get(\"position\") == \"relative\") {\n\t\t\t\t\tlet bounds = child.adjustedLocalBounds();\n\t\t\t\t\tlet marginLeft = child.get(\"marginLeft\", 0);\n\t\t\t\t\tlet marginRight = child.get(\"marginRight\", 0);\n\n\t\t\t\t\tlet x = prevX + marginLeft - bounds.left;\n\t\t\t\t\tchild.setPrivate(\"x\", x);\n\t\t\t\t\tprevX = x + bounds.right + marginRight;\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t}\n}\n"]}