@underverse-ui/underverse 2.0.27 → 2.0.28

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.
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "package": "@underverse-ui/underverse",
3
- "version": "2.0.27",
3
+ "version": "2.0.28",
4
4
  "sourceEntry": "src/index.ts",
5
5
  "totalExports": 263,
6
6
  "exports": [
@@ -2907,24 +2907,28 @@ function isRowResizeHotspot(cell, clientX, clientY) {
2907
2907
  }
2908
2908
  function getRelativeBoundaryMetrics(surface, table, row, cell) {
2909
2909
  const surfaceRect = surface.getBoundingClientRect();
2910
+ const originLeft = surfaceRect.left + surface.clientLeft;
2911
+ const originTop = surfaceRect.top + surface.clientTop;
2910
2912
  const tableRect = table.getBoundingClientRect();
2911
2913
  const rowRect = row.getBoundingClientRect();
2912
2914
  const cellRect = cell.getBoundingClientRect();
2913
2915
  return {
2914
- left: tableRect.left - surfaceRect.left + surface.scrollLeft,
2915
- top: tableRect.top - surfaceRect.top + surface.scrollTop,
2916
+ left: tableRect.left - originLeft + surface.scrollLeft,
2917
+ top: tableRect.top - originTop + surface.scrollTop,
2916
2918
  width: tableRect.width,
2917
2919
  height: tableRect.height,
2918
- rowBottom: rowRect.bottom - surfaceRect.top + surface.scrollTop,
2919
- columnRight: cellRect.right - surfaceRect.left + surface.scrollLeft
2920
+ rowBottom: rowRect.bottom - originTop + surface.scrollTop,
2921
+ columnRight: cellRect.right - originLeft + surface.scrollLeft
2920
2922
  };
2921
2923
  }
2922
2924
  function getRelativeCellMetrics(surface, cell) {
2923
2925
  const surfaceRect = surface.getBoundingClientRect();
2926
+ const originLeft = surfaceRect.left + surface.clientLeft;
2927
+ const originTop = surfaceRect.top + surface.clientTop;
2924
2928
  const cellRect = cell.getBoundingClientRect();
2925
2929
  return {
2926
- left: cellRect.left - surfaceRect.left + surface.scrollLeft,
2927
- top: cellRect.top - surfaceRect.top + surface.scrollTop,
2930
+ left: cellRect.left - originLeft + surface.scrollLeft,
2931
+ top: cellRect.top - originTop + surface.scrollTop,
2928
2932
  width: cellRect.width,
2929
2933
  height: cellRect.height
2930
2934
  };
@@ -2937,6 +2941,8 @@ function getRelativeSelectedCellsMetrics(surface) {
2937
2941
  return null;
2938
2942
  }
2939
2943
  const surfaceRect = surface.getBoundingClientRect();
2944
+ const originLeft = surfaceRect.left + surface.clientLeft;
2945
+ const originTop = surfaceRect.top + surface.clientTop;
2940
2946
  let left = Number.POSITIVE_INFINITY;
2941
2947
  let top = Number.POSITIVE_INFINITY;
2942
2948
  let right = Number.NEGATIVE_INFINITY;
@@ -2949,8 +2955,8 @@ function getRelativeSelectedCellsMetrics(surface) {
2949
2955
  bottom = Math.max(bottom, rect.bottom);
2950
2956
  });
2951
2957
  return {
2952
- left: left - surfaceRect.left + surface.scrollLeft,
2953
- top: top - surfaceRect.top + surface.scrollTop,
2958
+ left: left - originLeft + surface.scrollLeft,
2959
+ top: top - originTop + surface.scrollTop,
2954
2960
  width: right - left,
2955
2961
  height: bottom - top
2956
2962
  };
@@ -4823,4 +4829,4 @@ export {
4823
4829
  EditorToolbar,
4824
4830
  UEDITOR_PROSEMIRROR_CLASS_NAME
4825
4831
  };
4826
- //# sourceMappingURL=chunk-BDRCOIYR.js.map
4832
+ //# sourceMappingURL=chunk-KTOXCD6J.js.map