sheet-happens 0.0.16 → 0.0.17
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 +24 -14
- package/dist/index.js.map +1 -1
- package/dist/index.modern.js +24 -14
- package/dist/index.modern.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -580,15 +580,19 @@ function renderOnCanvas(context, rowSizes, columnSizes, cellStyle, cellWidth, ce
|
|
|
580
580
|
|
|
581
581
|
if (selectionActive) {
|
|
582
582
|
context.fillStyle = selBackColor;
|
|
583
|
-
var p1x = Math.max(-100, p1.x);
|
|
584
|
-
var p1y = Math.max(-100, p1.y);
|
|
585
583
|
|
|
586
584
|
if (rowSelectionActive) {
|
|
585
|
+
var p1x = Math.max(-100, p1.x);
|
|
586
|
+
var p1y = Math.max(-100, p1.y);
|
|
587
587
|
context.fillRect(p1x, p1y, 100000, p2.y - p1.y);
|
|
588
588
|
} else if (colSelectionActive) {
|
|
589
|
-
|
|
589
|
+
var _p1x = Math.max(-100, p1.x);
|
|
590
|
+
|
|
591
|
+
var _p1y = Math.max(-100, p1.y);
|
|
592
|
+
|
|
593
|
+
context.fillRect(_p1x, _p1y, p2.x - p1.x, 100000);
|
|
590
594
|
} else {
|
|
591
|
-
context.fillRect(
|
|
595
|
+
context.fillRect(p1.x, p1.y, p2.x - p1.x, p2.y - p1.y);
|
|
592
596
|
}
|
|
593
597
|
}
|
|
594
598
|
|
|
@@ -678,19 +682,22 @@ function renderOnCanvas(context, rowSizes, columnSizes, cellStyle, cellWidth, ce
|
|
|
678
682
|
if (selectionActive) {
|
|
679
683
|
context.strokeStyle = selBorderColor;
|
|
680
684
|
context.lineWidth = 1;
|
|
681
|
-
|
|
682
|
-
var _p1x = Math.max(-100, p1.x);
|
|
683
|
-
|
|
684
|
-
var _p1y = Math.max(-100, p1.y);
|
|
685
|
-
|
|
686
685
|
context.beginPath();
|
|
687
686
|
|
|
688
687
|
if (rowSelectionActive) {
|
|
689
|
-
|
|
688
|
+
var _p1x2 = Math.max(-100, p1.x);
|
|
689
|
+
|
|
690
|
+
var _p1y2 = Math.max(-100, p1.y);
|
|
691
|
+
|
|
692
|
+
context.rect(_p1x2, _p1y2, 100000, p2.y - p1.y);
|
|
690
693
|
} else if (colSelectionActive) {
|
|
691
|
-
|
|
694
|
+
var _p1x3 = Math.max(-100, p1.x);
|
|
695
|
+
|
|
696
|
+
var _p1y3 = Math.max(-100, p1.y);
|
|
697
|
+
|
|
698
|
+
context.rect(_p1x3, _p1y3, p2.x - p1.x, 100000);
|
|
692
699
|
} else {
|
|
693
|
-
context.rect(
|
|
700
|
+
context.rect(p1.x, p1.y, p2.x - p1.x, p2.y - p1.y);
|
|
694
701
|
}
|
|
695
702
|
|
|
696
703
|
context.stroke();
|
|
@@ -1809,8 +1816,9 @@ function Sheet(props) {
|
|
|
1809
1816
|
}
|
|
1810
1817
|
|
|
1811
1818
|
if (fx1 === -1 && fx2 === -1) {
|
|
1819
|
+
var max = findApproxMaxEditDataIndex(editData);
|
|
1812
1820
|
fx1 = 0;
|
|
1813
|
-
fx2 =
|
|
1821
|
+
fx2 = max.x;
|
|
1814
1822
|
}
|
|
1815
1823
|
|
|
1816
1824
|
var srcY = sy1;
|
|
@@ -1839,8 +1847,10 @@ function Sheet(props) {
|
|
|
1839
1847
|
}
|
|
1840
1848
|
|
|
1841
1849
|
if (fy1 === -1 && fy2 === -1) {
|
|
1850
|
+
var _max3 = findApproxMaxEditDataIndex(editData);
|
|
1851
|
+
|
|
1842
1852
|
fy1 = 0;
|
|
1843
|
-
fy2 =
|
|
1853
|
+
fy2 = _max3.y;
|
|
1844
1854
|
}
|
|
1845
1855
|
|
|
1846
1856
|
var srcX = sx1;
|