@antv/l7-component 2.20.13 → 2.20.14

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.
@@ -17,7 +17,7 @@ export default class LayerSwitch extends SelectControl<ILayerSwitchOption> {
17
17
  getLayerVisible(): string[];
18
18
  getLayerOptions(): ControlOptionItem[];
19
19
  setOptions(option: Partial<ILayerSwitchOption>): void;
20
- private handleSingleSelectionMode;
20
+ private handleSingleSelection;
21
21
  onAdd(): HTMLElement;
22
22
  onRemove(): void;
23
23
  protected onLayerChange: () => void;
@@ -143,7 +143,7 @@ var LayerSwitch = /*#__PURE__*/function (_SelectControl) {
143
143
  _get(_getPrototypeOf(LayerSwitch.prototype), "setOptions", this).call(this, option);
144
144
  if (isLayerChange) {
145
145
  if (this.controlOption.multiple === false) {
146
- this.handleSingleSelectionMode();
146
+ this.handleSingleSelection();
147
147
  }
148
148
  this.selectValue = this.getLayerVisible();
149
149
  this.controlOption.options = this.getLayerOptions();
@@ -154,8 +154,8 @@ var LayerSwitch = /*#__PURE__*/function (_SelectControl) {
154
154
  // TODO: 单选模式下,目前默认展示第一项,通过用户提供defaultValue展示默认选项的属性待开发
155
155
  // 如果是单选模式,则只显示第一个图层
156
156
  }, {
157
- key: "handleSingleSelectionMode",
158
- value: function handleSingleSelectionMode() {
157
+ key: "handleSingleSelection",
158
+ value: function handleSingleSelection() {
159
159
  this.layers.forEach(function (layer, index) {
160
160
  index === 0 ? layer.show() : layer.hide();
161
161
  });
@@ -165,7 +165,7 @@ var LayerSwitch = /*#__PURE__*/function (_SelectControl) {
165
165
  value: function onAdd() {
166
166
  var _this$controlOption$o;
167
167
  if (this.controlOption.multiple === false) {
168
- this.handleSingleSelectionMode();
168
+ this.handleSingleSelection();
169
169
  }
170
170
  if (!((_this$controlOption$o = this.controlOption.options) !== null && _this$controlOption$o !== void 0 && _this$controlOption$o.length)) {
171
171
  this.controlOption.options = this.getLayerOptions();
@@ -149,7 +149,7 @@ var LayerSwitch = exports.default = exports.LayerSwitch = /*#__PURE__*/function
149
149
  (0, _get2.default)((0, _getPrototypeOf2.default)(LayerSwitch.prototype), "setOptions", this).call(this, option);
150
150
  if (isLayerChange) {
151
151
  if (this.controlOption.multiple === false) {
152
- this.handleSingleSelectionMode();
152
+ this.handleSingleSelection();
153
153
  }
154
154
  this.selectValue = this.getLayerVisible();
155
155
  this.controlOption.options = this.getLayerOptions();
@@ -160,8 +160,8 @@ var LayerSwitch = exports.default = exports.LayerSwitch = /*#__PURE__*/function
160
160
  // TODO: 单选模式下,目前默认展示第一项,通过用户提供defaultValue展示默认选项的属性待开发
161
161
  // 如果是单选模式,则只显示第一个图层
162
162
  }, {
163
- key: "handleSingleSelectionMode",
164
- value: function handleSingleSelectionMode() {
163
+ key: "handleSingleSelection",
164
+ value: function handleSingleSelection() {
165
165
  this.layers.forEach(function (layer, index) {
166
166
  index === 0 ? layer.show() : layer.hide();
167
167
  });
@@ -171,7 +171,7 @@ var LayerSwitch = exports.default = exports.LayerSwitch = /*#__PURE__*/function
171
171
  value: function onAdd() {
172
172
  var _this$controlOption$o;
173
173
  if (this.controlOption.multiple === false) {
174
- this.handleSingleSelectionMode();
174
+ this.handleSingleSelection();
175
175
  }
176
176
  if (!((_this$controlOption$o = this.controlOption.options) !== null && _this$controlOption$o !== void 0 && _this$controlOption$o.length)) {
177
177
  this.controlOption.options = this.getLayerOptions();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@antv/l7-component",
3
- "version": "2.20.13",
3
+ "version": "2.20.14",
4
4
  "description": "",
5
5
  "main": "lib/index.js",
6
6
  "module": "es/index.js",
@@ -26,8 +26,8 @@
26
26
  "author": "lzxue",
27
27
  "license": "ISC",
28
28
  "dependencies": {
29
- "@antv/l7-core": "2.20.13",
30
- "@antv/l7-utils": "2.20.13",
29
+ "@antv/l7-core": "2.20.14",
30
+ "@antv/l7-utils": "2.20.14",
31
31
  "@babel/runtime": "^7.7.7",
32
32
  "eventemitter3": "^4.0.0",
33
33
  "inversify": "^5.0.1",
@@ -35,12 +35,12 @@
35
35
  "supercluster": "^7.0.0"
36
36
  },
37
37
  "devDependencies": {
38
- "@antv/l7-layers": "2.20.13",
39
- "@antv/l7-test-utils": "2.20.13",
38
+ "@antv/l7-layers": "2.20.14",
39
+ "@antv/l7-test-utils": "2.20.14",
40
40
  "gcoord": "^0.3.2",
41
41
  "less": "^4.1.3"
42
42
  },
43
- "gitHead": "9487cca3bdd14eb2fc81b310e4eae5d30a30496f",
43
+ "gitHead": "ad997ac14616fa503fec4022f1a1a48747524f87",
44
44
  "publishConfig": {
45
45
  "access": "public"
46
46
  }