mapboxgl-tools 1.5.2 → 1.5.3

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.
package/README.md CHANGED
@@ -169,7 +169,7 @@ export default {
169
169
  | Property | Type | 默认值 | Description |
170
170
  | ----- | ------------- | ------------- | ------------------------ |
171
171
  | title | String | 拾取坐标 | 入口按钮title |
172
- | cb | Function | | 复制完成坐标之后的回调 |
172
+ | onCopy | Function | | 复制完成坐标之后的回调 |
173
173
 
174
174
  ```js
175
175
  <template>
package/dist/ui.es.js CHANGED
@@ -21682,6 +21682,8 @@ var control$2 = "";
21682
21682
  const options$2 = {
21683
21683
  title: "\u62FE\u53D6\u5750\u6807",
21684
21684
  cb: () => {
21685
+ },
21686
+ onCopy: () => {
21685
21687
  }
21686
21688
  };
21687
21689
  class PickCoordControl extends KeyboardControl {
@@ -21754,6 +21756,7 @@ class PickCoordControl extends KeyboardControl {
21754
21756
  return;
21755
21757
  copyContent(this.text);
21756
21758
  this.options.cb && this.options.cb(this.text);
21759
+ this.options.onCopy && this.options.onCopy(this.text);
21757
21760
  });
21758
21761
  }
21759
21762
  _renderEntry() {
@@ -21987,7 +21990,6 @@ const SOURCE_WBIOKR_POSCONTROL = "SOURCE_WBIOKR_POSCONTROL";
21987
21990
  const LAYER_WBIOKR_POSCONTROL = "LAYER_WBIOKR_POSCONTROL";
21988
21991
  const options = {
21989
21992
  title: "\u5B9A\u4F4D\u6492\u70B9",
21990
- activeColor: "#f00",
21991
21993
  normalColor: "#000",
21992
21994
  layout: {
21993
21995
  "icon-image": [
@@ -22105,12 +22107,6 @@ class PositionControl extends KeyboardControl {
22105
22107
  throw err;
22106
22108
  this._map.addImage(IMAGE_POSCONTROL_NOR, image, { sdf: false });
22107
22109
  });
22108
- this._map.on("click", (mapEvent) => {
22109
- const feas = this._map.queryRenderedFeatures([mapEvent.point.x, mapEvent.point.y]);
22110
- const targetFea = feas.find((o) => o.source === SOURCE_WBIOKR_POSCONTROL && o.layer.id === LAYER_WBIOKR_POSCONTROL);
22111
- const newIndex = targetFea.properties.index;
22112
- this.current = newIndex;
22113
- });
22114
22110
  return this._container;
22115
22111
  }
22116
22112
  onRemove() {
@@ -22120,8 +22116,11 @@ class PositionControl extends KeyboardControl {
22120
22116
  this._onUnbindKeyboards();
22121
22117
  }
22122
22118
  _eventMeasure() {
22123
- this._map.on("click", (e2) => {
22124
- e2.lngLat;
22119
+ this._map.on("click", (mapEvent) => {
22120
+ const feas = this._map.queryRenderedFeatures([mapEvent.point.x, mapEvent.point.y]);
22121
+ const targetFea = feas.find((o) => o.source === SOURCE_WBIOKR_POSCONTROL && o.layer.id === LAYER_WBIOKR_POSCONTROL);
22122
+ const newIndex = targetFea.properties.index;
22123
+ this.current = newIndex;
22125
22124
  });
22126
22125
  }
22127
22126
  _open() {