@antv/l7-component 2.9.36-alpha.1 → 2.9.37

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 (110) hide show
  1. package/es/control/BaseControl.d.ts +27 -0
  2. package/es/control/BaseControl.js +134 -0
  3. package/es/control/layer.d.ts +38 -0
  4. package/es/control/layer.js +340 -0
  5. package/es/control/logo.d.ts +6 -10
  6. package/es/control/logo.js +11 -41
  7. package/es/control/scale.d.ts +10 -20
  8. package/es/control/scale.js +53 -77
  9. package/es/control/zoom.d.ts +10 -21
  10. package/es/control/zoom.js +49 -76
  11. package/es/css/l7.css +502 -0
  12. package/es/images/logo.png +0 -0
  13. package/es/index.d.ts +8 -15
  14. package/es/index.js +9 -15
  15. package/es/interface.d.ts +20 -1
  16. package/es/popup.d.ts +35 -0
  17. package/es/popup.js +300 -0
  18. package/lib/control/BaseControl.js +160 -0
  19. package/lib/control/layer.js +362 -0
  20. package/lib/control/logo.js +23 -50
  21. package/lib/control/scale.js +62 -82
  22. package/lib/control/zoom.js +59 -78
  23. package/lib/css/l7.css +502 -0
  24. package/lib/images/logo.png +0 -0
  25. package/lib/index.js +50 -165
  26. package/lib/popup.js +317 -0
  27. package/package.json +5 -8
  28. package/es/assets/iconfont/iconfont.js +0 -53
  29. package/es/constants/index.d.ts +0 -60
  30. package/es/constants/index.js +0 -60
  31. package/es/control/baseControl/buttonControl.d.ts +0 -59
  32. package/es/control/baseControl/buttonControl.js +0 -191
  33. package/es/control/baseControl/control.d.ts +0 -106
  34. package/es/control/baseControl/control.js +0 -301
  35. package/es/control/baseControl/index.d.ts +0 -4
  36. package/es/control/baseControl/index.js +0 -4
  37. package/es/control/baseControl/popperControl.d.ts +0 -26
  38. package/es/control/baseControl/popperControl.js +0 -131
  39. package/es/control/baseControl/selectControl.d.ts +0 -46
  40. package/es/control/baseControl/selectControl.js +0 -232
  41. package/es/control/exportImage.d.ts +0 -18
  42. package/es/control/exportImage.js +0 -163
  43. package/es/control/fullscreen.d.ts +0 -19
  44. package/es/control/fullscreen.js +0 -151
  45. package/es/control/geoLocate.d.ts +0 -16
  46. package/es/control/geoLocate.js +0 -139
  47. package/es/control/layerControl.d.ts +0 -21
  48. package/es/control/layerControl.js +0 -172
  49. package/es/control/mapTheme.d.ts +0 -10
  50. package/es/control/mapTheme.js +0 -135
  51. package/es/control/mouseLocation.d.ts +0 -15
  52. package/es/control/mouseLocation.js +0 -104
  53. package/es/css/button.less +0 -70
  54. package/es/css/control.less +0 -71
  55. package/es/css/index.css +0 -567
  56. package/es/css/index.less +0 -12
  57. package/es/css/l7.less +0 -60
  58. package/es/css/layerPopup.less +0 -8
  59. package/es/css/logo.less +0 -18
  60. package/es/css/mouseLocation.less +0 -9
  61. package/es/css/popper.less +0 -64
  62. package/es/css/popup.less +0 -169
  63. package/es/css/scale.less +0 -34
  64. package/es/css/select.less +0 -86
  65. package/es/css/variables.less +0 -28
  66. package/es/css/zoom.less +0 -21
  67. package/es/images/quanping.svg +0 -12
  68. package/es/popup/layerPopup.d.ts +0 -78
  69. package/es/popup/layerPopup.js +0 -308
  70. package/es/popup/popup.d.ts +0 -147
  71. package/es/popup/popup.js +0 -636
  72. package/es/utils/icon.d.ts +0 -1
  73. package/es/utils/icon.js +0 -9
  74. package/es/utils/popper.d.ts +0 -75
  75. package/es/utils/popper.js +0 -286
  76. package/es/utils/screenfull.d.ts +0 -2
  77. package/es/utils/screenfull.js +0 -157
  78. package/lib/assets/iconfont/iconfont.js +0 -55
  79. package/lib/constants/index.js +0 -68
  80. package/lib/control/baseControl/buttonControl.js +0 -207
  81. package/lib/control/baseControl/control.js +0 -333
  82. package/lib/control/baseControl/index.js +0 -57
  83. package/lib/control/baseControl/popperControl.js +0 -142
  84. package/lib/control/baseControl/selectControl.js +0 -253
  85. package/lib/control/exportImage.js +0 -177
  86. package/lib/control/fullscreen.js +0 -164
  87. package/lib/control/geoLocate.js +0 -154
  88. package/lib/control/layerControl.js +0 -182
  89. package/lib/control/mapTheme.js +0 -151
  90. package/lib/control/mouseLocation.js +0 -120
  91. package/lib/css/button.less +0 -70
  92. package/lib/css/control.less +0 -71
  93. package/lib/css/index.css +0 -567
  94. package/lib/css/index.less +0 -12
  95. package/lib/css/l7.less +0 -60
  96. package/lib/css/layerPopup.less +0 -8
  97. package/lib/css/logo.less +0 -18
  98. package/lib/css/mouseLocation.less +0 -9
  99. package/lib/css/popper.less +0 -64
  100. package/lib/css/popup.less +0 -169
  101. package/lib/css/scale.less +0 -34
  102. package/lib/css/select.less +0 -86
  103. package/lib/css/variables.less +0 -28
  104. package/lib/css/zoom.less +0 -21
  105. package/lib/images/quanping.svg +0 -12
  106. package/lib/popup/layerPopup.js +0 -317
  107. package/lib/popup/popup.js +0 -651
  108. package/lib/utils/icon.js +0 -18
  109. package/lib/utils/popper.js +0 -297
  110. package/lib/utils/screenfull.js +0 -167
@@ -1,73 +1,56 @@
1
- import _objectSpread from "@babel/runtime/helpers/objectSpread2";
2
1
  import _classCallCheck from "@babel/runtime/helpers/classCallCheck";
3
2
  import _createClass from "@babel/runtime/helpers/createClass";
4
3
  import _assertThisInitialized from "@babel/runtime/helpers/assertThisInitialized";
5
- import _get from "@babel/runtime/helpers/get";
6
4
  import _inherits from "@babel/runtime/helpers/inherits";
7
5
  import _possibleConstructorReturn from "@babel/runtime/helpers/possibleConstructorReturn";
8
6
  import _getPrototypeOf from "@babel/runtime/helpers/getPrototypeOf";
9
- import _defineProperty from "@babel/runtime/helpers/defineProperty";
10
7
 
11
8
  function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
12
9
 
13
10
  function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
14
11
 
15
- import { DOM, lnglatDistance } from '@antv/l7-utils';
16
- import { Control, PositionType } from "./baseControl";
17
- export { Scale };
12
+ import { bindAll, DOM, lnglatDistance } from '@antv/l7-utils';
13
+ import Control, { PositionType } from "./BaseControl";
18
14
 
19
15
  var Scale = /*#__PURE__*/function (_Control) {
20
16
  _inherits(Scale, _Control);
21
17
 
22
18
  var _super = _createSuper(Scale);
23
19
 
24
- function Scale() {
20
+ function Scale(cfg) {
25
21
  var _this;
26
22
 
27
23
  _classCallCheck(this, Scale);
28
24
 
29
- for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
30
- args[_key] = arguments[_key];
31
- }
32
-
33
- _this = _super.call.apply(_super, [this].concat(args));
34
-
35
- _defineProperty(_assertThisInitialized(_this), "update", function () {
36
- var mapsService = _this.mapsService;
37
- var maxWidth = _this.controlOption.maxWidth;
38
- var y = mapsService.getSize()[1] / 2;
39
- var p1 = mapsService.containerToLngLat([0, y]);
40
- var p2 = mapsService.containerToLngLat([maxWidth, y]);
41
- var maxMeters = lnglatDistance([p1.lng, p1.lat], [p2.lng, p2.lat]);
42
-
43
- _this.updateScales(maxMeters);
44
- });
45
-
25
+ _this = _super.call(this, cfg);
26
+ bindAll(['update'], _assertThisInitialized(_this));
46
27
  return _this;
47
28
  }
48
29
 
49
30
  _createClass(Scale, [{
50
31
  key: "getDefault",
51
- value: function getDefault(option) {
52
- return _objectSpread(_objectSpread({}, _get(_getPrototypeOf(Scale.prototype), "getDefault", this).call(this, option)), {}, {
53
- name: 'scale',
32
+ value: function getDefault() {
33
+ return {
54
34
  position: PositionType.BOTTOMLEFT,
55
35
  maxWidth: 100,
56
36
  metric: true,
57
37
  updateWhenIdle: false,
58
38
  imperial: false,
59
- lockWidth: true
60
- });
39
+ name: 'scale'
40
+ };
61
41
  }
62
42
  }, {
63
43
  key: "onAdd",
64
44
  value: function onAdd() {
65
45
  var className = 'l7-control-scale';
66
46
  var container = DOM.create('div', className);
67
- this.resetScaleLines(container);
68
- var updateWhenIdle = this.controlOption.updateWhenIdle;
47
+ this.addScales(className + '-line', container);
48
+ var updateWhenIdle = this.controlOption.updateWhenIdle; // TODO: 高德地图和MapBox地图事件不一致问题
49
+ // 高德zoomchange
50
+
69
51
  this.mapsService.on(updateWhenIdle ? 'moveend' : 'mapmove', this.update);
70
52
  this.mapsService.on(updateWhenIdle ? 'zoomend' : 'zoomchange', this.update);
53
+ this.update();
71
54
  return container;
72
55
  }
73
56
  }, {
@@ -78,13 +61,15 @@ var Scale = /*#__PURE__*/function (_Control) {
78
61
  this.mapsService.off(updateWhenIdle ? 'moveend' : 'mapmove', this.update);
79
62
  }
80
63
  }, {
81
- key: "setOptions",
82
- value: function setOptions(newOption) {
83
- _get(_getPrototypeOf(Scale.prototype), "setOptions", this).call(this, newOption);
84
-
85
- if (this.checkUpdateOption(newOption, ['lockWidth', 'maxWidth', 'metric', 'updateWhenIdle', 'imperial'])) {
86
- this.resetScaleLines(this.container);
87
- }
64
+ key: "update",
65
+ value: function update() {
66
+ var mapsService = this.mapsService;
67
+ var maxWidth = this.controlOption.maxWidth;
68
+ var y = mapsService.getSize()[1] / 2;
69
+ var p1 = mapsService.containerToLngLat([0, y]);
70
+ var p2 = mapsService.containerToLngLat([maxWidth, y]);
71
+ var maxMeters = lnglatDistance([p1.lng, p1.lat], [p2.lng, p2.lat]);
72
+ this.updateScales(maxMeters);
88
73
  }
89
74
  }, {
90
75
  key: "updateScales",
@@ -101,45 +86,6 @@ var Scale = /*#__PURE__*/function (_Control) {
101
86
  this.updateImperial(maxMeters);
102
87
  }
103
88
  }
104
- }, {
105
- key: "resetScaleLines",
106
- value: function resetScaleLines(container) {
107
- DOM.clearChildren(container);
108
- var _this$controlOption2 = this.controlOption,
109
- metric = _this$controlOption2.metric,
110
- imperial = _this$controlOption2.imperial,
111
- maxWidth = _this$controlOption2.maxWidth,
112
- lockWidth = _this$controlOption2.lockWidth;
113
-
114
- if (lockWidth) {
115
- DOM.addStyle(container, "width: ".concat(maxWidth, "px"));
116
- }
117
-
118
- if (metric) {
119
- this.mScale = DOM.create('div', 'l7-control-scale-line', container);
120
- }
121
-
122
- if (imperial) {
123
- this.iScale = DOM.create('div', 'l7-control-scale-line', container);
124
- }
125
-
126
- this.update();
127
- }
128
- }, {
129
- key: "updateScale",
130
- value: function updateScale(scale, text, ratio) {
131
- var maxWidth = this.controlOption.maxWidth;
132
- scale.style.width = Math.round(maxWidth * ratio) + 'px';
133
- scale.innerHTML = text;
134
- }
135
- }, {
136
- key: "getRoundNum",
137
- value: function getRoundNum(num) {
138
- var pow10 = Math.pow(10, (Math.floor(num) + '').length - 1);
139
- var d = num / pow10;
140
- d = d >= 10 ? 10 : d >= 5 ? 5 : d >= 3 ? 3 : d >= 2 ? 2 : 1;
141
- return pow10 * d;
142
- }
143
89
  }, {
144
90
  key: "updateMetric",
145
91
  value: function updateMetric(maxMeters) {
@@ -164,6 +110,36 @@ var Scale = /*#__PURE__*/function (_Control) {
164
110
  this.updateScale(this.iScale, feet + ' ft', feet / maxFeet);
165
111
  }
166
112
  }
113
+ }, {
114
+ key: "updateScale",
115
+ value: function updateScale(scale, text, ratio) {
116
+ var maxWidth = this.controlOption.maxWidth;
117
+ scale.style.width = Math.round(maxWidth * ratio) + 'px';
118
+ scale.innerHTML = text;
119
+ }
120
+ }, {
121
+ key: "getRoundNum",
122
+ value: function getRoundNum(num) {
123
+ var pow10 = Math.pow(10, (Math.floor(num) + '').length - 1);
124
+ var d = num / pow10;
125
+ d = d >= 10 ? 10 : d >= 5 ? 5 : d >= 3 ? 3 : d >= 2 ? 2 : 1;
126
+ return pow10 * d;
127
+ }
128
+ }, {
129
+ key: "addScales",
130
+ value: function addScales(className, container) {
131
+ var _this$controlOption2 = this.controlOption,
132
+ metric = _this$controlOption2.metric,
133
+ imperial = _this$controlOption2.imperial;
134
+
135
+ if (metric) {
136
+ this.mScale = DOM.create('div', className, container);
137
+ }
138
+
139
+ if (imperial) {
140
+ this.iScale = DOM.create('div', className, container);
141
+ }
142
+ }
167
143
  }]);
168
144
 
169
145
  return Scale;
@@ -1,35 +1,24 @@
1
- import { PositionType } from '@antv/l7-core';
2
- import { ELType } from '@antv/l7-utils/src/dom';
3
- import { Control, IControlOption } from './baseControl';
4
- export interface IZoomControlOption extends IControlOption {
5
- zoomInText: ELType | string;
6
- zoomInTitle: string;
7
- zoomOutText: ELType | string;
8
- zoomOutTitle: string;
9
- }
10
- export { Zoom };
11
- export default class Zoom extends Control<IZoomControlOption> {
1
+ import { IZoomControlOption } from '../interface';
2
+ import Control, { PositionType } from './BaseControl';
3
+ export default class Zoom extends Control {
12
4
  private disabled;
13
5
  private zoomInButton;
14
6
  private zoomOutButton;
15
- getDefault(option: Partial<IZoomControlOption>): {
7
+ constructor(cfg?: Partial<IZoomControlOption>);
8
+ getDefault(): {
16
9
  position: PositionType;
17
- name: string;
18
- zoomInText: SVGSVGElement;
10
+ zoomInText: string;
19
11
  zoomInTitle: string;
20
- zoomOutText: SVGSVGElement;
12
+ zoomOutText: string;
21
13
  zoomOutTitle: string;
22
- className?: string | undefined;
23
- style?: string | undefined;
14
+ name: string;
24
15
  };
25
- setOptions(newOptions: Partial<IZoomControlOption>): void;
26
16
  onAdd(): HTMLElement;
27
17
  onRemove(): void;
28
18
  disable(): this;
29
19
  enable(): this;
30
- zoomIn: () => void;
31
- zoomOut: () => void;
32
- private resetButtonGroup;
20
+ private zoomIn;
21
+ private zoomOut;
33
22
  private createButton;
34
23
  private updateDisabled;
35
24
  }
@@ -1,98 +1,54 @@
1
- import _objectSpread from "@babel/runtime/helpers/objectSpread2";
2
1
  import _classCallCheck from "@babel/runtime/helpers/classCallCheck";
3
2
  import _createClass from "@babel/runtime/helpers/createClass";
4
3
  import _assertThisInitialized from "@babel/runtime/helpers/assertThisInitialized";
5
- import _get from "@babel/runtime/helpers/get";
6
4
  import _inherits from "@babel/runtime/helpers/inherits";
7
5
  import _possibleConstructorReturn from "@babel/runtime/helpers/possibleConstructorReturn";
8
6
  import _getPrototypeOf from "@babel/runtime/helpers/getPrototypeOf";
9
- import _defineProperty from "@babel/runtime/helpers/defineProperty";
10
7
 
11
8
  function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
12
9
 
13
10
  function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
14
11
 
15
- import { PositionType } from '@antv/l7-core';
16
- import { DOM } from '@antv/l7-utils';
17
- import { createL7Icon } from "../utils/icon";
18
- import { Control } from "./baseControl";
19
- export { Zoom };
12
+ import { bindAll, DOM } from '@antv/l7-utils';
13
+ import Control, { PositionType } from "./BaseControl";
20
14
 
21
15
  var Zoom = /*#__PURE__*/function (_Control) {
22
16
  _inherits(Zoom, _Control);
23
17
 
24
18
  var _super = _createSuper(Zoom);
25
19
 
26
- function Zoom() {
20
+ function Zoom(cfg) {
27
21
  var _this;
28
22
 
29
23
  _classCallCheck(this, Zoom);
30
24
 
31
- for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
32
- args[_key] = arguments[_key];
33
- }
34
-
35
- _this = _super.call.apply(_super, [this].concat(args));
36
-
37
- _defineProperty(_assertThisInitialized(_this), "zoomIn", function () {
38
- if (!_this.disabled && _this.mapsService.getZoom() < _this.mapsService.getMaxZoom()) {
39
- _this.mapsService.zoomIn();
40
- }
41
- });
42
-
43
- _defineProperty(_assertThisInitialized(_this), "zoomOut", function () {
44
- if (!_this.disabled && _this.mapsService.getZoom() > _this.mapsService.getMinZoom()) {
45
- _this.mapsService.zoomOut();
46
- }
47
- });
48
-
49
- _defineProperty(_assertThisInitialized(_this), "updateDisabled", function () {
50
- var mapsService = _this.mapsService;
51
-
52
- _this.zoomInButton.removeAttribute('disabled');
53
-
54
- _this.zoomOutButton.removeAttribute('disabled');
55
-
56
- if (_this.disabled || mapsService.getZoom() <= mapsService.getMinZoom()) {
57
- _this.zoomOutButton.setAttribute('disabled', 'true');
58
- }
59
-
60
- if (_this.disabled || mapsService.getZoom() >= mapsService.getMaxZoom()) {
61
- _this.zoomInButton.setAttribute('disabled', 'true');
62
- }
63
- });
64
-
25
+ _this = _super.call(this, cfg);
26
+ bindAll(['updateDisabled', 'zoomIn', 'zoomOut'], _assertThisInitialized(_this));
65
27
  return _this;
66
28
  }
67
29
 
68
30
  _createClass(Zoom, [{
69
31
  key: "getDefault",
70
- value: function getDefault(option) {
71
- return _objectSpread(_objectSpread({}, _get(_getPrototypeOf(Zoom.prototype), "getDefault", this).call(this, option)), {}, {
72
- position: PositionType.BOTTOMRIGHT,
73
- name: 'zoom',
74
- zoomInText: createL7Icon('l7-icon-enlarge'),
32
+ value: function getDefault() {
33
+ return {
34
+ position: PositionType.TOPLEFT,
35
+ zoomInText: '+',
75
36
  zoomInTitle: 'Zoom in',
76
- zoomOutText: createL7Icon('l7-icon-narrow'),
77
- zoomOutTitle: 'Zoom out'
78
- });
79
- }
80
- }, {
81
- key: "setOptions",
82
- value: function setOptions(newOptions) {
83
- _get(_getPrototypeOf(Zoom.prototype), "setOptions", this).call(this, newOptions);
84
-
85
- if (this.checkUpdateOption(newOptions, ['zoomInText', 'zoomInTitle', 'zoomOutText', 'zoomOutTitle'])) {
86
- this.resetButtonGroup(this.container);
87
- }
37
+ zoomOutText: '&#x2212;',
38
+ zoomOutTitle: 'Zoom out',
39
+ name: 'zoom'
40
+ };
88
41
  }
89
42
  }, {
90
43
  key: "onAdd",
91
44
  value: function onAdd() {
92
- var container = DOM.create('div', 'l7-control-zoom');
93
- this.resetButtonGroup(container);
45
+ var zoomName = 'l7-control-zoom';
46
+ var container = DOM.create('div', zoomName + ' l7-bar');
47
+ this.zoomInButton = this.createButton(this.controlOption.zoomInText, this.controlOption.zoomInTitle, zoomName + '-in', container, this.zoomIn);
48
+ this.zoomOutButton = this.createButton(this.controlOption.zoomOutText, this.controlOption.zoomOutTitle, zoomName + '-out', container, this.zoomOut);
94
49
  this.mapsService.on('zoomend', this.updateDisabled);
95
50
  this.mapsService.on('zoomchange', this.updateDisabled);
51
+ this.updateDisabled();
96
52
  return container;
97
53
  }
98
54
  }, {
@@ -116,28 +72,45 @@ var Zoom = /*#__PURE__*/function (_Control) {
116
72
  return this;
117
73
  }
118
74
  }, {
119
- key: "resetButtonGroup",
120
- value: function resetButtonGroup(container) {
121
- DOM.clearChildren(container);
122
- this.zoomInButton = this.createButton(this.controlOption.zoomInText, this.controlOption.zoomInTitle, 'l7-button-control', container, this.zoomIn);
123
- this.zoomOutButton = this.createButton(this.controlOption.zoomOutText, this.controlOption.zoomOutTitle, 'l7-button-control', container, this.zoomOut);
124
- this.updateDisabled();
75
+ key: "zoomIn",
76
+ value: function zoomIn() {
77
+ if (!this.disabled && this.mapsService.getZoom() < this.mapsService.getMaxZoom()) {
78
+ this.mapsService.zoomIn();
79
+ }
80
+ }
81
+ }, {
82
+ key: "zoomOut",
83
+ value: function zoomOut() {
84
+ if (!this.disabled && this.mapsService.getZoom() > this.mapsService.getMinZoom()) {
85
+ this.mapsService.zoomOut();
86
+ }
125
87
  }
126
88
  }, {
127
89
  key: "createButton",
128
90
  value: function createButton(html, tile, className, container, fn) {
129
- var link = DOM.create('button', className, container);
130
-
131
- if (typeof html === 'string') {
132
- link.innerHTML = html;
133
- } else {
134
- link.append(html);
135
- }
136
-
91
+ var link = DOM.create('a', className, container);
92
+ link.innerHTML = html;
137
93
  link.title = tile;
94
+ link.href = 'javascript:void(0)';
138
95
  link.addEventListener('click', fn);
139
96
  return link;
140
97
  }
98
+ }, {
99
+ key: "updateDisabled",
100
+ value: function updateDisabled() {
101
+ var mapsService = this.mapsService;
102
+ var className = 'l7-disabled';
103
+ DOM.removeClass(this.zoomInButton, className);
104
+ DOM.removeClass(this.zoomOutButton, className);
105
+
106
+ if (this.disabled || mapsService.getZoom() <= mapsService.getMinZoom()) {
107
+ DOM.addClass(this.zoomOutButton, className);
108
+ }
109
+
110
+ if (this.disabled || mapsService.getZoom() >= mapsService.getMaxZoom()) {
111
+ DOM.addClass(this.zoomInButton, className);
112
+ }
113
+ }
141
114
  }]);
142
115
 
143
116
  return Zoom;