@octostar/map-component 0.1.14 → 0.1.15

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 CHANGED
@@ -5879,6 +5879,8 @@ const MapEditorCanvas = react.forwardRef(function MapEditorCanvas2({
5879
5879
  tooltipShowTimeout = null;
5880
5880
  }
5881
5881
  tooltipEl2.style.display = "none";
5882
+ tooltipEl2.style.minWidth = "";
5883
+ tooltipEl2.style.minHeight = "";
5882
5884
  tooltipLngLat = null;
5883
5885
  tooltipFeatures = [];
5884
5886
  tooltipPageIndex = 0;
@@ -5891,7 +5893,7 @@ const MapEditorCanvas = react.forwardRef(function MapEditorCanvas2({
5891
5893
  if (!isMouseOverPopup) {
5892
5894
  hideTooltip2();
5893
5895
  }
5894
- }, 300);
5896
+ }, 500);
5895
5897
  };
5896
5898
  const cancelTooltipHide = () => {
5897
5899
  if (tooltipHideTimeout) {
@@ -5973,6 +5975,10 @@ const MapEditorCanvas = react.forwardRef(function MapEditorCanvas2({
5973
5975
  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" : ""}>&lsaquo;</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" : ""}>&rsaquo;</button></div>`;
5974
5976
  html = navHtml + html;
5975
5977
  }
5978
+ if (tooltipPageIndex > 0 && tooltipFeatures.length > 1) {
5979
+ tooltipEl2.style.minWidth = tooltipEl2.offsetWidth + "px";
5980
+ tooltipEl2.style.minHeight = tooltipEl2.offsetHeight + "px";
5981
+ }
5976
5982
  showTooltip2(tooltipLngLatForPagination, html);
5977
5983
  };
5978
5984
  customLayers.forEach((layerId) => {
@@ -5986,10 +5992,10 @@ const MapEditorCanvas = react.forwardRef(function MapEditorCanvas2({
5986
5992
  clearTimeout(tooltipHideTimeout);
5987
5993
  tooltipHideTimeout = null;
5988
5994
  }
5989
- if (!isMouseOverPopup) {
5990
- tooltipEl2.style.display = "none";
5991
- tooltipLngLat = null;
5992
- }
5995
+ tooltipEl2.style.display = "none";
5996
+ tooltipEl2.style.minWidth = "";
5997
+ tooltipEl2.style.minHeight = "";
5998
+ tooltipLngLat = null;
5993
5999
  if (e.features && e.features.length > 0) {
5994
6000
  const coordinates = e.lngLat;
5995
6001
  tooltipShowTimeout = setTimeout(() => {