@lv-x-software-house/x_view 1.2.3-dev.4 → 1.2.3-dev.5

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 CHANGED
@@ -2959,10 +2959,15 @@ function updateTooltip({ tooltipEl, hoveredNode, hoveredLink, camera, mountEl, i
2959
2959
  if (tooltipEl.dataset.currentId !== currentId) {
2960
2960
  tooltipEl.innerHTML = content;
2961
2961
  tooltipEl.dataset.currentId = currentId;
2962
+ const anchor3D = new THREE2.Vector3();
2963
+ if (isLink) {
2964
+ anchor3D.copy(positionTarget);
2965
+ } else {
2966
+ positionTarget.getWorldPosition(anchor3D);
2967
+ }
2968
+ tooltipEl._fixedAnchor3D = anchor3D;
2962
2969
  }
2963
- const screenPosition = new THREE2.Vector3();
2964
- if (isLink) screenPosition.copy(positionTarget);
2965
- else positionTarget.getWorldPosition(screenPosition);
2970
+ const screenPosition = tooltipEl._fixedAnchor3D.clone();
2966
2971
  screenPosition.project(camera);
2967
2972
  const clientWidth = mountEl.clientWidth;
2968
2973
  const clientHeight = mountEl.clientHeight;
@@ -2982,6 +2987,7 @@ function updateTooltip({ tooltipEl, hoveredNode, hoveredLink, camera, mountEl, i
2982
2987
  if (tooltipEl.style.display !== "none") {
2983
2988
  tooltipEl.style.display = "none";
2984
2989
  tooltipEl.dataset.currentId = "";
2990
+ tooltipEl._fixedAnchor3D = null;
2985
2991
  }
2986
2992
  }
2987
2993
  }
package/dist/index.mjs CHANGED
@@ -2915,10 +2915,15 @@ function updateTooltip({ tooltipEl, hoveredNode, hoveredLink, camera, mountEl, i
2915
2915
  if (tooltipEl.dataset.currentId !== currentId) {
2916
2916
  tooltipEl.innerHTML = content;
2917
2917
  tooltipEl.dataset.currentId = currentId;
2918
+ const anchor3D = new THREE2.Vector3();
2919
+ if (isLink) {
2920
+ anchor3D.copy(positionTarget);
2921
+ } else {
2922
+ positionTarget.getWorldPosition(anchor3D);
2923
+ }
2924
+ tooltipEl._fixedAnchor3D = anchor3D;
2918
2925
  }
2919
- const screenPosition = new THREE2.Vector3();
2920
- if (isLink) screenPosition.copy(positionTarget);
2921
- else positionTarget.getWorldPosition(screenPosition);
2926
+ const screenPosition = tooltipEl._fixedAnchor3D.clone();
2922
2927
  screenPosition.project(camera);
2923
2928
  const clientWidth = mountEl.clientWidth;
2924
2929
  const clientHeight = mountEl.clientHeight;
@@ -2938,6 +2943,7 @@ function updateTooltip({ tooltipEl, hoveredNode, hoveredLink, camera, mountEl, i
2938
2943
  if (tooltipEl.style.display !== "none") {
2939
2944
  tooltipEl.style.display = "none";
2940
2945
  tooltipEl.dataset.currentId = "";
2946
+ tooltipEl._fixedAnchor3D = null;
2941
2947
  }
2942
2948
  }
2943
2949
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lv-x-software-house/x_view",
3
- "version": "1.2.3-dev.4",
3
+ "version": "1.2.3-dev.5",
4
4
  "description": "Pacote privado contendo os componentes e lógica de renderização 3D do X View.",
5
5
  "author": "iv.x - Engenharia de Software - ivxsoftwarehouse@gmail.com",
6
6
  "license": "UNLICENSED",