@octostar/map-component 0.1.14 → 0.1.16
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.cjs +11 -9
- package/dist/index.cjs.map +1 -1
- package/dist/index.mjs +11 -9
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -258,10 +258,6 @@ function DrawingToolbar({
|
|
|
258
258
|
}
|
|
259
259
|
setGoToDialogOpen(false);
|
|
260
260
|
setGoToAddress("");
|
|
261
|
-
toast({
|
|
262
|
-
title: "Location found",
|
|
263
|
-
description: shortName
|
|
264
|
-
});
|
|
265
261
|
} catch (error) {
|
|
266
262
|
toast({
|
|
267
263
|
title: "Search error",
|
|
@@ -5858,6 +5854,8 @@ const MapEditorCanvas = forwardRef(function MapEditorCanvas2({
|
|
|
5858
5854
|
tooltipShowTimeout = null;
|
|
5859
5855
|
}
|
|
5860
5856
|
tooltipEl2.style.display = "none";
|
|
5857
|
+
tooltipEl2.style.minWidth = "";
|
|
5858
|
+
tooltipEl2.style.minHeight = "";
|
|
5861
5859
|
tooltipLngLat = null;
|
|
5862
5860
|
tooltipFeatures = [];
|
|
5863
5861
|
tooltipPageIndex = 0;
|
|
@@ -5870,7 +5868,7 @@ const MapEditorCanvas = forwardRef(function MapEditorCanvas2({
|
|
|
5870
5868
|
if (!isMouseOverPopup) {
|
|
5871
5869
|
hideTooltip2();
|
|
5872
5870
|
}
|
|
5873
|
-
},
|
|
5871
|
+
}, 500);
|
|
5874
5872
|
};
|
|
5875
5873
|
const cancelTooltipHide = () => {
|
|
5876
5874
|
if (tooltipHideTimeout) {
|
|
@@ -5952,6 +5950,10 @@ const MapEditorCanvas = forwardRef(function MapEditorCanvas2({
|
|
|
5952
5950
|
const navHtml = `<div style="display:flex;align-items:center;justify-content:space-between;border-bottom:1px solid #eee;padding:4px 0 6px;margin-bottom:4px;font-size:12px;color:#666;user-select:none"><button data-tooltip-nav="prev" style="${btnBase}border:1px solid ${prevDisabled ? "#eee" : "#ddd"};cursor:${prevDisabled ? "default" : "pointer"};color:${prevDisabled ? "#ccc" : "#444"}"${prevDisabled ? " disabled" : ""}>‹</button><span>${tooltipPageIndex + 1} / ${tooltipFeatures.length}</span><button data-tooltip-nav="next" style="${btnBase}border:1px solid ${nextDisabled ? "#eee" : "#ddd"};cursor:${nextDisabled ? "default" : "pointer"};color:${nextDisabled ? "#ccc" : "#444"}"${nextDisabled ? " disabled" : ""}>›</button></div>`;
|
|
5953
5951
|
html = navHtml + html;
|
|
5954
5952
|
}
|
|
5953
|
+
if (tooltipPageIndex > 0 && tooltipFeatures.length > 1) {
|
|
5954
|
+
tooltipEl2.style.minWidth = tooltipEl2.offsetWidth + "px";
|
|
5955
|
+
tooltipEl2.style.minHeight = tooltipEl2.offsetHeight + "px";
|
|
5956
|
+
}
|
|
5955
5957
|
showTooltip2(tooltipLngLatForPagination, html);
|
|
5956
5958
|
};
|
|
5957
5959
|
customLayers.forEach((layerId) => {
|
|
@@ -5965,10 +5967,10 @@ const MapEditorCanvas = forwardRef(function MapEditorCanvas2({
|
|
|
5965
5967
|
clearTimeout(tooltipHideTimeout);
|
|
5966
5968
|
tooltipHideTimeout = null;
|
|
5967
5969
|
}
|
|
5968
|
-
|
|
5969
|
-
|
|
5970
|
-
|
|
5971
|
-
|
|
5970
|
+
tooltipEl2.style.display = "none";
|
|
5971
|
+
tooltipEl2.style.minWidth = "";
|
|
5972
|
+
tooltipEl2.style.minHeight = "";
|
|
5973
|
+
tooltipLngLat = null;
|
|
5972
5974
|
if (e.features && e.features.length > 0) {
|
|
5973
5975
|
const coordinates = e.lngLat;
|
|
5974
5976
|
tooltipShowTimeout = setTimeout(() => {
|