MapBubblePoint.js 2.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576
  1. /* *
  2. *
  3. * (c) 2010-2021 Torstein Honsi
  4. *
  5. * License: www.highcharts.com/license
  6. *
  7. * !!!!!!! SOURCE GETS TRANSPILED BY TYPESCRIPT. EDIT TS FILE ONLY. !!!!!!!
  8. *
  9. * */
  10. 'use strict';
  11. var __extends = (this && this.__extends) || (function () {
  12. var extendStatics = function (d, b) {
  13. extendStatics = Object.setPrototypeOf ||
  14. ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
  15. function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
  16. return extendStatics(d, b);
  17. };
  18. return function (d, b) {
  19. extendStatics(d, b);
  20. function __() { this.constructor = d; }
  21. d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
  22. };
  23. })();
  24. import SeriesRegistry from '../../Core/Series/SeriesRegistry.js';
  25. var _a = SeriesRegistry.seriesTypes, BubbleSeries = _a.bubble, MapSeries = _a.map;
  26. import U from '../../Core/Utilities.js';
  27. var extend = U.extend, merge = U.merge;
  28. /* *
  29. *
  30. * Class
  31. *
  32. * */
  33. var MapBubblePoint = /** @class */ (function (_super) {
  34. __extends(MapBubblePoint, _super);
  35. function MapBubblePoint() {
  36. return _super !== null && _super.apply(this, arguments) || this;
  37. }
  38. /* *
  39. *
  40. * Functions
  41. *
  42. * */
  43. /* eslint-disable valid-jsdoc */
  44. /**
  45. * @private
  46. */
  47. MapBubblePoint.prototype.applyOptions = function (options, x) {
  48. var point;
  49. if (options &&
  50. typeof options.lat !== 'undefined' &&
  51. typeof options.lon !== 'undefined') {
  52. point = _super.prototype.applyOptions.call(this, merge(options, this.series.chart.fromLatLonToPoint(options)), x);
  53. }
  54. else {
  55. point = MapSeries.prototype.pointClass.prototype
  56. .applyOptions.call(this, options, x);
  57. }
  58. return point;
  59. };
  60. /**
  61. * @private
  62. */
  63. MapBubblePoint.prototype.isValid = function () {
  64. return typeof this.z === 'number';
  65. };
  66. return MapBubblePoint;
  67. }(BubbleSeries.prototype.pointClass));
  68. extend(MapBubblePoint.prototype, {
  69. ttBelow: false
  70. });
  71. /* *
  72. *
  73. * Default Export
  74. *
  75. * */
  76. export default MapBubblePoint;