sheet-happens 0.0.21 → 0.0.23
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.d.ts +12 -1
- package/dist/index.js +138 -62
- package/dist/index.js.map +1 -1
- package/dist/index.modern.js +138 -62
- package/dist/index.modern.js.map +1 -1
- package/package.json +1 -1
package/dist/index.modern.js
CHANGED
|
@@ -332,6 +332,26 @@ function absCoordianteToCell(absX, absY, rowSizes, columnSizes) {
|
|
|
332
332
|
};
|
|
333
333
|
}
|
|
334
334
|
|
|
335
|
+
function normalizeSelection(selection) {
|
|
336
|
+
var selx1 = selection.x1;
|
|
337
|
+
var selx2 = selection.x2;
|
|
338
|
+
|
|
339
|
+
if (selection.x1 > selection.x2) {
|
|
340
|
+
selx1 = selection.x2;
|
|
341
|
+
selx2 = selection.x1;
|
|
342
|
+
}
|
|
343
|
+
|
|
344
|
+
var sely1 = selection.y1;
|
|
345
|
+
var sely2 = selection.y2;
|
|
346
|
+
|
|
347
|
+
if (selection.y1 > selection.y2) {
|
|
348
|
+
sely1 = selection.y2;
|
|
349
|
+
sely2 = selection.y1;
|
|
350
|
+
}
|
|
351
|
+
|
|
352
|
+
return [selx1, sely1, selx2, sely2];
|
|
353
|
+
}
|
|
354
|
+
|
|
335
355
|
function cellToAbsCoordinate(cellX, cellY, rowSizes, columnSizes, dataOffset, cellWidth, cellHeight, sheetStyle) {
|
|
336
356
|
var absX = sheetStyle.rowHeaderWidth;
|
|
337
357
|
var indX = columnSizes.index.findIndex(function (i) {
|
|
@@ -500,7 +520,7 @@ function findInDisplayData(displayData, start, direction) {
|
|
|
500
520
|
return i;
|
|
501
521
|
}
|
|
502
522
|
|
|
503
|
-
function renderOnCanvas(context, rowSizes, columnSizes, cellStyle, cellWidth, cellHeight, selection, knobDragInProgress, columnHeaders, columnHeaderStyle, knobArea, displayData, dataOffset, knobCoordinates, sheetStyle) {
|
|
523
|
+
function renderOnCanvas(context, rowSizes, columnSizes, cellStyle, cellWidth, cellHeight, selection, secondarySelections, knobDragInProgress, columnHeaders, columnHeaderStyle, knobArea, displayData, dataOffset, knobCoordinates, sheetStyle) {
|
|
504
524
|
resizeCanvas(context.canvas);
|
|
505
525
|
context.clearRect(0, 0, context.canvas.width, context.canvas.height);
|
|
506
526
|
context.fillStyle = 'white';
|
|
@@ -511,8 +531,8 @@ function renderOnCanvas(context, rowSizes, columnSizes, cellStyle, cellWidth, ce
|
|
|
511
531
|
var y = _step2.value;
|
|
512
532
|
var xCoord1 = sheetStyle.rowHeaderWidth;
|
|
513
533
|
|
|
514
|
-
for (var
|
|
515
|
-
var x =
|
|
534
|
+
for (var _iterator9 = _createForOfIteratorHelperLoose(columnSizes.index), _step9; !(_step9 = _iterator9()).done;) {
|
|
535
|
+
var x = _step9.value;
|
|
516
536
|
var style = cellStyle(x, y);
|
|
517
537
|
|
|
518
538
|
if (style.fillColor) {
|
|
@@ -527,21 +547,12 @@ function renderOnCanvas(context, rowSizes, columnSizes, cellStyle, cellWidth, ce
|
|
|
527
547
|
}
|
|
528
548
|
|
|
529
549
|
var hideKnob = false;
|
|
530
|
-
var selx1 = selection.x1;
|
|
531
|
-
var selx2 = selection.x2;
|
|
532
|
-
|
|
533
|
-
if (selection.x1 > selection.x2) {
|
|
534
|
-
selx1 = selection.x2;
|
|
535
|
-
selx2 = selection.x1;
|
|
536
|
-
}
|
|
537
|
-
|
|
538
|
-
var sely1 = selection.y1;
|
|
539
|
-
var sely2 = selection.y2;
|
|
540
550
|
|
|
541
|
-
|
|
542
|
-
|
|
543
|
-
|
|
544
|
-
|
|
551
|
+
var _normalizeSelection = normalizeSelection(selection),
|
|
552
|
+
selx1 = _normalizeSelection[0],
|
|
553
|
+
sely1 = _normalizeSelection[1],
|
|
554
|
+
selx2 = _normalizeSelection[2],
|
|
555
|
+
sely2 = _normalizeSelection[3];
|
|
545
556
|
|
|
546
557
|
var selectionActive = selx1 !== -1 && selx2 !== -1 || sely1 !== -1 && sely2 !== -1;
|
|
547
558
|
var rowSelectionActive = selx1 === -1 && selx2 === -1 && sely1 !== -1 && sely2 !== -1;
|
|
@@ -724,6 +735,70 @@ function renderOnCanvas(context, rowSizes, columnSizes, cellStyle, cellWidth, ce
|
|
|
724
735
|
context.stroke();
|
|
725
736
|
}
|
|
726
737
|
|
|
738
|
+
for (var _iterator7 = _createForOfIteratorHelperLoose(secondarySelections), _step7; !(_step7 = _iterator7()).done;) {
|
|
739
|
+
var secondarySelection = _step7.value;
|
|
740
|
+
|
|
741
|
+
var _normalizeSelection2 = normalizeSelection(secondarySelection.span),
|
|
742
|
+
_selx = _normalizeSelection2[0],
|
|
743
|
+
_sely = _normalizeSelection2[1],
|
|
744
|
+
_selx2 = _normalizeSelection2[2],
|
|
745
|
+
_sely2 = _normalizeSelection2[3];
|
|
746
|
+
|
|
747
|
+
var secondarySelectionActive = _selx !== -1 && _selx2 !== -1 || _sely !== -1 && _sely2 !== -1;
|
|
748
|
+
|
|
749
|
+
if (!secondarySelectionActive) {
|
|
750
|
+
continue;
|
|
751
|
+
}
|
|
752
|
+
|
|
753
|
+
var rowSecondarySelectionActive = _selx === -1 && _selx2 === -1 && _sely !== -1 && _sely2 !== -1;
|
|
754
|
+
var colSecondarySelectionActive = _selx !== -1 && _selx2 !== -1 && _sely === -1 && _sely2 === -1;
|
|
755
|
+
|
|
756
|
+
var _p = cellToAbsCoordinate(_selx, _sely, rowSizes, columnSizes, dataOffset, cellWidth, cellHeight, sheetStyle);
|
|
757
|
+
|
|
758
|
+
var _p2 = cellToAbsCoordinate(_selx2, _sely2, rowSizes, columnSizes, dataOffset, cellWidth, cellHeight, sheetStyle);
|
|
759
|
+
|
|
760
|
+
_p2.x += cellWidth(_selx2);
|
|
761
|
+
_p2.y += cellHeight(_sely2);
|
|
762
|
+
|
|
763
|
+
if (_p.x >= _p2.x) {
|
|
764
|
+
_p2.x = _p.x;
|
|
765
|
+
var _currentCol = _selx;
|
|
766
|
+
|
|
767
|
+
while (columnSizes.index.includes(_currentCol)) {
|
|
768
|
+
_p2.x += cellWidth(_currentCol);
|
|
769
|
+
_currentCol++;
|
|
770
|
+
}
|
|
771
|
+
}
|
|
772
|
+
|
|
773
|
+
if (_p.y >= _p2.y) {
|
|
774
|
+
_p2.y = _p.y;
|
|
775
|
+
var _currentRow = _sely;
|
|
776
|
+
|
|
777
|
+
while (rowSizes.index.includes(_currentRow)) {
|
|
778
|
+
_p2.y += cellHeight(_currentRow);
|
|
779
|
+
_currentRow++;
|
|
780
|
+
}
|
|
781
|
+
}
|
|
782
|
+
|
|
783
|
+
context.strokeStyle = secondarySelection.color;
|
|
784
|
+
context.lineWidth = 1;
|
|
785
|
+
context.beginPath();
|
|
786
|
+
|
|
787
|
+
if (rowSecondarySelectionActive) {
|
|
788
|
+
var _p1x2 = Math.max(-100, _p.x);
|
|
789
|
+
|
|
790
|
+
context.rect(_p1x2, _p.y, 100000, _p2.y - _p.y);
|
|
791
|
+
} else if (colSecondarySelectionActive) {
|
|
792
|
+
var _p1y2 = Math.max(-100, _p.y);
|
|
793
|
+
|
|
794
|
+
context.rect(_p.x, _p1y2, _p2.x - _p.x, 100000);
|
|
795
|
+
} else {
|
|
796
|
+
context.rect(_p.x, _p.y, _p2.x - _p.x, _p2.y - _p.y);
|
|
797
|
+
}
|
|
798
|
+
|
|
799
|
+
context.stroke();
|
|
800
|
+
}
|
|
801
|
+
|
|
727
802
|
if (knobDragInProgress) {
|
|
728
803
|
var kx1 = knobArea.x1;
|
|
729
804
|
var kx2 = knobArea.x2;
|
|
@@ -768,14 +843,14 @@ function renderOnCanvas(context, rowSizes, columnSizes, cellStyle, cellWidth, ce
|
|
|
768
843
|
context.textBaseline = 'middle';
|
|
769
844
|
var yCoord = sheetStyle.columnHeaderHeight;
|
|
770
845
|
|
|
771
|
-
for (var
|
|
772
|
-
var _y =
|
|
846
|
+
for (var _iterator8 = _createForOfIteratorHelperLoose(rowSizes.index), _step8; !(_step8 = _iterator8()).done;) {
|
|
847
|
+
var _y = _step8.value;
|
|
773
848
|
var xCoord = sheetStyle.rowHeaderWidth;
|
|
774
849
|
|
|
775
850
|
var _ch = cellHeight(_y);
|
|
776
851
|
|
|
777
|
-
for (var
|
|
778
|
-
var _x =
|
|
852
|
+
for (var _iterator10 = _createForOfIteratorHelperLoose(columnSizes.index), _step10; !(_step10 = _iterator10()).done;) {
|
|
853
|
+
var _x = _step10.value;
|
|
779
854
|
|
|
780
855
|
var _cellContent = displayData(_x, _y);
|
|
781
856
|
|
|
@@ -957,6 +1032,11 @@ function Sheet(props) {
|
|
|
957
1032
|
var rowSizes = useMemo(function () {
|
|
958
1033
|
return calculateRowsOrColsSizes(sheetStyle.freezeRows, cellHeight, sheetStyle.columnHeaderHeight, dataOffset.y, canvasHeight);
|
|
959
1034
|
}, [sheetStyle, cellHeight, dataOffset.y, canvasHeight]);
|
|
1035
|
+
useEffect(function () {
|
|
1036
|
+
if (props.onScrollChange) {
|
|
1037
|
+
props.onScrollChange([].concat(rowSizes.index), [].concat(columnSizes.index));
|
|
1038
|
+
}
|
|
1039
|
+
}, [rowSizes, columnSizes, props.onScrollChange]);
|
|
960
1040
|
|
|
961
1041
|
var changeSelection = function changeSelection(x1, y1, x2, y2, scrollToP2) {
|
|
962
1042
|
if (scrollToP2 === void 0) {
|
|
@@ -1089,23 +1169,23 @@ function Sheet(props) {
|
|
|
1089
1169
|
}
|
|
1090
1170
|
|
|
1091
1171
|
if (selection.x2 !== -1 && selection.y2 !== -1) {
|
|
1092
|
-
var
|
|
1172
|
+
var _selx3 = selection.x2;
|
|
1093
1173
|
|
|
1094
1174
|
if (selection.x1 > selection.x2) {
|
|
1095
|
-
|
|
1175
|
+
_selx3 = selection.x1;
|
|
1096
1176
|
}
|
|
1097
1177
|
|
|
1098
|
-
var
|
|
1178
|
+
var _sely3 = selection.y2;
|
|
1099
1179
|
|
|
1100
1180
|
if (selection.y1 > selection.y2) {
|
|
1101
|
-
|
|
1181
|
+
_sely3 = selection.y1;
|
|
1102
1182
|
}
|
|
1103
1183
|
|
|
1104
|
-
var _c2 = cellToAbsCoordinate(
|
|
1184
|
+
var _c2 = cellToAbsCoordinate(_selx3, _sely3, rowSizes, columnSizes, dataOffset, cellWidth, cellHeight, sheetStyle);
|
|
1105
1185
|
|
|
1106
1186
|
return {
|
|
1107
|
-
x: _c2.x + cellWidth(
|
|
1108
|
-
y: _c2.y + cellHeight(
|
|
1187
|
+
x: _c2.x + cellWidth(_selx3),
|
|
1188
|
+
y: _c2.y + cellHeight(_sely3)
|
|
1109
1189
|
};
|
|
1110
1190
|
}
|
|
1111
1191
|
|
|
@@ -1126,16 +1206,16 @@ function Sheet(props) {
|
|
|
1126
1206
|
var yCoord = sheetStyle.columnHeaderHeight;
|
|
1127
1207
|
var xCoord = sheetStyle.rowHeaderWidth;
|
|
1128
1208
|
|
|
1129
|
-
for (var
|
|
1130
|
-
var x =
|
|
1209
|
+
for (var _iterator11 = _createForOfIteratorHelperLoose(columnSizes.index), _step11; !(_step11 = _iterator11()).done;) {
|
|
1210
|
+
var x = _step11.value;
|
|
1131
1211
|
var ch = columnHeaders(x);
|
|
1132
1212
|
var cellW = cellWidth(x);
|
|
1133
1213
|
|
|
1134
1214
|
if (ch && typeof ch === 'object' && ch.items) {
|
|
1135
1215
|
var finalStyle = void 0;
|
|
1136
1216
|
|
|
1137
|
-
for (var
|
|
1138
|
-
var obj =
|
|
1217
|
+
for (var _iterator13 = _createForOfIteratorHelperLoose(ch.items), _step13; !(_step13 = _iterator13()).done;) {
|
|
1218
|
+
var obj = _step13.value;
|
|
1139
1219
|
|
|
1140
1220
|
if (obj.onClick) {
|
|
1141
1221
|
if (!finalStyle) {
|
|
@@ -1181,12 +1261,12 @@ function Sheet(props) {
|
|
|
1181
1261
|
xCoord += cellW;
|
|
1182
1262
|
}
|
|
1183
1263
|
|
|
1184
|
-
for (var
|
|
1185
|
-
var y =
|
|
1264
|
+
for (var _iterator12 = _createForOfIteratorHelperLoose(rowSizes.index), _step12; !(_step12 = _iterator12()).done;) {
|
|
1265
|
+
var y = _step12.value;
|
|
1186
1266
|
xCoord = sheetStyle.rowHeaderWidth;
|
|
1187
1267
|
|
|
1188
|
-
for (var
|
|
1189
|
-
var _x2 =
|
|
1268
|
+
for (var _iterator14 = _createForOfIteratorHelperLoose(columnSizes.index), _step14; !(_step14 = _iterator14()).done;) {
|
|
1269
|
+
var _x2 = _step14.value;
|
|
1190
1270
|
var cellContent = displayData(_x2, y);
|
|
1191
1271
|
|
|
1192
1272
|
var _cellW = cellWidth(_x2);
|
|
@@ -1202,8 +1282,8 @@ function Sheet(props) {
|
|
|
1202
1282
|
if (typeof cellContent === 'object' && cellContent.items) {
|
|
1203
1283
|
var _finalStyle = void 0;
|
|
1204
1284
|
|
|
1205
|
-
for (var
|
|
1206
|
-
var _obj =
|
|
1285
|
+
for (var _iterator15 = _createForOfIteratorHelperLoose(cellContent.items), _step15; !(_step15 = _iterator15()).done;) {
|
|
1286
|
+
var _obj = _step15.value;
|
|
1207
1287
|
|
|
1208
1288
|
if (_obj.onClick) {
|
|
1209
1289
|
if (!_finalStyle) {
|
|
@@ -1277,12 +1357,12 @@ function Sheet(props) {
|
|
|
1277
1357
|
}
|
|
1278
1358
|
|
|
1279
1359
|
var animationFrameId = window.requestAnimationFrame(function () {
|
|
1280
|
-
renderOnCanvas(context, rowSizes, columnSizes, cellStyle, cellWidth, cellHeight, selection, knobDragInProgress, columnHeaders, columnHeaderStyle, knobArea, displayData, dataOffset, knobCoordinates, sheetStyle);
|
|
1360
|
+
renderOnCanvas(context, rowSizes, columnSizes, cellStyle, cellWidth, cellHeight, selection, props.secondarySelections || [], knobDragInProgress, columnHeaders, columnHeaderStyle, knobArea, displayData, dataOffset, knobCoordinates, sheetStyle);
|
|
1281
1361
|
});
|
|
1282
1362
|
return function () {
|
|
1283
1363
|
window.cancelAnimationFrame(animationFrameId);
|
|
1284
1364
|
};
|
|
1285
|
-
}, [canvasRef, rowSizes, columnSizes, cellStyle, cellWidth, cellHeight, selection, knobDragInProgress, columnHeaders, columnHeaderStyle, knobArea, displayData, dataOffset, knobCoordinates, sheetStyle]);
|
|
1365
|
+
}, [canvasRef, rowSizes, columnSizes, cellStyle, cellWidth, cellHeight, selection, props.secondarySelections, knobDragInProgress, columnHeaders, columnHeaderStyle, knobArea, displayData, dataOffset, knobCoordinates, sheetStyle]);
|
|
1286
1366
|
|
|
1287
1367
|
var setFocusToTextArea = function setFocusToTextArea() {
|
|
1288
1368
|
if (copyPasteTextAreaRef.current) {
|
|
@@ -1342,8 +1422,8 @@ function Sheet(props) {
|
|
|
1342
1422
|
});
|
|
1343
1423
|
|
|
1344
1424
|
var findTable = function findTable(element) {
|
|
1345
|
-
for (var
|
|
1346
|
-
var child =
|
|
1425
|
+
for (var _iterator16 = _createForOfIteratorHelperLoose(element.children), _step16; !(_step16 = _iterator16()).done;) {
|
|
1426
|
+
var child = _step16.value;
|
|
1347
1427
|
|
|
1348
1428
|
if (child.nodeName === 'TABLE') {
|
|
1349
1429
|
return child;
|
|
@@ -1392,17 +1472,17 @@ function Sheet(props) {
|
|
|
1392
1472
|
return;
|
|
1393
1473
|
}
|
|
1394
1474
|
|
|
1395
|
-
for (var
|
|
1396
|
-
var tableChild =
|
|
1475
|
+
for (var _iterator17 = _createForOfIteratorHelperLoose(tableNode.children), _step17; !(_step17 = _iterator17()).done;) {
|
|
1476
|
+
var tableChild = _step17.value;
|
|
1397
1477
|
|
|
1398
1478
|
if (tableChild.nodeName === 'TBODY') {
|
|
1399
|
-
for (var
|
|
1400
|
-
var tr =
|
|
1479
|
+
for (var _iterator18 = _createForOfIteratorHelperLoose(tableChild.children), _step18; !(_step18 = _iterator18()).done;) {
|
|
1480
|
+
var tr = _step18.value;
|
|
1401
1481
|
x = pasteLocX;
|
|
1402
1482
|
|
|
1403
1483
|
if (tr.nodeName === 'TR') {
|
|
1404
|
-
for (var
|
|
1405
|
-
var td =
|
|
1484
|
+
for (var _iterator19 = _createForOfIteratorHelperLoose(tr.children), _step19; !(_step19 = _iterator19()).done;) {
|
|
1485
|
+
var td = _step19.value;
|
|
1406
1486
|
|
|
1407
1487
|
if (td.nodeName === 'TD') {
|
|
1408
1488
|
var str = '';
|
|
@@ -1623,10 +1703,6 @@ function Sheet(props) {
|
|
|
1623
1703
|
x: cellX,
|
|
1624
1704
|
y: cellY
|
|
1625
1705
|
});
|
|
1626
|
-
|
|
1627
|
-
if (props.onScrollChange) {
|
|
1628
|
-
props.onScrollChange(cellX, cellY);
|
|
1629
|
-
}
|
|
1630
1706
|
}
|
|
1631
1707
|
|
|
1632
1708
|
var newMaxScroll = _extends({}, maxScroll);
|
|
@@ -1670,8 +1746,8 @@ function Sheet(props) {
|
|
|
1670
1746
|
var hitTargetKeyY = Math.floor(y / yBinSize);
|
|
1671
1747
|
|
|
1672
1748
|
if (hitMap[hitTargetKeyX] && hitMap[hitTargetKeyX][hitTargetKeyY]) {
|
|
1673
|
-
for (var
|
|
1674
|
-
var hitTarget =
|
|
1749
|
+
for (var _iterator20 = _createForOfIteratorHelperLoose(hitMap[hitTargetKeyX][hitTargetKeyY]), _step20; !(_step20 = _iterator20()).done;) {
|
|
1750
|
+
var hitTarget = _step20.value;
|
|
1675
1751
|
|
|
1676
1752
|
if (hitTarget.x <= x && x <= hitTarget.x + hitTarget.w && hitTarget.y <= y && y <= hitTarget.y + hitTarget.h) {
|
|
1677
1753
|
setButtonClickMouseDownCoordinates({
|
|
@@ -1979,8 +2055,8 @@ function Sheet(props) {
|
|
|
1979
2055
|
var hitTargetKeyY = Math.floor(y / yBinSize);
|
|
1980
2056
|
|
|
1981
2057
|
if (hitMap[hitTargetKeyX] && hitMap[hitTargetKeyX][hitTargetKeyY]) {
|
|
1982
|
-
for (var
|
|
1983
|
-
var hitTarget =
|
|
2058
|
+
for (var _iterator21 = _createForOfIteratorHelperLoose(hitMap[hitTargetKeyX][hitTargetKeyY]), _step21; !(_step21 = _iterator21()).done;) {
|
|
2059
|
+
var hitTarget = _step21.value;
|
|
1984
2060
|
|
|
1985
2061
|
if (hitTarget.x <= x && x <= hitTarget.x + hitTarget.w && hitTarget.y <= y && y <= hitTarget.y + hitTarget.h) {
|
|
1986
2062
|
window.document.body.style.cursor = 'pointer';
|
|
@@ -1991,8 +2067,8 @@ function Sheet(props) {
|
|
|
1991
2067
|
if (!sheetStyle.hideColumnHeaders && props.onCellWidthChange && y < sheetStyle.columnHeaderHeight) {
|
|
1992
2068
|
var xx = sheetStyle.rowHeaderWidth;
|
|
1993
2069
|
|
|
1994
|
-
for (var
|
|
1995
|
-
var col =
|
|
2070
|
+
for (var _iterator22 = _createForOfIteratorHelperLoose(columnSizes.index), _step22; !(_step22 = _iterator22()).done;) {
|
|
2071
|
+
var col = _step22.value;
|
|
1996
2072
|
|
|
1997
2073
|
if (Math.abs(xx - x) < resizeColumnRowMouseThreshold) {
|
|
1998
2074
|
window.document.body.style.cursor = 'col-resize';
|
|
@@ -2006,8 +2082,8 @@ function Sheet(props) {
|
|
|
2006
2082
|
if (!sheetStyle.hideRowHeaders && props.onCellHeightChange && x < sheetStyle.rowHeaderWidth) {
|
|
2007
2083
|
var yy = sheetStyle.columnHeaderHeight;
|
|
2008
2084
|
|
|
2009
|
-
for (var
|
|
2010
|
-
var row =
|
|
2085
|
+
for (var _iterator23 = _createForOfIteratorHelperLoose(rowSizes.index), _step23; !(_step23 = _iterator23()).done;) {
|
|
2086
|
+
var row = _step23.value;
|
|
2011
2087
|
|
|
2012
2088
|
if (Math.abs(yy - y) < resizeColumnRowMouseThreshold) {
|
|
2013
2089
|
window.document.body.style.cursor = 'row-resize';
|
|
@@ -2114,8 +2190,8 @@ function Sheet(props) {
|
|
|
2114
2190
|
var hitTargetKeyY = Math.floor(y / yBinSize);
|
|
2115
2191
|
|
|
2116
2192
|
if (hitMap[hitTargetKeyX] && hitMap[hitTargetKeyX][hitTargetKeyY]) {
|
|
2117
|
-
for (var
|
|
2118
|
-
var hitTarget =
|
|
2193
|
+
for (var _iterator24 = _createForOfIteratorHelperLoose(hitMap[hitTargetKeyX][hitTargetKeyY]), _step24; !(_step24 = _iterator24()).done;) {
|
|
2194
|
+
var hitTarget = _step24.value;
|
|
2119
2195
|
|
|
2120
2196
|
if (hitTarget.x <= x && x <= hitTarget.x + hitTarget.w && hitTarget.y <= y && y <= hitTarget.y + hitTarget.h) {
|
|
2121
2197
|
return;
|