MapPointPoint.js 1.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667
  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 ScatterSeries = SeriesRegistry.seriesTypes.scatter;
  26. import U from '../../Core/Utilities.js';
  27. var merge = U.merge;
  28. /* *
  29. *
  30. * Class
  31. *
  32. * */
  33. var MapPointPoint = /** @class */ (function (_super) {
  34. __extends(MapPointPoint, _super);
  35. function MapPointPoint() {
  36. /* *
  37. *
  38. * Properties
  39. *
  40. * */
  41. var _this = _super !== null && _super.apply(this, arguments) || this;
  42. _this.options = void 0;
  43. _this.series = void 0;
  44. return _this;
  45. /* eslint-enable valid-jsdoc */
  46. }
  47. /* *
  48. *
  49. * Functions
  50. *
  51. * */
  52. /* eslint-disable valid-jsdoc */
  53. MapPointPoint.prototype.applyOptions = function (options, x) {
  54. var mergedOptions = (typeof options.lat !== 'undefined' &&
  55. typeof options.lon !== 'undefined' ?
  56. merge(options, this.series.chart.fromLatLonToPoint(options)) :
  57. options);
  58. return _super.prototype.applyOptions.call(this, mergedOptions, x);
  59. };
  60. return MapPointPoint;
  61. }(ScatterSeries.prototype.pointClass));
  62. /* *
  63. *
  64. * Default Export
  65. *
  66. * */
  67. export default MapPointPoint;