raintee-maputils 1.0.43 → 1.0.44
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/dist/index.js +6 -2
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -6757,6 +6757,7 @@ class CustomSearchSelectControl {
|
|
|
6757
6757
|
this.options = {
|
|
6758
6758
|
list: [],
|
|
6759
6759
|
onSelect: () => { },
|
|
6760
|
+
onCancel: () => { },
|
|
6760
6761
|
placeholder: '搜索...',
|
|
6761
6762
|
title: '选择',
|
|
6762
6763
|
showSearch: true,
|
|
@@ -6785,7 +6786,7 @@ class CustomSearchSelectControl {
|
|
|
6785
6786
|
|
|
6786
6787
|
// 创建控件按钮
|
|
6787
6788
|
this._container = document.createElement('div');
|
|
6788
|
-
this._container.className = 'mapboxgl-ctrl vector-layer-ctrl';
|
|
6789
|
+
this._container.className = 'mapboxgl-ctrl mapboxgl-ctrl-group vector-layer-ctrl';
|
|
6789
6790
|
this._container.style.cssText = `
|
|
6790
6791
|
position: relative;
|
|
6791
6792
|
`;
|
|
@@ -6966,7 +6967,10 @@ class CustomSearchSelectControl {
|
|
|
6966
6967
|
transition: all 0.2s;
|
|
6967
6968
|
font-weight: 500;
|
|
6968
6969
|
`;
|
|
6969
|
-
cancelBtn.addEventListener('click', () =>
|
|
6970
|
+
cancelBtn.addEventListener('click', () => {
|
|
6971
|
+
this.closeModal();
|
|
6972
|
+
this.options.onCancel(this._map, null);
|
|
6973
|
+
});
|
|
6970
6974
|
cancelBtn.addEventListener('mouseenter', () => {
|
|
6971
6975
|
cancelBtn.style.backgroundColor = '#f5f7fa';
|
|
6972
6976
|
cancelBtn.style.borderColor = '#c0c4cc';
|