@visactor/vtable 1.24.0 → 1.25.1-alpha.0
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/cjs/core/BaseTable.d.ts +7 -0
- package/cjs/core/BaseTable.js +100 -34
- package/cjs/core/BaseTable.js.map +1 -1
- package/cjs/core/tableHelper.js +5 -3
- package/cjs/core/tableHelper.js.map +1 -1
- package/cjs/core/utils/get-cell-position.js +23 -12
- package/cjs/core/utils/get-cell-position.js.map +1 -1
- package/cjs/event/listener/container-dom.js +7 -5
- package/cjs/event/listener/container-dom.js.map +1 -1
- package/cjs/event/listener/scroll-bar.js +77 -6
- package/cjs/event/listener/scroll-bar.js.map +1 -1
- package/cjs/event/listener/table-group.js +29 -20
- package/cjs/event/listener/table-group.js.map +1 -1
- package/cjs/event/scroll.js +34 -11
- package/cjs/event/scroll.js.map +1 -1
- package/cjs/event/util.d.ts +2 -0
- package/cjs/event/util.js +28 -3
- package/cjs/event/util.js.map +1 -1
- package/cjs/index.d.ts +1 -1
- package/cjs/index.js +1 -1
- package/cjs/index.js.map +1 -1
- package/cjs/scenegraph/component/table-component.d.ts +6 -1
- package/cjs/scenegraph/component/table-component.js +143 -16
- package/cjs/scenegraph/component/table-component.js.map +1 -1
- package/cjs/scenegraph/component/util.js +5 -2
- package/cjs/scenegraph/component/util.js.map +1 -1
- package/cjs/scenegraph/graphic/contributions/group-contribution-render.js +29 -10
- package/cjs/scenegraph/graphic/contributions/group-contribution-render.js.map +1 -1
- package/cjs/scenegraph/group-creater/init-scenegraph.js +36 -6
- package/cjs/scenegraph/group-creater/init-scenegraph.js.map +1 -1
- package/cjs/scenegraph/group-creater/progress/proxy.js +4 -2
- package/cjs/scenegraph/group-creater/progress/proxy.js.map +1 -1
- package/cjs/scenegraph/scenegraph.d.ts +13 -0
- package/cjs/scenegraph/scenegraph.js +194 -23
- package/cjs/scenegraph/scenegraph.js.map +1 -1
- package/cjs/scenegraph/select/create-select-border.js +9 -10
- package/cjs/scenegraph/select/create-select-border.js.map +1 -1
- package/cjs/scenegraph/select/delete-select-border.js.map +1 -1
- package/cjs/scenegraph/select/move-select-border.js.map +1 -1
- package/cjs/scenegraph/select/update-custom-select-border.js +9 -9
- package/cjs/scenegraph/select/update-custom-select-border.js.map +1 -1
- package/cjs/scenegraph/select/update-select-border.js +14 -73
- package/cjs/scenegraph/select/update-select-border.js.map +1 -1
- package/cjs/scenegraph/select/update-select-style.js.map +1 -1
- package/cjs/state/state.d.ts +7 -1
- package/cjs/state/state.js +61 -28
- package/cjs/state/state.js.map +1 -1
- package/cjs/ts-types/base-table.d.ts +10 -0
- package/cjs/ts-types/base-table.js.map +1 -1
- package/cjs/vrender.js.map +1 -1
- package/dist/vtable.js +1148 -327
- package/dist/vtable.min.js +2 -2
- package/es/core/BaseTable.d.ts +7 -0
- package/es/core/BaseTable.js +99 -33
- package/es/core/BaseTable.js.map +1 -1
- package/es/core/tableHelper.js +5 -3
- package/es/core/tableHelper.js.map +1 -1
- package/es/core/utils/get-cell-position.js +23 -12
- package/es/core/utils/get-cell-position.js.map +1 -1
- package/es/event/listener/container-dom.js +7 -5
- package/es/event/listener/container-dom.js.map +1 -1
- package/es/event/listener/scroll-bar.js +75 -6
- package/es/event/listener/scroll-bar.js.map +1 -1
- package/es/event/listener/table-group.js +29 -21
- package/es/event/listener/table-group.js.map +1 -1
- package/es/event/scroll.js +34 -11
- package/es/event/scroll.js.map +1 -1
- package/es/event/util.d.ts +2 -0
- package/es/event/util.js +24 -0
- package/es/event/util.js.map +1 -1
- package/es/index.d.ts +1 -1
- package/es/index.js +1 -1
- package/es/index.js.map +1 -1
- package/es/scenegraph/component/table-component.d.ts +6 -1
- package/es/scenegraph/component/table-component.js +141 -16
- package/es/scenegraph/component/table-component.js.map +1 -1
- package/es/scenegraph/component/util.js +5 -2
- package/es/scenegraph/component/util.js.map +1 -1
- package/es/scenegraph/graphic/contributions/group-contribution-render.js +29 -10
- package/es/scenegraph/graphic/contributions/group-contribution-render.js.map +1 -1
- package/es/scenegraph/group-creater/init-scenegraph.js +36 -6
- package/es/scenegraph/group-creater/init-scenegraph.js.map +1 -1
- package/es/scenegraph/group-creater/progress/proxy.js +4 -2
- package/es/scenegraph/group-creater/progress/proxy.js.map +1 -1
- package/es/scenegraph/scenegraph.d.ts +13 -0
- package/es/scenegraph/scenegraph.js +185 -18
- package/es/scenegraph/scenegraph.js.map +1 -1
- package/es/scenegraph/select/create-select-border.js +9 -10
- package/es/scenegraph/select/create-select-border.js.map +1 -1
- package/es/scenegraph/select/delete-select-border.js.map +1 -1
- package/es/scenegraph/select/move-select-border.js.map +1 -1
- package/es/scenegraph/select/update-custom-select-border.js +9 -9
- package/es/scenegraph/select/update-custom-select-border.js.map +1 -1
- package/es/scenegraph/select/update-select-border.js +14 -73
- package/es/scenegraph/select/update-select-border.js.map +1 -1
- package/es/scenegraph/select/update-select-style.js.map +1 -1
- package/es/state/state.d.ts +7 -1
- package/es/state/state.js +61 -28
- package/es/state/state.js.map +1 -1
- package/es/ts-types/base-table.d.ts +10 -0
- package/es/ts-types/base-table.js.map +1 -1
- package/es/vrender.js.map +1 -1
- package/package.json +9 -9
package/dist/vtable.js
CHANGED
|
@@ -42353,9 +42353,11 @@
|
|
|
42353
42353
|
}
|
|
42354
42354
|
function _getScrollableVisibleRect(table) {
|
|
42355
42355
|
let frozenColsWidth = 0;
|
|
42356
|
+
let frozenColsContentWidth = 0;
|
|
42356
42357
|
let rightFrozenColsWidth = 0;
|
|
42357
42358
|
if (table.frozenColCount > 0) {
|
|
42358
42359
|
frozenColsWidth = table.getFrozenColsWidth();
|
|
42360
|
+
frozenColsContentWidth = table.getFrozenColsContentWidth?.() ?? frozenColsWidth;
|
|
42359
42361
|
}
|
|
42360
42362
|
if (table.rightFrozenColCount > 0) {
|
|
42361
42363
|
rightFrozenColsWidth = table.getRightFrozenColsWidth();
|
|
@@ -42368,7 +42370,7 @@
|
|
|
42368
42370
|
if (table.bottomFrozenRowCount > 0) {
|
|
42369
42371
|
bottomFrozenRowsHeight = table.getBottomFrozenRowsHeight();
|
|
42370
42372
|
}
|
|
42371
|
-
return new Rect$1(table.scrollLeft +
|
|
42373
|
+
return new Rect$1(table.scrollLeft + frozenColsContentWidth, table.scrollTop + frozenRowsHeight, table.tableNoFrameWidth - frozenColsWidth - rightFrozenColsWidth, table.tableNoFrameHeight - frozenRowsHeight - bottomFrozenRowsHeight);
|
|
42372
42374
|
}
|
|
42373
42375
|
function getStyleTheme(headerStyle, table, col, row, getProp, needGetTheme = true) {
|
|
42374
42376
|
const padding = getQuadProps(getProp('padding', headerStyle, col, row, table));
|
|
@@ -43348,6 +43350,40 @@
|
|
|
43348
43350
|
}
|
|
43349
43351
|
return tableEvent;
|
|
43350
43352
|
}
|
|
43353
|
+
function getCellEventArgsSetWithTable(e, table) {
|
|
43354
|
+
const eventArgsSet = getCellEventArgsSet(e);
|
|
43355
|
+
if (!eventArgsSet.eventArgs) {
|
|
43356
|
+
return eventArgsSet;
|
|
43357
|
+
}
|
|
43358
|
+
if (!table.options.scrollFrozenCols || table.getFrozenColsOffset?.() === 0) {
|
|
43359
|
+
return eventArgsSet;
|
|
43360
|
+
}
|
|
43361
|
+
const xInTable = e.x - table.tableX;
|
|
43362
|
+
const yInTable = e.y - table.tableY;
|
|
43363
|
+
if (xInTable < 0 || yInTable < 0 || xInTable > table.tableNoFrameWidth || yInTable > table.tableNoFrameHeight) {
|
|
43364
|
+
return eventArgsSet;
|
|
43365
|
+
}
|
|
43366
|
+
const frozenViewportWidth = table.getFrozenColsWidth();
|
|
43367
|
+
const pickedCol = eventArgsSet.eventArgs.col;
|
|
43368
|
+
const pickedRow = eventArgsSet.eventArgs.row;
|
|
43369
|
+
const isPickedLeftFrozen = pickedCol >= 0 && pickedCol < table.frozenColCount && !table.isRightFrozenColumn(pickedCol, pickedRow);
|
|
43370
|
+
if (isPickedLeftFrozen && xInTable >= frozenViewportWidth) {
|
|
43371
|
+
const cell = table.getCellAtRelativePosition(e.x, e.y);
|
|
43372
|
+
if (cell.col === -1 || cell.row === -1) {
|
|
43373
|
+
return eventArgsSet;
|
|
43374
|
+
}
|
|
43375
|
+
const targetCell = table.scenegraph.getCell(cell.col, cell.row);
|
|
43376
|
+
eventArgsSet.eventArgs = {
|
|
43377
|
+
col: cell.col,
|
|
43378
|
+
row: cell.row,
|
|
43379
|
+
event: e,
|
|
43380
|
+
targetCell,
|
|
43381
|
+
mergeInfo: getMergeCellInfo(targetCell),
|
|
43382
|
+
target: targetCell
|
|
43383
|
+
};
|
|
43384
|
+
}
|
|
43385
|
+
return eventArgsSet;
|
|
43386
|
+
}
|
|
43351
43387
|
function getTargetCell(target) {
|
|
43352
43388
|
while (target && target.parent) {
|
|
43353
43389
|
if (target.role === 'cell') {
|
|
@@ -48262,11 +48298,18 @@
|
|
|
48262
48298
|
|
|
48263
48299
|
function getColX(col, table, isRightFrozen) {
|
|
48264
48300
|
if (isRightFrozen) {
|
|
48265
|
-
return Math.min(table.tableNoFrameWidth, table.getAllColsWidth()) -
|
|
48301
|
+
return (Math.min(table.tableNoFrameWidth, table.getAllColsWidth()) -
|
|
48302
|
+
table.getColsWidth(col, table.colCount - 1) +
|
|
48303
|
+
(table.getRightFrozenColsScrollLeft?.() ?? 0));
|
|
48266
48304
|
}
|
|
48305
|
+
const frozenOffset = table.getFrozenColsOffset?.() ?? 0;
|
|
48306
|
+
const frozenScrollLeft = table.getFrozenColsScrollLeft?.() ?? 0;
|
|
48267
48307
|
let colX = table.getColsWidth(0, col);
|
|
48268
48308
|
if (col >= table.frozenColCount) {
|
|
48269
|
-
colX -= table.scrollLeft;
|
|
48309
|
+
colX -= table.scrollLeft + frozenOffset;
|
|
48310
|
+
}
|
|
48311
|
+
else {
|
|
48312
|
+
colX -= frozenScrollLeft;
|
|
48270
48313
|
}
|
|
48271
48314
|
return colX;
|
|
48272
48315
|
}
|
|
@@ -48283,6 +48326,7 @@
|
|
|
48283
48326
|
|
|
48284
48327
|
class TableComponent {
|
|
48285
48328
|
table;
|
|
48329
|
+
_horizontalScrollBarTarget;
|
|
48286
48330
|
border;
|
|
48287
48331
|
columnResizeLine;
|
|
48288
48332
|
columnResizeBgLine;
|
|
@@ -48293,6 +48337,8 @@
|
|
|
48293
48337
|
menu;
|
|
48294
48338
|
vScrollBar;
|
|
48295
48339
|
hScrollBar;
|
|
48340
|
+
frozenHScrollBar;
|
|
48341
|
+
rightFrozenHScrollBar;
|
|
48296
48342
|
frozenShadowLine;
|
|
48297
48343
|
rightFrozenShadowLine;
|
|
48298
48344
|
drillIcon;
|
|
@@ -48485,10 +48531,14 @@
|
|
|
48485
48531
|
const hoverOn = this.table.theme.scrollStyle.hoverOn;
|
|
48486
48532
|
if (hoverOn && !this.table.theme.scrollStyle.barToSide) {
|
|
48487
48533
|
componentGroup.addChild(this.hScrollBar);
|
|
48534
|
+
componentGroup.addChild(this.frozenHScrollBar);
|
|
48535
|
+
componentGroup.addChild(this.rightFrozenHScrollBar);
|
|
48488
48536
|
componentGroup.addChild(this.vScrollBar);
|
|
48489
48537
|
}
|
|
48490
48538
|
else {
|
|
48491
48539
|
componentGroup.stage.defaultLayer.addChild(this.hScrollBar);
|
|
48540
|
+
componentGroup.stage.defaultLayer.addChild(this.frozenHScrollBar);
|
|
48541
|
+
componentGroup.stage.defaultLayer.addChild(this.rightFrozenHScrollBar);
|
|
48492
48542
|
componentGroup.stage.defaultLayer.addChild(this.vScrollBar);
|
|
48493
48543
|
}
|
|
48494
48544
|
this.menu.bindTableComponent(componentGroup);
|
|
@@ -48531,6 +48581,38 @@
|
|
|
48531
48581
|
});
|
|
48532
48582
|
this.hScrollBar.render();
|
|
48533
48583
|
this.hScrollBar.hideAll();
|
|
48584
|
+
this.frozenHScrollBar = new ScrollBar({
|
|
48585
|
+
direction: 'horizontal',
|
|
48586
|
+
x: -this.table.tableNoFrameWidth * 2,
|
|
48587
|
+
y: -this.table.tableNoFrameHeight * 2,
|
|
48588
|
+
width: this.table.tableNoFrameWidth,
|
|
48589
|
+
height: width,
|
|
48590
|
+
padding: horizontalPadding,
|
|
48591
|
+
railStyle: {
|
|
48592
|
+
fill: scrollRailColor
|
|
48593
|
+
},
|
|
48594
|
+
sliderStyle,
|
|
48595
|
+
range: [0, 0.1],
|
|
48596
|
+
visible: false
|
|
48597
|
+
});
|
|
48598
|
+
this.frozenHScrollBar.render();
|
|
48599
|
+
this.frozenHScrollBar.hideAll();
|
|
48600
|
+
this.rightFrozenHScrollBar = new ScrollBar({
|
|
48601
|
+
direction: 'horizontal',
|
|
48602
|
+
x: -this.table.tableNoFrameWidth * 2,
|
|
48603
|
+
y: -this.table.tableNoFrameHeight * 2,
|
|
48604
|
+
width: this.table.tableNoFrameWidth,
|
|
48605
|
+
height: width,
|
|
48606
|
+
padding: horizontalPadding,
|
|
48607
|
+
railStyle: {
|
|
48608
|
+
fill: scrollRailColor
|
|
48609
|
+
},
|
|
48610
|
+
sliderStyle,
|
|
48611
|
+
range: [0, 0.1],
|
|
48612
|
+
visible: false
|
|
48613
|
+
});
|
|
48614
|
+
this.rightFrozenHScrollBar.render();
|
|
48615
|
+
this.rightFrozenHScrollBar.hideAll();
|
|
48534
48616
|
this.vScrollBar = new ScrollBar({
|
|
48535
48617
|
direction: 'vertical',
|
|
48536
48618
|
x: -this.table.tableNoFrameWidth * 2,
|
|
@@ -48551,6 +48633,8 @@
|
|
|
48551
48633
|
updateScrollBar() {
|
|
48552
48634
|
const oldHorizontalBarPos = this.table.stateManager.scroll.horizontalBarPos;
|
|
48553
48635
|
const oldVerticalBarPos = this.table.stateManager.scroll.verticalBarPos;
|
|
48636
|
+
const oldFrozenHorizontalBarPos = this.table.stateManager.scroll.frozenHorizontalBarPos;
|
|
48637
|
+
const oldRightFrozenHorizontalBarPos = this.table.stateManager.scroll.rightFrozenHorizontalBarPos;
|
|
48554
48638
|
const theme = this.table.theme;
|
|
48555
48639
|
const width = theme.scrollStyle?.width;
|
|
48556
48640
|
const visible1 = theme.scrollStyle?.visible;
|
|
@@ -48562,13 +48646,17 @@
|
|
|
48562
48646
|
const totalWidth = this.table.getAllColsWidth();
|
|
48563
48647
|
const frozenRowsHeight = this.table.getFrozenRowsHeight();
|
|
48564
48648
|
const frozenColsWidth = this.table.getFrozenColsWidth();
|
|
48649
|
+
const frozenColsContentWidth = this.table.getFrozenColsContentWidth?.() ?? frozenColsWidth;
|
|
48565
48650
|
const bottomFrozenRowsHeight = this.table.getBottomFrozenRowsHeight();
|
|
48566
48651
|
const rightFrozenColsWidth = this.table.getRightFrozenColsWidth();
|
|
48652
|
+
const rightFrozenColsContentWidth = this.table.getRightFrozenColsContentWidth?.() ?? rightFrozenColsWidth;
|
|
48567
48653
|
const hoverOn = this.table.theme.scrollStyle.hoverOn;
|
|
48568
48654
|
const sizeTolerance = this.table.options.customConfig?._disableColumnAndRowSizeRound ? 1 : 0;
|
|
48569
48655
|
if (totalWidth > tableWidth + sizeTolerance) {
|
|
48570
48656
|
const y = Math.min(tableHeight, totalHeight);
|
|
48571
|
-
const
|
|
48657
|
+
const bodyViewportWidth = tableWidth - frozenColsWidth - rightFrozenColsWidth;
|
|
48658
|
+
const bodyContentWidth = totalWidth - frozenColsContentWidth - rightFrozenColsContentWidth;
|
|
48659
|
+
const rangeEnd = bodyContentWidth > 0 ? Math.max(0.05, bodyViewportWidth / bodyContentWidth) : 1;
|
|
48572
48660
|
let attrY = 0;
|
|
48573
48661
|
if (this.table.theme.scrollStyle.barToSide) {
|
|
48574
48662
|
attrY =
|
|
@@ -48605,6 +48693,62 @@
|
|
|
48605
48693
|
if (horizontalVisible === 'always') {
|
|
48606
48694
|
this.hScrollBar.showAll();
|
|
48607
48695
|
}
|
|
48696
|
+
const frozenScrollable = this.table.options.scrollFrozenCols && this.table.getFrozenColsOffset() > 0;
|
|
48697
|
+
if (!ignoreFrozenCols && frozenScrollable) {
|
|
48698
|
+
const frozenRangeEnd = Math.max(0.05, frozenColsWidth / frozenColsContentWidth);
|
|
48699
|
+
const x = !hoverOn ? this.table.scenegraph.tableGroup.attribute.x : 0;
|
|
48700
|
+
this.frozenHScrollBar.setAttributes({
|
|
48701
|
+
x,
|
|
48702
|
+
y: attrY,
|
|
48703
|
+
width: frozenColsWidth,
|
|
48704
|
+
range: [0, frozenRangeEnd],
|
|
48705
|
+
visible: horizontalVisible === 'always'
|
|
48706
|
+
});
|
|
48707
|
+
const bounds = this.frozenHScrollBar.AABBBounds && this.frozenHScrollBar.globalAABBBounds;
|
|
48708
|
+
this.frozenHScrollBar._viewPosition = {
|
|
48709
|
+
x: bounds.x1,
|
|
48710
|
+
y: bounds.y1
|
|
48711
|
+
};
|
|
48712
|
+
if (horizontalVisible === 'always') {
|
|
48713
|
+
this.frozenHScrollBar.showAll();
|
|
48714
|
+
}
|
|
48715
|
+
}
|
|
48716
|
+
else {
|
|
48717
|
+
this.frozenHScrollBar.setAttributes({
|
|
48718
|
+
x: -this.table.tableNoFrameWidth * 2,
|
|
48719
|
+
y: -this.table.tableNoFrameHeight * 2,
|
|
48720
|
+
width: 0,
|
|
48721
|
+
visible: false
|
|
48722
|
+
});
|
|
48723
|
+
}
|
|
48724
|
+
const rightFrozenScrollable = this.table.options.scrollRightFrozenCols && this.table.getRightFrozenColsOffset() > 0;
|
|
48725
|
+
if (!ignoreFrozenCols && rightFrozenScrollable) {
|
|
48726
|
+
const rightFrozenRangeEnd = Math.max(0.05, rightFrozenColsWidth / rightFrozenColsContentWidth);
|
|
48727
|
+
const x = tableWidth - rightFrozenColsWidth + (!hoverOn ? this.table.scenegraph.tableGroup.attribute.x : 0);
|
|
48728
|
+
this.rightFrozenHScrollBar.setAttributes({
|
|
48729
|
+
x,
|
|
48730
|
+
y: attrY,
|
|
48731
|
+
width: rightFrozenColsWidth,
|
|
48732
|
+
range: [0, rightFrozenRangeEnd],
|
|
48733
|
+
visible: horizontalVisible === 'always'
|
|
48734
|
+
});
|
|
48735
|
+
const bounds = this.rightFrozenHScrollBar.AABBBounds && this.rightFrozenHScrollBar.globalAABBBounds;
|
|
48736
|
+
this.rightFrozenHScrollBar._viewPosition = {
|
|
48737
|
+
x: bounds.x1,
|
|
48738
|
+
y: bounds.y1
|
|
48739
|
+
};
|
|
48740
|
+
if (horizontalVisible === 'always') {
|
|
48741
|
+
this.rightFrozenHScrollBar.showAll();
|
|
48742
|
+
}
|
|
48743
|
+
}
|
|
48744
|
+
else {
|
|
48745
|
+
this.rightFrozenHScrollBar.setAttributes({
|
|
48746
|
+
x: -this.table.tableNoFrameWidth * 2,
|
|
48747
|
+
y: -this.table.tableNoFrameHeight * 2,
|
|
48748
|
+
width: 0,
|
|
48749
|
+
visible: false
|
|
48750
|
+
});
|
|
48751
|
+
}
|
|
48608
48752
|
}
|
|
48609
48753
|
else {
|
|
48610
48754
|
this.hScrollBar.setAttributes({
|
|
@@ -48613,6 +48757,18 @@
|
|
|
48613
48757
|
width: 0,
|
|
48614
48758
|
visible: false
|
|
48615
48759
|
});
|
|
48760
|
+
this.frozenHScrollBar.setAttributes({
|
|
48761
|
+
x: -this.table.tableNoFrameWidth * 2,
|
|
48762
|
+
y: -this.table.tableNoFrameHeight * 2,
|
|
48763
|
+
width: 0,
|
|
48764
|
+
visible: false
|
|
48765
|
+
});
|
|
48766
|
+
this.rightFrozenHScrollBar.setAttributes({
|
|
48767
|
+
x: -this.table.tableNoFrameWidth * 2,
|
|
48768
|
+
y: -this.table.tableNoFrameHeight * 2,
|
|
48769
|
+
width: 0,
|
|
48770
|
+
visible: false
|
|
48771
|
+
});
|
|
48616
48772
|
}
|
|
48617
48773
|
if (totalHeight > tableHeight + sizeTolerance) {
|
|
48618
48774
|
const x = Math.min(tableWidth, totalWidth);
|
|
@@ -48652,6 +48808,8 @@
|
|
|
48652
48808
|
});
|
|
48653
48809
|
}
|
|
48654
48810
|
this.table.stateManager.setScrollLeft(oldHorizontalBarPos);
|
|
48811
|
+
this.table.stateManager.setFrozenColsScrollLeft(oldFrozenHorizontalBarPos, false);
|
|
48812
|
+
this.table.stateManager.setRightFrozenColsScrollLeft(oldRightFrozenHorizontalBarPos, false);
|
|
48655
48813
|
this.table.stateManager.setScrollTop(oldVerticalBarPos);
|
|
48656
48814
|
}
|
|
48657
48815
|
hideResizeCol() {
|
|
@@ -48780,7 +48938,9 @@
|
|
|
48780
48938
|
this.cellMover.update(backX, lineX, backY, lineY);
|
|
48781
48939
|
}
|
|
48782
48940
|
setFrozenColumnShadow(col, isRightFrozen) {
|
|
48783
|
-
const colX =
|
|
48941
|
+
const colX = !isRightFrozen && col === this.table.frozenColCount - 1 && (this.table.getFrozenColsOffset?.() ?? 0) > 0
|
|
48942
|
+
? this.table.getFrozenColsWidth()
|
|
48943
|
+
: getColX(col, this.table, isRightFrozen);
|
|
48784
48944
|
if (col < 0 || this.table.theme.frozenColumnLine?.shadow?.visible !== 'always') {
|
|
48785
48945
|
this.frozenShadowLine.setAttributes({
|
|
48786
48946
|
visible: false,
|
|
@@ -48797,7 +48957,10 @@
|
|
|
48797
48957
|
}
|
|
48798
48958
|
}
|
|
48799
48959
|
setRightFrozenColumnShadow(col) {
|
|
48800
|
-
const
|
|
48960
|
+
const shouldFixViewport = this.table.options.scrollRightFrozenCols && (this.table.getRightFrozenColsOffset?.() ?? 0) > 0;
|
|
48961
|
+
const colX = shouldFixViewport
|
|
48962
|
+
? this.table.tableNoFrameWidth - this.table.getRightFrozenColsWidth()
|
|
48963
|
+
: getColX(col, this.table, true);
|
|
48801
48964
|
if (col >= this.table.colCount || this.table.theme.frozenColumnLine?.shadow?.visible !== 'always') {
|
|
48802
48965
|
this.rightFrozenShadowLine.setAttributes({
|
|
48803
48966
|
visible: false,
|
|
@@ -48861,16 +49024,35 @@
|
|
|
48861
49024
|
}
|
|
48862
49025
|
this.hScrollBar.setAttribute('visible', false);
|
|
48863
49026
|
this.hScrollBar.hideAll();
|
|
49027
|
+
this.frozenHScrollBar.setAttribute('visible', false);
|
|
49028
|
+
this.frozenHScrollBar.hideAll();
|
|
49029
|
+
this.rightFrozenHScrollBar.setAttribute('visible', false);
|
|
49030
|
+
this.rightFrozenHScrollBar.hideAll();
|
|
49031
|
+
this._horizontalScrollBarTarget = undefined;
|
|
48864
49032
|
this.table.scenegraph.updateNextFrame();
|
|
48865
49033
|
}
|
|
48866
|
-
showHorizontalScrollBar() {
|
|
49034
|
+
showHorizontalScrollBar(target = 'all') {
|
|
48867
49035
|
const visible1 = this.table.theme.scrollStyle.visible;
|
|
48868
49036
|
const horizontalVisible = this.table.theme.scrollStyle.horizontalVisible ?? visible1;
|
|
48869
49037
|
if (horizontalVisible !== 'focus' && horizontalVisible !== 'scrolling') {
|
|
48870
49038
|
return;
|
|
48871
49039
|
}
|
|
48872
|
-
this.
|
|
48873
|
-
|
|
49040
|
+
if (this._horizontalScrollBarTarget === target) {
|
|
49041
|
+
return;
|
|
49042
|
+
}
|
|
49043
|
+
this._horizontalScrollBarTarget = target;
|
|
49044
|
+
const showBody = target === 'all' || target === 'body';
|
|
49045
|
+
const showFrozen = target === 'all' || target === 'frozen';
|
|
49046
|
+
const showRightFrozen = target === 'all' || target === 'rightFrozen';
|
|
49047
|
+
const bodyVisible = showBody && this.hScrollBar.attribute.width > 0;
|
|
49048
|
+
this.hScrollBar.setAttribute('visible', bodyVisible);
|
|
49049
|
+
bodyVisible ? this.hScrollBar.showAll() : this.hScrollBar.hideAll();
|
|
49050
|
+
const frozenVisible = showFrozen && this.frozenHScrollBar.attribute.width > 0;
|
|
49051
|
+
this.frozenHScrollBar.setAttribute('visible', frozenVisible);
|
|
49052
|
+
frozenVisible ? this.frozenHScrollBar.showAll() : this.frozenHScrollBar.hideAll();
|
|
49053
|
+
const rightFrozenVisible = showRightFrozen && this.rightFrozenHScrollBar.attribute.width > 0;
|
|
49054
|
+
this.rightFrozenHScrollBar.setAttribute('visible', rightFrozenVisible);
|
|
49055
|
+
rightFrozenVisible ? this.rightFrozenHScrollBar.showAll() : this.rightFrozenHScrollBar.hideAll();
|
|
48874
49056
|
this.table.scenegraph.updateNextFrame();
|
|
48875
49057
|
}
|
|
48876
49058
|
updateVerticalScrollBarPos(topRatio) {
|
|
@@ -48895,6 +49077,28 @@
|
|
|
48895
49077
|
y: bounds.y1
|
|
48896
49078
|
};
|
|
48897
49079
|
}
|
|
49080
|
+
updateFrozenHorizontalScrollBarPos(leftRatio) {
|
|
49081
|
+
const range = this.frozenHScrollBar.attribute.range;
|
|
49082
|
+
const size = range[1] - range[0];
|
|
49083
|
+
const range0 = leftRatio * (1 - size);
|
|
49084
|
+
this.frozenHScrollBar.setAttribute('range', [range0, range0 + size]);
|
|
49085
|
+
const bounds = this.frozenHScrollBar.AABBBounds && this.frozenHScrollBar.globalAABBBounds;
|
|
49086
|
+
this.frozenHScrollBar._viewPosition = {
|
|
49087
|
+
x: bounds.x1,
|
|
49088
|
+
y: bounds.y1
|
|
49089
|
+
};
|
|
49090
|
+
}
|
|
49091
|
+
updateRightFrozenHorizontalScrollBarPos(leftRatio) {
|
|
49092
|
+
const range = this.rightFrozenHScrollBar.attribute.range;
|
|
49093
|
+
const size = range[1] - range[0];
|
|
49094
|
+
const range0 = leftRatio * (1 - size);
|
|
49095
|
+
this.rightFrozenHScrollBar.setAttribute('range', [range0, range0 + size]);
|
|
49096
|
+
const bounds = this.rightFrozenHScrollBar.AABBBounds && this.rightFrozenHScrollBar.globalAABBBounds;
|
|
49097
|
+
this.rightFrozenHScrollBar._viewPosition = {
|
|
49098
|
+
x: bounds.x1,
|
|
49099
|
+
y: bounds.y1
|
|
49100
|
+
};
|
|
49101
|
+
}
|
|
48898
49102
|
updateStyle() {
|
|
48899
49103
|
const theme = this.table.theme;
|
|
48900
49104
|
const scrollRailColor = theme.scrollStyle?.scrollRailColor;
|
|
@@ -48931,6 +49135,22 @@
|
|
|
48931
49135
|
},
|
|
48932
49136
|
sliderStyle
|
|
48933
49137
|
});
|
|
49138
|
+
this.frozenHScrollBar.setAttributes({
|
|
49139
|
+
height: width,
|
|
49140
|
+
padding: horizontalPadding,
|
|
49141
|
+
railStyle: {
|
|
49142
|
+
fill: scrollRailColor
|
|
49143
|
+
},
|
|
49144
|
+
sliderStyle
|
|
49145
|
+
});
|
|
49146
|
+
this.rightFrozenHScrollBar.setAttributes({
|
|
49147
|
+
height: width,
|
|
49148
|
+
padding: horizontalPadding,
|
|
49149
|
+
railStyle: {
|
|
49150
|
+
fill: scrollRailColor
|
|
49151
|
+
},
|
|
49152
|
+
sliderStyle
|
|
49153
|
+
});
|
|
48934
49154
|
const columnResizeColor = theme.columnResize?.lineColor;
|
|
48935
49155
|
const columnResizeWidth = theme.columnResize?.lineWidth;
|
|
48936
49156
|
const columnResizeBgColor = theme.columnResize?.bgColor;
|
|
@@ -52357,67 +52577,92 @@
|
|
|
52357
52577
|
if (!table) {
|
|
52358
52578
|
return;
|
|
52359
52579
|
}
|
|
52580
|
+
const clipInflate = getSelectOverlayClipInflate(group, table);
|
|
52360
52581
|
if (group.role === 'body') {
|
|
52361
|
-
const x = -(group.attribute.x ?? 0) + table.getFrozenColsWidth();
|
|
52362
|
-
const y = -(group.attribute.y ?? 0) + table.getFrozenRowsHeight();
|
|
52363
|
-
const width = group.parent.attribute.width -
|
|
52364
|
-
|
|
52582
|
+
const x = -(group.attribute.x ?? 0) + table.getFrozenColsWidth() - clipInflate.left;
|
|
52583
|
+
const y = -(group.attribute.y ?? 0) + table.getFrozenRowsHeight() - clipInflate.top;
|
|
52584
|
+
const width = group.parent.attribute.width -
|
|
52585
|
+
table.getFrozenColsWidth() -
|
|
52586
|
+
table.getRightFrozenColsWidth() +
|
|
52587
|
+
clipInflate.left +
|
|
52588
|
+
clipInflate.right;
|
|
52589
|
+
const height = group.parent.attribute.height -
|
|
52590
|
+
table.getFrozenRowsHeight() -
|
|
52591
|
+
table.getBottomFrozenRowsHeight() +
|
|
52592
|
+
clipInflate.top +
|
|
52593
|
+
clipInflate.bottom;
|
|
52365
52594
|
drawClipRect(context, x, y, width, height);
|
|
52366
52595
|
}
|
|
52367
52596
|
else if (group.role === 'row-header') {
|
|
52368
|
-
const x = 0;
|
|
52369
|
-
const y = -(group.attribute.y ?? 0) + table.getFrozenRowsHeight();
|
|
52370
|
-
const width = table.getFrozenColsWidth();
|
|
52371
|
-
const height = group.parent.attribute.height -
|
|
52597
|
+
const x = 0 - clipInflate.left;
|
|
52598
|
+
const y = -(group.attribute.y ?? 0) + table.getFrozenRowsHeight() - clipInflate.top;
|
|
52599
|
+
const width = table.getFrozenColsWidth() + clipInflate.left + clipInflate.right;
|
|
52600
|
+
const height = group.parent.attribute.height -
|
|
52601
|
+
table.getFrozenRowsHeight() -
|
|
52602
|
+
table.getBottomFrozenRowsHeight() +
|
|
52603
|
+
clipInflate.top +
|
|
52604
|
+
clipInflate.bottom;
|
|
52372
52605
|
drawClipRect(context, x, y, width, height);
|
|
52373
52606
|
}
|
|
52374
52607
|
else if (group.role === 'col-header') {
|
|
52375
|
-
const x = -(group.attribute.x ?? 0) + table.getFrozenColsWidth();
|
|
52376
|
-
const y = 0;
|
|
52377
|
-
const width = group.parent.attribute.width -
|
|
52378
|
-
|
|
52608
|
+
const x = -(group.attribute.x ?? 0) + table.getFrozenColsWidth() - clipInflate.left;
|
|
52609
|
+
const y = 0 - clipInflate.top;
|
|
52610
|
+
const width = group.parent.attribute.width -
|
|
52611
|
+
table.getFrozenColsWidth() -
|
|
52612
|
+
table.getRightFrozenColsWidth() +
|
|
52613
|
+
clipInflate.left +
|
|
52614
|
+
clipInflate.right;
|
|
52615
|
+
const height = table.getFrozenRowsHeight() + clipInflate.top + clipInflate.bottom;
|
|
52379
52616
|
drawClipRect(context, x, y, width, height);
|
|
52380
52617
|
}
|
|
52381
52618
|
else if (group.role === 'right-frozen') {
|
|
52382
|
-
const x = 0;
|
|
52383
|
-
const y = -(group.attribute.y ?? 0) + table.getFrozenRowsHeight();
|
|
52384
|
-
const width = table.getRightFrozenColsWidth();
|
|
52385
|
-
const height = group.parent.attribute.height -
|
|
52619
|
+
const x = 0 - clipInflate.left;
|
|
52620
|
+
const y = -(group.attribute.y ?? 0) + table.getFrozenRowsHeight() - clipInflate.top;
|
|
52621
|
+
const width = table.getRightFrozenColsWidth() + clipInflate.left + clipInflate.right;
|
|
52622
|
+
const height = group.parent.attribute.height -
|
|
52623
|
+
table.getFrozenRowsHeight() -
|
|
52624
|
+
table.getBottomFrozenRowsHeight() +
|
|
52625
|
+
clipInflate.top +
|
|
52626
|
+
clipInflate.bottom;
|
|
52386
52627
|
drawClipRect(context, x, y, width, height);
|
|
52387
52628
|
}
|
|
52388
52629
|
else if (group.role === 'bottom-frozen') {
|
|
52389
|
-
const x = -(group.attribute.x ?? 0) + table.getFrozenColsWidth();
|
|
52390
|
-
const y = 0;
|
|
52391
|
-
const width = group.parent.attribute.width -
|
|
52392
|
-
|
|
52630
|
+
const x = -(group.attribute.x ?? 0) + table.getFrozenColsWidth() - clipInflate.left;
|
|
52631
|
+
const y = 0 - clipInflate.top;
|
|
52632
|
+
const width = group.parent.attribute.width -
|
|
52633
|
+
table.getFrozenColsWidth() -
|
|
52634
|
+
table.getRightFrozenColsWidth() +
|
|
52635
|
+
clipInflate.left +
|
|
52636
|
+
clipInflate.right;
|
|
52637
|
+
const height = table.getBottomFrozenRowsHeight() + clipInflate.top + clipInflate.bottom;
|
|
52393
52638
|
drawClipRect(context, x, y, width, height);
|
|
52394
52639
|
}
|
|
52395
52640
|
else if (group.role === 'corner-header') {
|
|
52396
|
-
const x = 0;
|
|
52397
|
-
const y = 0;
|
|
52398
|
-
const width = table.getFrozenColsWidth();
|
|
52399
|
-
const height = table.getFrozenRowsHeight();
|
|
52641
|
+
const x = 0 - clipInflate.left;
|
|
52642
|
+
const y = 0 - clipInflate.top;
|
|
52643
|
+
const width = table.getFrozenColsWidth() + clipInflate.left + clipInflate.right;
|
|
52644
|
+
const height = table.getFrozenRowsHeight() + clipInflate.top + clipInflate.bottom;
|
|
52400
52645
|
drawClipRect(context, x, y, width, height);
|
|
52401
52646
|
}
|
|
52402
52647
|
else if (group.role === 'corner-right-top-header') {
|
|
52403
|
-
const x = 0;
|
|
52404
|
-
const y = 0;
|
|
52405
|
-
const width = table.getRightFrozenColsWidth();
|
|
52406
|
-
const height = table.getFrozenRowsHeight();
|
|
52648
|
+
const x = 0 - clipInflate.left;
|
|
52649
|
+
const y = 0 - clipInflate.top;
|
|
52650
|
+
const width = table.getRightFrozenColsWidth() + clipInflate.left + clipInflate.right;
|
|
52651
|
+
const height = table.getFrozenRowsHeight() + clipInflate.top + clipInflate.bottom;
|
|
52407
52652
|
drawClipRect(context, x, y, width, height);
|
|
52408
52653
|
}
|
|
52409
52654
|
else if (group.role === 'corner-right-bottom-header') {
|
|
52410
|
-
const x = 0;
|
|
52411
|
-
const y = 0;
|
|
52412
|
-
const width = table.getRightFrozenColsWidth();
|
|
52413
|
-
const height = table.getBottomFrozenRowsHeight();
|
|
52655
|
+
const x = 0 - clipInflate.left;
|
|
52656
|
+
const y = 0 - clipInflate.top;
|
|
52657
|
+
const width = table.getRightFrozenColsWidth() + clipInflate.left + clipInflate.right;
|
|
52658
|
+
const height = table.getBottomFrozenRowsHeight() + clipInflate.top + clipInflate.bottom;
|
|
52414
52659
|
drawClipRect(context, x, y, width, height);
|
|
52415
52660
|
}
|
|
52416
52661
|
else if (group.role === 'corner-left-bottom-header') {
|
|
52417
|
-
const x = 0;
|
|
52418
|
-
const y = 0;
|
|
52419
|
-
const width = table.getFrozenColsWidth();
|
|
52420
|
-
const height = table.getBottomFrozenRowsHeight();
|
|
52662
|
+
const x = 0 - clipInflate.left;
|
|
52663
|
+
const y = 0 - clipInflate.top;
|
|
52664
|
+
const width = table.getFrozenColsWidth() + clipInflate.left + clipInflate.right;
|
|
52665
|
+
const height = table.getBottomFrozenRowsHeight() + clipInflate.top + clipInflate.bottom;
|
|
52421
52666
|
drawClipRect(context, x, y, width, height);
|
|
52422
52667
|
}
|
|
52423
52668
|
}
|
|
@@ -52426,6 +52671,27 @@
|
|
|
52426
52671
|
injectable()
|
|
52427
52672
|
], ClipBodyGroupBeforeRenderContribution);
|
|
52428
52673
|
const precision = Math.pow(2, 24);
|
|
52674
|
+
function getSelectOverlayClipInflate(group, table) {
|
|
52675
|
+
const isSelectOverlay = group.name === 'select-overlay';
|
|
52676
|
+
if (!isSelectOverlay) {
|
|
52677
|
+
return { left: 0, top: 0, right: 0, bottom: 0 };
|
|
52678
|
+
}
|
|
52679
|
+
const lineWidth = table.theme.selectionStyle?.cellBorderLineWidth;
|
|
52680
|
+
const maxLineWidth = Array.isArray(lineWidth)
|
|
52681
|
+
? Math.max(...lineWidth.filter(v => typeof v === 'number'))
|
|
52682
|
+
: typeof lineWidth === 'number'
|
|
52683
|
+
? lineWidth
|
|
52684
|
+
: 0;
|
|
52685
|
+
const baseInflate = Math.max(1, Math.ceil(maxLineWidth / 2) + 1);
|
|
52686
|
+
const shouldInflateForFillHandle = !!table.options.excelOptions?.fillHandle && table.stateManager.select.ranges?.length === 1;
|
|
52687
|
+
const handleInflate = shouldInflateForFillHandle ? 3 : 0;
|
|
52688
|
+
return {
|
|
52689
|
+
left: baseInflate,
|
|
52690
|
+
top: baseInflate,
|
|
52691
|
+
right: Math.max(baseInflate, handleInflate),
|
|
52692
|
+
bottom: Math.max(baseInflate, handleInflate)
|
|
52693
|
+
};
|
|
52694
|
+
}
|
|
52429
52695
|
function drawClipRect(context, x, y, width, height) {
|
|
52430
52696
|
context.beginPath();
|
|
52431
52697
|
const matrix = context.applyedMatrix;
|
|
@@ -55322,7 +55588,7 @@
|
|
|
55322
55588
|
async setX(x, isEnd = false) {
|
|
55323
55589
|
const xLimitLeft = this.table.getColsWidth(this.bodyLeftCol, this.bodyLeftCol + (this.colEnd - this.colStart + 1)) / 2;
|
|
55324
55590
|
const xLimitRight = this.table.getAllColsWidth() - xLimitLeft;
|
|
55325
|
-
const screenLeft = this.table.getTargetColAt(x + this.table.scenegraph.rowHeaderGroup.attribute.width);
|
|
55591
|
+
const screenLeft = this.table.getTargetColAt(x + this.table.scenegraph.rowHeaderGroup.attribute.width + (this.table.getFrozenColsOffset?.() ?? 0));
|
|
55326
55592
|
if (screenLeft) {
|
|
55327
55593
|
this.screenLeftCol = screenLeft.col;
|
|
55328
55594
|
}
|
|
@@ -55503,7 +55769,9 @@
|
|
|
55503
55769
|
if (colGroup) {
|
|
55504
55770
|
const deltaX = colGroup.attribute.x +
|
|
55505
55771
|
colGroup.attribute.width -
|
|
55506
|
-
(this.table.getAllColsWidth() -
|
|
55772
|
+
(this.table.getAllColsWidth() -
|
|
55773
|
+
(this.table.getFrozenColsContentWidth?.() ?? this.table.getFrozenColsWidth()) -
|
|
55774
|
+
(this.table.getRightFrozenColsContentWidth?.() ?? this.table.getRightFrozenColsWidth()));
|
|
55507
55775
|
this.deltaX = -deltaX;
|
|
55508
55776
|
}
|
|
55509
55777
|
}
|
|
@@ -55690,10 +55958,13 @@
|
|
|
55690
55958
|
}
|
|
55691
55959
|
const colsWidth = table.getColsWidth(computeRectCellRangeStartCol, computeRectCellRangeEndCol);
|
|
55692
55960
|
const rowsHeight = table.getRowsHeight(computeRectCellRangeStartRow, computeRectCellRangeEndRow);
|
|
55961
|
+
const overlayGroup = scene.getSelectOverlayGroup(selectComp.role);
|
|
55962
|
+
const offsetX = scene.tableGroup.attribute.x + (overlayGroup.attribute.x ?? 0);
|
|
55963
|
+
const offsetY = scene.tableGroup.attribute.y + (overlayGroup.attribute.y ?? 0);
|
|
55693
55964
|
const firstCellBound = scene.highPerformanceGetCell(computeRectCellRangeStartCol, computeRectCellRangeStartRow).globalAABBBounds;
|
|
55694
55965
|
selectComp.rect.setAttributes({
|
|
55695
|
-
x: firstCellBound.x1 -
|
|
55696
|
-
y: firstCellBound.y1 -
|
|
55966
|
+
x: firstCellBound.x1 - offsetX,
|
|
55967
|
+
y: firstCellBound.y1 - offsetY,
|
|
55697
55968
|
width: colsWidth,
|
|
55698
55969
|
height: rowsHeight,
|
|
55699
55970
|
visible: true
|
|
@@ -55716,16 +55987,16 @@
|
|
|
55716
55987
|
let handlerX;
|
|
55717
55988
|
if (endCol < table.colCount - 1) {
|
|
55718
55989
|
lastCellBound = scene.highPerformanceGetCell(endCol, endRow).globalAABBBounds;
|
|
55719
|
-
handlerX = lastCellBound.x2 -
|
|
55990
|
+
handlerX = lastCellBound.x2 - offsetX - 3;
|
|
55720
55991
|
}
|
|
55721
55992
|
else {
|
|
55722
55993
|
if (startCol === 0) {
|
|
55723
55994
|
lastCellBound = scene.highPerformanceGetCell(0, endRow).globalAABBBounds;
|
|
55724
|
-
handlerX = lastCellBound.x1 -
|
|
55995
|
+
handlerX = lastCellBound.x1 - offsetX;
|
|
55725
55996
|
}
|
|
55726
55997
|
else {
|
|
55727
55998
|
lastCellBound = scene.highPerformanceGetCell(startCol - 1, endRow).globalAABBBounds;
|
|
55728
|
-
handlerX = lastCellBound.x2 -
|
|
55999
|
+
handlerX = lastCellBound.x2 - offsetX - 3;
|
|
55729
56000
|
}
|
|
55730
56001
|
}
|
|
55731
56002
|
if (endRow < table.rowCount - 1) {
|
|
@@ -55734,7 +56005,7 @@
|
|
|
55734
56005
|
else {
|
|
55735
56006
|
lastCellBound = scene.highPerformanceGetCell(endCol, startRow - 1).globalAABBBounds;
|
|
55736
56007
|
}
|
|
55737
|
-
const handlerY = lastCellBound.y2 -
|
|
56008
|
+
const handlerY = lastCellBound.y2 - offsetY - 3;
|
|
55738
56009
|
selectComp.fillhandle?.setAttributes({
|
|
55739
56010
|
x: handlerX,
|
|
55740
56011
|
y: handlerY,
|
|
@@ -55743,141 +56014,6 @@
|
|
|
55743
56014
|
visible
|
|
55744
56015
|
});
|
|
55745
56016
|
}
|
|
55746
|
-
let isNearRowHeader = table.frozenColCount ? startCol === table.frozenColCount : false;
|
|
55747
|
-
if (!isNearRowHeader && table.frozenColCount && table.scrollLeft > 0 && startCol >= table.frozenColCount) {
|
|
55748
|
-
const startColRelativePosition = table.getColsWidth(0, startCol - 1) - table.scrollLeft;
|
|
55749
|
-
if (startColRelativePosition < table.getFrozenColsWidth()) {
|
|
55750
|
-
isNearRowHeader = true;
|
|
55751
|
-
}
|
|
55752
|
-
}
|
|
55753
|
-
let isNearRightRowHeader = table.rightFrozenColCount
|
|
55754
|
-
? table.rightFrozenColCount > 0 && endCol === table.colCount - table.rightFrozenColCount - 1
|
|
55755
|
-
: false;
|
|
55756
|
-
if (!isNearRightRowHeader && table.rightFrozenColCount && endCol < table.colCount - table.rightFrozenColCount) {
|
|
55757
|
-
const endColRelativePosition = table.getColsWidth(0, endCol) - table.scrollLeft;
|
|
55758
|
-
if (endColRelativePosition > table.tableNoFrameWidth - table.getRightFrozenColsWidth()) {
|
|
55759
|
-
isNearRightRowHeader = true;
|
|
55760
|
-
}
|
|
55761
|
-
}
|
|
55762
|
-
let isNearColHeader = table.frozenRowCount ? startRow === table.frozenRowCount : true;
|
|
55763
|
-
if (!isNearColHeader && table.frozenRowCount && table.scrollTop > 0 && startRow >= table.frozenRowCount) {
|
|
55764
|
-
const startRowRelativePosition = table.getRowsHeight(0, startRow - 1) - table.scrollTop;
|
|
55765
|
-
if (startRowRelativePosition < table.getFrozenRowsHeight()) {
|
|
55766
|
-
isNearColHeader = true;
|
|
55767
|
-
}
|
|
55768
|
-
}
|
|
55769
|
-
let isNearBottomColHeader = table.bottomFrozenRowCount
|
|
55770
|
-
? endRow === table.rowCount - table.bottomFrozenRowCount - 1
|
|
55771
|
-
: false;
|
|
55772
|
-
if (!isNearBottomColHeader && table.bottomFrozenRowCount && endRow < table.rowCount - table.bottomFrozenRowCount) {
|
|
55773
|
-
const endRowRelativePosition = table.getRowsHeight(0, endRow) - table.scrollTop;
|
|
55774
|
-
if (endRowRelativePosition > table.tableNoFrameHeight - table.getBottomFrozenRowsHeight()) {
|
|
55775
|
-
isNearBottomColHeader = true;
|
|
55776
|
-
}
|
|
55777
|
-
}
|
|
55778
|
-
const { dynamicUpdateSelectionSize } = table.theme.selectionStyle;
|
|
55779
|
-
if ((isNearRowHeader && (selectComp.rect.attribute.stroke[3] || dynamicUpdateSelectionSize)) ||
|
|
55780
|
-
(isNearRightRowHeader && (selectComp.rect.attribute.stroke[1] || dynamicUpdateSelectionSize)) ||
|
|
55781
|
-
(isNearColHeader && (selectComp.rect.attribute.stroke[0] || dynamicUpdateSelectionSize)) ||
|
|
55782
|
-
(isNearBottomColHeader && (selectComp.rect.attribute.stroke[2] || dynamicUpdateSelectionSize))) {
|
|
55783
|
-
if (isNearRowHeader && selectComp.rect.attribute.stroke[3]) {
|
|
55784
|
-
scene.tableGroup.insertAfter(selectComp.rect, selectComp.role === 'columnHeader'
|
|
55785
|
-
? scene.cornerHeaderGroup
|
|
55786
|
-
: selectComp.role === 'bottomFrozen'
|
|
55787
|
-
? scene.leftBottomCornerGroup
|
|
55788
|
-
: scene.rowHeaderGroup);
|
|
55789
|
-
}
|
|
55790
|
-
if (isNearBottomColHeader && selectComp.rect.attribute.stroke[2]) {
|
|
55791
|
-
scene.tableGroup.insertAfter(selectComp.rect, selectComp.role === 'rowHeader'
|
|
55792
|
-
? scene.leftBottomCornerGroup
|
|
55793
|
-
: selectComp.role === 'rightFrozen'
|
|
55794
|
-
? scene.rightBottomCornerGroup
|
|
55795
|
-
: scene.bottomFrozenGroup);
|
|
55796
|
-
}
|
|
55797
|
-
if (isNearColHeader && selectComp.rect.attribute.stroke[0]) {
|
|
55798
|
-
scene.tableGroup.insertAfter(selectComp.rect, selectComp.role === 'rowHeader'
|
|
55799
|
-
? scene.cornerHeaderGroup
|
|
55800
|
-
: selectComp.role === 'rightFrozen'
|
|
55801
|
-
? scene.rightTopCornerGroup
|
|
55802
|
-
: scene.colHeaderGroup);
|
|
55803
|
-
}
|
|
55804
|
-
if (isNearRightRowHeader && selectComp.rect.attribute.stroke[1]) {
|
|
55805
|
-
scene.tableGroup.insertAfter(selectComp.rect, selectComp.role === 'columnHeader'
|
|
55806
|
-
? scene.rightTopCornerGroup
|
|
55807
|
-
: selectComp.role === 'bottomFrozen'
|
|
55808
|
-
? scene.rightBottomCornerGroup
|
|
55809
|
-
: scene.rightFrozenGroup);
|
|
55810
|
-
}
|
|
55811
|
-
if (selectComp.rect.attribute.x < table.getFrozenColsWidth() &&
|
|
55812
|
-
table.scrollLeft > 0 &&
|
|
55813
|
-
(selectComp.role === 'body' || selectComp.role === 'columnHeader' || selectComp.role === 'bottomFrozen')) {
|
|
55814
|
-
const width = selectComp.rect.attribute.width - (table.getFrozenColsWidth() - selectComp.rect.attribute.x);
|
|
55815
|
-
selectComp.rect.setAttributes({
|
|
55816
|
-
x: selectComp.rect.attribute.x + (table.getFrozenColsWidth() - selectComp.rect.attribute.x),
|
|
55817
|
-
width: width > 0 ? width : 0
|
|
55818
|
-
});
|
|
55819
|
-
selectComp.fillhandle?.setAttributes({
|
|
55820
|
-
visible: width > 0
|
|
55821
|
-
});
|
|
55822
|
-
}
|
|
55823
|
-
if (table.getRightFrozenColsWidth() > 0 &&
|
|
55824
|
-
scene.rightFrozenGroup.attribute.height > 0 &&
|
|
55825
|
-
selectComp.rect.attribute.x + selectComp.rect.attribute.width > scene.rightFrozenGroup.attribute.x &&
|
|
55826
|
-
(selectComp.role === 'body' || selectComp.role === 'columnHeader' || selectComp.role === 'bottomFrozen')) {
|
|
55827
|
-
const width = scene.rightFrozenGroup.attribute.x - selectComp.rect.attribute.x;
|
|
55828
|
-
selectComp.rect.setAttributes({
|
|
55829
|
-
x: selectComp.rect.attribute.x,
|
|
55830
|
-
width: width > 0 ? width : 0
|
|
55831
|
-
});
|
|
55832
|
-
selectComp.fillhandle?.setAttributes({
|
|
55833
|
-
visible: width - colsWidth > 0
|
|
55834
|
-
});
|
|
55835
|
-
}
|
|
55836
|
-
if (selectComp.rect.attribute.y < scene.colHeaderGroup.attribute.height &&
|
|
55837
|
-
table.scrollTop > 0 &&
|
|
55838
|
-
(selectComp.role === 'body' || selectComp.role === 'rowHeader' || selectComp.role === 'rightFrozen')) {
|
|
55839
|
-
const height = selectComp.rect.attribute.height - (scene.colHeaderGroup.attribute.height - selectComp.rect.attribute.y);
|
|
55840
|
-
selectComp.rect.setAttributes({
|
|
55841
|
-
y: selectComp.rect.attribute.y + (scene.colHeaderGroup.attribute.height - selectComp.rect.attribute.y),
|
|
55842
|
-
height: height > 0 ? height : 0
|
|
55843
|
-
});
|
|
55844
|
-
selectComp.fillhandle?.setAttributes({
|
|
55845
|
-
visible: height > 0
|
|
55846
|
-
});
|
|
55847
|
-
}
|
|
55848
|
-
if (scene.bottomFrozenGroup.attribute.width > 0 &&
|
|
55849
|
-
scene.bottomFrozenGroup.attribute.height > 0 &&
|
|
55850
|
-
selectComp.rect.attribute.y + selectComp.rect.attribute.height > scene.bottomFrozenGroup.attribute.y &&
|
|
55851
|
-
(selectComp.role === 'body' || selectComp.role === 'rowHeader' || selectComp.role === 'rightFrozen')) {
|
|
55852
|
-
const height = scene.bottomFrozenGroup.attribute.y - selectComp.rect.attribute.y;
|
|
55853
|
-
selectComp.rect.setAttributes({
|
|
55854
|
-
y: selectComp.rect.attribute.y,
|
|
55855
|
-
height: height > 0 ? height : 0
|
|
55856
|
-
});
|
|
55857
|
-
selectComp.fillhandle?.setAttributes({
|
|
55858
|
-
visible: height - rowsHeight > 0
|
|
55859
|
-
});
|
|
55860
|
-
}
|
|
55861
|
-
}
|
|
55862
|
-
else {
|
|
55863
|
-
scene.tableGroup.insertAfter(selectComp.rect, selectComp.role === 'body'
|
|
55864
|
-
? scene.bodyGroup
|
|
55865
|
-
: selectComp.role === 'columnHeader'
|
|
55866
|
-
? scene.colHeaderGroup
|
|
55867
|
-
: selectComp.role === 'rowHeader'
|
|
55868
|
-
? scene.rowHeaderGroup
|
|
55869
|
-
: selectComp.role === 'cornerHeader'
|
|
55870
|
-
? scene.cornerHeaderGroup
|
|
55871
|
-
: selectComp.role === 'rightTopCorner'
|
|
55872
|
-
? scene.rightTopCornerGroup
|
|
55873
|
-
: selectComp.role === 'rightFrozen'
|
|
55874
|
-
? scene.rightFrozenGroup
|
|
55875
|
-
: selectComp.role === 'leftBottomCorner'
|
|
55876
|
-
? scene.leftBottomCornerGroup
|
|
55877
|
-
: selectComp.role === 'bottomFrozen'
|
|
55878
|
-
? scene.bottomFrozenGroup
|
|
55879
|
-
: scene.rightBottomCornerGroup);
|
|
55880
|
-
}
|
|
55881
56017
|
let diffSize = 0;
|
|
55882
56018
|
if (typeof selectComp.rect.attribute.lineWidth === 'number') {
|
|
55883
56019
|
diffSize = Math.ceil(selectComp.rect.attribute.lineWidth / 2);
|
|
@@ -56121,6 +56257,9 @@
|
|
|
56121
56257
|
const startRow = Math.min(start_Row, end_Row);
|
|
56122
56258
|
const endCol = Math.max(start_Col, end_Col);
|
|
56123
56259
|
const endRow = Math.max(start_Row, end_Row);
|
|
56260
|
+
const overlayGroup = scene.getSelectOverlayGroup(selectRangeType);
|
|
56261
|
+
const offsetX = scene.tableGroup.attribute.x + (overlayGroup.attribute.x ?? 0);
|
|
56262
|
+
const offsetY = scene.tableGroup.attribute.y + (overlayGroup.attribute.y ?? 0);
|
|
56124
56263
|
const firstCellBound = scene.highPerformanceGetCell(startCol, startRow).globalAABBBounds;
|
|
56125
56264
|
const lastCellBound = scene.highPerformanceGetCell(endCol, endRow).globalAABBBounds;
|
|
56126
56265
|
const theme = scene.table.theme;
|
|
@@ -56138,8 +56277,8 @@
|
|
|
56138
56277
|
}
|
|
56139
56278
|
return false;
|
|
56140
56279
|
}),
|
|
56141
|
-
x: firstCellBound.x1 -
|
|
56142
|
-
y: firstCellBound.y1 -
|
|
56280
|
+
x: firstCellBound.x1 - offsetX,
|
|
56281
|
+
y: firstCellBound.y1 - offsetY,
|
|
56143
56282
|
width: 0,
|
|
56144
56283
|
height: 0,
|
|
56145
56284
|
visible: true,
|
|
@@ -56151,8 +56290,8 @@
|
|
|
56151
56290
|
pickable: false,
|
|
56152
56291
|
fill: bodyClickBorderColor,
|
|
56153
56292
|
stroke: bodyClickBorderColor,
|
|
56154
|
-
x: lastCellBound.x2 - 3,
|
|
56155
|
-
y: lastCellBound.y2 - 3,
|
|
56293
|
+
x: lastCellBound.x2 - offsetX - 3,
|
|
56294
|
+
y: lastCellBound.y2 - offsetY - 3,
|
|
56156
56295
|
width: 6,
|
|
56157
56296
|
height: 6,
|
|
56158
56297
|
visible: true
|
|
@@ -56164,41 +56303,10 @@
|
|
|
56164
56303
|
fillhandle,
|
|
56165
56304
|
role: selectRangeType
|
|
56166
56305
|
});
|
|
56167
|
-
|
|
56168
|
-
|
|
56169
|
-
|
|
56170
|
-
|
|
56171
|
-
: selectRangeType === 'rowHeader'
|
|
56172
|
-
? scene.rowHeaderGroup
|
|
56173
|
-
: selectRangeType === 'cornerHeader'
|
|
56174
|
-
? scene.cornerHeaderGroup
|
|
56175
|
-
: selectRangeType === 'rightTopCorner'
|
|
56176
|
-
? scene.rightTopCornerGroup
|
|
56177
|
-
: selectRangeType === 'rightFrozen'
|
|
56178
|
-
? scene.rightFrozenGroup
|
|
56179
|
-
: selectRangeType === 'leftBottomCorner'
|
|
56180
|
-
? scene.leftBottomCornerGroup
|
|
56181
|
-
: selectRangeType === 'bottomFrozen'
|
|
56182
|
-
? scene.bottomFrozenGroup
|
|
56183
|
-
: scene.rightBottomCornerGroup);
|
|
56184
|
-
isHasFillHandleRect &&
|
|
56185
|
-
scene.tableGroup.insertAfter(fillhandle, selectRangeType === 'body'
|
|
56186
|
-
? scene.bodyGroup
|
|
56187
|
-
: selectRangeType === 'columnHeader'
|
|
56188
|
-
? scene.colHeaderGroup
|
|
56189
|
-
: selectRangeType === 'rowHeader'
|
|
56190
|
-
? scene.rowHeaderGroup
|
|
56191
|
-
: selectRangeType === 'cornerHeader'
|
|
56192
|
-
? scene.cornerHeaderGroup
|
|
56193
|
-
: selectRangeType === 'rightTopCorner'
|
|
56194
|
-
? scene.rightTopCornerGroup
|
|
56195
|
-
: selectRangeType === 'rightFrozen'
|
|
56196
|
-
? scene.rightFrozenGroup
|
|
56197
|
-
: selectRangeType === 'leftBottomCorner'
|
|
56198
|
-
? scene.leftBottomCornerGroup
|
|
56199
|
-
: selectRangeType === 'bottomFrozen'
|
|
56200
|
-
? scene.bottomFrozenGroup
|
|
56201
|
-
: scene.rightBottomCornerGroup);
|
|
56306
|
+
overlayGroup.addChild(rect);
|
|
56307
|
+
if (isHasFillHandleRect) {
|
|
56308
|
+
overlayGroup.addChild(fillhandle);
|
|
56309
|
+
}
|
|
56202
56310
|
}
|
|
56203
56311
|
function getCornerRadius(selectRangeType, cornerRadius, start_Col, start_Row, end_Col, end_Row, table) {
|
|
56204
56312
|
if (!cornerRadius) {
|
|
@@ -57805,6 +57913,42 @@
|
|
|
57805
57913
|
const leftBottomCornerGroup = createContainerGroup(0, 0, true);
|
|
57806
57914
|
leftBottomCornerGroup.role = 'corner-left-bottom-header';
|
|
57807
57915
|
scene.leftBottomCornerGroup = leftBottomCornerGroup;
|
|
57916
|
+
const bodySelectGroup = createContainerGroup(width, 0, true);
|
|
57917
|
+
bodySelectGroup.role = 'body';
|
|
57918
|
+
bodySelectGroup.name = 'select-overlay';
|
|
57919
|
+
scene.bodySelectGroup = bodySelectGroup;
|
|
57920
|
+
const rowHeaderSelectGroup = createContainerGroup(0, 0, true);
|
|
57921
|
+
rowHeaderSelectGroup.role = 'row-header';
|
|
57922
|
+
rowHeaderSelectGroup.name = 'select-overlay';
|
|
57923
|
+
scene.rowHeaderSelectGroup = rowHeaderSelectGroup;
|
|
57924
|
+
const bottomFrozenSelectGroup = createContainerGroup(0, 0, true);
|
|
57925
|
+
bottomFrozenSelectGroup.role = 'bottom-frozen';
|
|
57926
|
+
bottomFrozenSelectGroup.name = 'select-overlay';
|
|
57927
|
+
scene.bottomFrozenSelectGroup = bottomFrozenSelectGroup;
|
|
57928
|
+
const colHeaderSelectGroup = createContainerGroup(0, 0, true);
|
|
57929
|
+
colHeaderSelectGroup.role = 'col-header';
|
|
57930
|
+
colHeaderSelectGroup.name = 'select-overlay';
|
|
57931
|
+
scene.colHeaderSelectGroup = colHeaderSelectGroup;
|
|
57932
|
+
const rightFrozenSelectGroup = createContainerGroup(0, 0, true);
|
|
57933
|
+
rightFrozenSelectGroup.role = 'right-frozen';
|
|
57934
|
+
rightFrozenSelectGroup.name = 'select-overlay';
|
|
57935
|
+
scene.rightFrozenSelectGroup = rightFrozenSelectGroup;
|
|
57936
|
+
const rightTopCornerSelectGroup = createContainerGroup(0, 0, true);
|
|
57937
|
+
rightTopCornerSelectGroup.role = 'corner-right-top-header';
|
|
57938
|
+
rightTopCornerSelectGroup.name = 'select-overlay';
|
|
57939
|
+
scene.rightTopCornerSelectGroup = rightTopCornerSelectGroup;
|
|
57940
|
+
const rightBottomCornerSelectGroup = createContainerGroup(0, 0, true);
|
|
57941
|
+
rightBottomCornerSelectGroup.role = 'corner-right-bottom-header';
|
|
57942
|
+
rightBottomCornerSelectGroup.name = 'select-overlay';
|
|
57943
|
+
scene.rightBottomCornerSelectGroup = rightBottomCornerSelectGroup;
|
|
57944
|
+
const leftBottomCornerSelectGroup = createContainerGroup(0, 0, true);
|
|
57945
|
+
leftBottomCornerSelectGroup.role = 'corner-left-bottom-header';
|
|
57946
|
+
leftBottomCornerSelectGroup.name = 'select-overlay';
|
|
57947
|
+
scene.leftBottomCornerSelectGroup = leftBottomCornerSelectGroup;
|
|
57948
|
+
const cornerHeaderSelectGroup = createContainerGroup(0, 0, true);
|
|
57949
|
+
cornerHeaderSelectGroup.role = 'corner-header';
|
|
57950
|
+
cornerHeaderSelectGroup.name = 'select-overlay';
|
|
57951
|
+
scene.cornerHeaderSelectGroup = cornerHeaderSelectGroup;
|
|
57808
57952
|
scene.tableGroup.addChild(bodyGroup);
|
|
57809
57953
|
scene.tableGroup.addChild(rowHeaderGroup);
|
|
57810
57954
|
scene.tableGroup.addChild(bottomFrozenGroup);
|
|
@@ -57814,6 +57958,15 @@
|
|
|
57814
57958
|
scene.tableGroup.addChild(rightTopCornerGroup);
|
|
57815
57959
|
scene.tableGroup.addChild(leftBottomCornerGroup);
|
|
57816
57960
|
scene.tableGroup.addChild(cornerHeaderGroup);
|
|
57961
|
+
scene.tableGroup.addChild(bodySelectGroup);
|
|
57962
|
+
scene.tableGroup.addChild(rowHeaderSelectGroup);
|
|
57963
|
+
scene.tableGroup.addChild(bottomFrozenSelectGroup);
|
|
57964
|
+
scene.tableGroup.addChild(colHeaderSelectGroup);
|
|
57965
|
+
scene.tableGroup.addChild(rightFrozenSelectGroup);
|
|
57966
|
+
scene.tableGroup.addChild(rightBottomCornerSelectGroup);
|
|
57967
|
+
scene.tableGroup.addChild(rightTopCornerSelectGroup);
|
|
57968
|
+
scene.tableGroup.addChild(leftBottomCornerSelectGroup);
|
|
57969
|
+
scene.tableGroup.addChild(cornerHeaderSelectGroup);
|
|
57817
57970
|
scene.tableGroup.addChild(componentGroup);
|
|
57818
57971
|
}
|
|
57819
57972
|
function createContainerGroup(width, height, clip) {
|
|
@@ -58549,6 +58702,15 @@
|
|
|
58549
58702
|
leftBottomCornerGroup;
|
|
58550
58703
|
rightBottomCornerGroup;
|
|
58551
58704
|
componentGroup;
|
|
58705
|
+
bodySelectGroup;
|
|
58706
|
+
rowHeaderSelectGroup;
|
|
58707
|
+
bottomFrozenSelectGroup;
|
|
58708
|
+
colHeaderSelectGroup;
|
|
58709
|
+
rightFrozenSelectGroup;
|
|
58710
|
+
rightTopCornerSelectGroup;
|
|
58711
|
+
leftBottomCornerSelectGroup;
|
|
58712
|
+
rightBottomCornerSelectGroup;
|
|
58713
|
+
cornerHeaderSelectGroup;
|
|
58552
58714
|
selectedRangeComponents;
|
|
58553
58715
|
selectingRangeComponents;
|
|
58554
58716
|
customSelectedRangeComponents;
|
|
@@ -58710,6 +58872,15 @@
|
|
|
58710
58872
|
delete this.rightBottomCornerGroup.border;
|
|
58711
58873
|
this.leftBottomCornerGroup.clear();
|
|
58712
58874
|
delete this.leftBottomCornerGroup.border;
|
|
58875
|
+
this.bodySelectGroup?.clear();
|
|
58876
|
+
this.rowHeaderSelectGroup?.clear();
|
|
58877
|
+
this.bottomFrozenSelectGroup?.clear();
|
|
58878
|
+
this.colHeaderSelectGroup?.clear();
|
|
58879
|
+
this.rightFrozenSelectGroup?.clear();
|
|
58880
|
+
this.rightTopCornerSelectGroup?.clear();
|
|
58881
|
+
this.leftBottomCornerSelectGroup?.clear();
|
|
58882
|
+
this.rightBottomCornerSelectGroup?.clear();
|
|
58883
|
+
this.cornerHeaderSelectGroup?.clear();
|
|
58713
58884
|
this.colHeaderGroup.setAttributes({
|
|
58714
58885
|
x: 0,
|
|
58715
58886
|
y: 0,
|
|
@@ -58767,6 +58938,65 @@
|
|
|
58767
58938
|
height: 0,
|
|
58768
58939
|
visible: false
|
|
58769
58940
|
});
|
|
58941
|
+
this.bodySelectGroup?.setAttributes({
|
|
58942
|
+
x: 0,
|
|
58943
|
+
y: 0,
|
|
58944
|
+
width: 0,
|
|
58945
|
+
height: 0
|
|
58946
|
+
});
|
|
58947
|
+
this.rowHeaderSelectGroup?.setAttributes({
|
|
58948
|
+
x: 0,
|
|
58949
|
+
y: 0,
|
|
58950
|
+
width: 0,
|
|
58951
|
+
height: 0
|
|
58952
|
+
});
|
|
58953
|
+
this.bottomFrozenSelectGroup?.setAttributes({
|
|
58954
|
+
x: 0,
|
|
58955
|
+
y: 0,
|
|
58956
|
+
width: 0,
|
|
58957
|
+
height: 0,
|
|
58958
|
+
visible: false
|
|
58959
|
+
});
|
|
58960
|
+
this.colHeaderSelectGroup?.setAttributes({
|
|
58961
|
+
x: 0,
|
|
58962
|
+
y: 0,
|
|
58963
|
+
width: 0,
|
|
58964
|
+
height: 0
|
|
58965
|
+
});
|
|
58966
|
+
this.rightFrozenSelectGroup?.setAttributes({
|
|
58967
|
+
x: 0,
|
|
58968
|
+
y: 0,
|
|
58969
|
+
width: 0,
|
|
58970
|
+
height: 0,
|
|
58971
|
+
visible: false
|
|
58972
|
+
});
|
|
58973
|
+
this.rightTopCornerSelectGroup?.setAttributes({
|
|
58974
|
+
x: 0,
|
|
58975
|
+
y: 0,
|
|
58976
|
+
width: 0,
|
|
58977
|
+
height: 0,
|
|
58978
|
+
visible: false
|
|
58979
|
+
});
|
|
58980
|
+
this.leftBottomCornerSelectGroup?.setAttributes({
|
|
58981
|
+
x: 0,
|
|
58982
|
+
y: 0,
|
|
58983
|
+
width: 0,
|
|
58984
|
+
height: 0,
|
|
58985
|
+
visible: false
|
|
58986
|
+
});
|
|
58987
|
+
this.rightBottomCornerSelectGroup?.setAttributes({
|
|
58988
|
+
x: 0,
|
|
58989
|
+
y: 0,
|
|
58990
|
+
width: 0,
|
|
58991
|
+
height: 0,
|
|
58992
|
+
visible: false
|
|
58993
|
+
});
|
|
58994
|
+
this.cornerHeaderSelectGroup?.setAttributes({
|
|
58995
|
+
x: 0,
|
|
58996
|
+
y: 0,
|
|
58997
|
+
width: 0,
|
|
58998
|
+
height: 0
|
|
58999
|
+
});
|
|
58770
59000
|
this.tableGroup.setAttributes({
|
|
58771
59001
|
x: this.table.tableX,
|
|
58772
59002
|
y: this.table.tableY,
|
|
@@ -59535,8 +59765,21 @@
|
|
|
59535
59765
|
}
|
|
59536
59766
|
this.bodyGroup.setAttribute('y', this.colHeaderGroup.attribute.height + y);
|
|
59537
59767
|
this.rowHeaderGroup.setAttribute('y', this.cornerHeaderGroup.attribute.height + y);
|
|
59768
|
+
this.bodySelectGroup.setAttribute('y', this.bodyGroup.attribute.y);
|
|
59769
|
+
this.rowHeaderSelectGroup.setAttribute('y', this.rowHeaderGroup.attribute.y);
|
|
59770
|
+
this.colHeaderSelectGroup.setAttribute('y', this.colHeaderGroup.attribute.y);
|
|
59771
|
+
this.cornerHeaderSelectGroup.setAttribute('y', this.cornerHeaderGroup.attribute.y);
|
|
59538
59772
|
if (this.table.rightFrozenColCount > 0) {
|
|
59539
59773
|
this.rightFrozenGroup.setAttribute('y', this.rightTopCornerGroup.attribute.height + y);
|
|
59774
|
+
this.rightFrozenSelectGroup.setAttribute('y', this.rightFrozenGroup.attribute.y);
|
|
59775
|
+
this.rightTopCornerSelectGroup.setAttribute('y', this.rightTopCornerGroup.attribute.y);
|
|
59776
|
+
}
|
|
59777
|
+
if (this.table.bottomFrozenRowCount > 0) {
|
|
59778
|
+
this.bottomFrozenSelectGroup.setAttribute('y', this.bottomFrozenGroup.attribute.y);
|
|
59779
|
+
this.leftBottomCornerSelectGroup.setAttribute('y', this.leftBottomCornerGroup.attribute.y);
|
|
59780
|
+
}
|
|
59781
|
+
if (this.table.rightFrozenColCount > 0 && this.table.bottomFrozenRowCount > 0) {
|
|
59782
|
+
this.rightBottomCornerSelectGroup.setAttribute('y', this.rightBottomCornerGroup.attribute.y);
|
|
59540
59783
|
}
|
|
59541
59784
|
this.updateNextFrame();
|
|
59542
59785
|
}
|
|
@@ -59563,8 +59806,21 @@
|
|
|
59563
59806
|
}
|
|
59564
59807
|
this.bodyGroup.setAttribute('x', this.table.getFrozenColsWidth() + x);
|
|
59565
59808
|
this.colHeaderGroup.setAttribute('x', this.table.getFrozenColsWidth() + x);
|
|
59809
|
+
this.bodySelectGroup.setAttribute('x', this.bodyGroup.attribute.x);
|
|
59810
|
+
this.colHeaderSelectGroup.setAttribute('x', this.colHeaderGroup.attribute.x);
|
|
59811
|
+
this.rowHeaderSelectGroup.setAttribute('x', this.rowHeaderGroup.attribute.x);
|
|
59812
|
+
this.cornerHeaderSelectGroup.setAttribute('x', this.cornerHeaderGroup.attribute.x);
|
|
59566
59813
|
if (this.table.bottomFrozenRowCount > 0) {
|
|
59567
59814
|
this.bottomFrozenGroup.setAttribute('x', this.table.getFrozenColsWidth() + x);
|
|
59815
|
+
this.bottomFrozenSelectGroup.setAttribute('x', this.bottomFrozenGroup.attribute.x);
|
|
59816
|
+
this.leftBottomCornerSelectGroup.setAttribute('x', this.leftBottomCornerGroup.attribute.x);
|
|
59817
|
+
}
|
|
59818
|
+
if (this.table.rightFrozenColCount > 0) {
|
|
59819
|
+
this.rightFrozenSelectGroup.setAttribute('x', this.rightFrozenGroup.attribute.x);
|
|
59820
|
+
this.rightTopCornerSelectGroup.setAttribute('x', this.rightTopCornerGroup.attribute.x);
|
|
59821
|
+
}
|
|
59822
|
+
if (this.table.rightFrozenColCount > 0 && this.table.bottomFrozenRowCount > 0) {
|
|
59823
|
+
this.rightBottomCornerSelectGroup.setAttribute('x', this.rightBottomCornerGroup.attribute.x);
|
|
59568
59824
|
}
|
|
59569
59825
|
this.updateNextFrame();
|
|
59570
59826
|
}
|
|
@@ -59594,6 +59850,9 @@
|
|
|
59594
59850
|
if (this.table.options.menu?.contextMenuWorkOnlyCell === false) {
|
|
59595
59851
|
this.canvasShowMenu();
|
|
59596
59852
|
}
|
|
59853
|
+
if (this.table.stateManager.select.ranges?.length) {
|
|
59854
|
+
this.recreateAllSelectRangeComponents();
|
|
59855
|
+
}
|
|
59597
59856
|
this.updateNextFrame();
|
|
59598
59857
|
}
|
|
59599
59858
|
dealWidthMode() {
|
|
@@ -59779,8 +60038,12 @@
|
|
|
59779
60038
|
moveHeaderPosition(updateColStart, updateColEnd, updateRowStart, updateRowEnd, moveType, this.table);
|
|
59780
60039
|
}
|
|
59781
60040
|
updateContainerAttrWidthAndX() {
|
|
59782
|
-
const
|
|
59783
|
-
const
|
|
60041
|
+
const frozenStartX = -(this.table.getFrozenColsScrollLeft?.() ?? 0);
|
|
60042
|
+
const frozenViewportWidth = this.table.getFrozenColsWidth();
|
|
60043
|
+
const rightFrozenStartX = -this.table.getRightFrozenColsOffset() + (this.table.getRightFrozenColsScrollLeft?.() ?? 0);
|
|
60044
|
+
const rightFrozenContentWidth = this.table.getRightFrozenColsContentWidth();
|
|
60045
|
+
updateContainerChildrenX(this.cornerHeaderGroup, frozenStartX);
|
|
60046
|
+
updateContainerChildrenX(this.rowHeaderGroup, frozenStartX);
|
|
59784
60047
|
const colHeaderX = this.colHeaderGroup.hasChildNodes() && this.colHeaderGroup.firstChild
|
|
59785
60048
|
? updateContainerChildrenX(this.colHeaderGroup, this.colHeaderGroup.firstChild.col > 0
|
|
59786
60049
|
? this.table.getColsWidth(this.table.frozenColCount ?? 0, this.colHeaderGroup.firstChild.col - 1)
|
|
@@ -59791,28 +60054,44 @@
|
|
|
59791
60054
|
? this.table.getColsWidth(this.table.frozenColCount ?? 0, this.bodyGroup.firstChild.col - 1)
|
|
59792
60055
|
: 0)
|
|
59793
60056
|
: 0;
|
|
59794
|
-
|
|
60057
|
+
if (this.rightFrozenGroup.childrenCount > 0) {
|
|
60058
|
+
updateContainerChildrenX(this.rightFrozenGroup, rightFrozenStartX);
|
|
60059
|
+
}
|
|
59795
60060
|
this.bottomFrozenGroup.hasChildNodes() &&
|
|
59796
60061
|
this.bottomFrozenGroup.firstChild &&
|
|
59797
60062
|
updateContainerChildrenX(this.bottomFrozenGroup, this.bottomFrozenGroup.firstChild.col > 0
|
|
59798
60063
|
? this.table.getColsWidth(this.table.frozenColCount ?? 0, this.bottomFrozenGroup.firstChild.col - 1)
|
|
59799
60064
|
: 0);
|
|
59800
|
-
updateContainerChildrenX(this.leftBottomCornerGroup,
|
|
59801
|
-
updateContainerChildrenX(this.rightTopCornerGroup,
|
|
59802
|
-
updateContainerChildrenX(this.rightBottomCornerGroup,
|
|
59803
|
-
this.cornerHeaderGroup.setDeltaWidth(
|
|
59804
|
-
this.leftBottomCornerGroup.setDeltaWidth(
|
|
60065
|
+
updateContainerChildrenX(this.leftBottomCornerGroup, frozenStartX);
|
|
60066
|
+
updateContainerChildrenX(this.rightTopCornerGroup, rightFrozenStartX);
|
|
60067
|
+
updateContainerChildrenX(this.rightBottomCornerGroup, rightFrozenStartX);
|
|
60068
|
+
this.cornerHeaderGroup.setDeltaWidth(frozenViewportWidth - this.cornerHeaderGroup.attribute.width);
|
|
60069
|
+
this.leftBottomCornerGroup.setDeltaWidth(frozenViewportWidth - this.leftBottomCornerGroup.attribute.width);
|
|
59805
60070
|
this.colHeaderGroup.setDeltaWidth(colHeaderX - this.colHeaderGroup.attribute.width);
|
|
59806
|
-
this.rowHeaderGroup.setDeltaWidth(
|
|
60071
|
+
this.rowHeaderGroup.setDeltaWidth(frozenViewportWidth - this.rowHeaderGroup.attribute.width);
|
|
59807
60072
|
this.bottomFrozenGroup.setDeltaWidth(colHeaderX - this.bottomFrozenGroup.attribute.width);
|
|
59808
|
-
this.rightFrozenGroup.setDeltaWidth(
|
|
59809
|
-
this.rightTopCornerGroup.setDeltaWidth(
|
|
59810
|
-
this.rightBottomCornerGroup.setDeltaWidth(
|
|
60073
|
+
this.rightFrozenGroup.setDeltaWidth(rightFrozenContentWidth - this.rightFrozenGroup.attribute.width);
|
|
60074
|
+
this.rightTopCornerGroup.setDeltaWidth(rightFrozenContentWidth - this.rightTopCornerGroup.attribute.width);
|
|
60075
|
+
this.rightBottomCornerGroup.setDeltaWidth(rightFrozenContentWidth - this.rightBottomCornerGroup.attribute.width);
|
|
59811
60076
|
this.bodyGroup.setDeltaWidth(bodyX - this.bodyGroup.attribute.width);
|
|
59812
60077
|
this.colHeaderGroup.setAttribute('x', this.cornerHeaderGroup.attribute.width);
|
|
59813
60078
|
this.bottomFrozenGroup.setAttribute('x', this.table.getFrozenColsWidth());
|
|
59814
60079
|
this.bodyGroup.setAttribute('x', this.rowHeaderGroup.attribute.width);
|
|
59815
60080
|
}
|
|
60081
|
+
setFrozenColsScrollLeft(left) {
|
|
60082
|
+
const frozenStartX = -left;
|
|
60083
|
+
updateContainerChildrenX(this.cornerHeaderGroup, frozenStartX);
|
|
60084
|
+
updateContainerChildrenX(this.rowHeaderGroup, frozenStartX);
|
|
60085
|
+
updateContainerChildrenX(this.leftBottomCornerGroup, frozenStartX);
|
|
60086
|
+
this.updateNextFrame();
|
|
60087
|
+
}
|
|
60088
|
+
setRightFrozenColsScrollLeft(left) {
|
|
60089
|
+
const rightStartX = -this.table.getRightFrozenColsOffset() + left;
|
|
60090
|
+
updateContainerChildrenX(this.rightFrozenGroup, rightStartX);
|
|
60091
|
+
updateContainerChildrenX(this.rightTopCornerGroup, rightStartX);
|
|
60092
|
+
updateContainerChildrenX(this.rightBottomCornerGroup, rightStartX);
|
|
60093
|
+
this.updateNextFrame();
|
|
60094
|
+
}
|
|
59816
60095
|
updateContainerAttrHeightAndY() {
|
|
59817
60096
|
for (let i = 0; i < this.cornerHeaderGroup.children.length; i++) {
|
|
59818
60097
|
updateContainerChildrenY(this.cornerHeaderGroup.children[i], 0);
|
|
@@ -59875,9 +60154,94 @@
|
|
|
59875
60154
|
this.updateContainerAttrHeightAndY();
|
|
59876
60155
|
}
|
|
59877
60156
|
this.updateTableSize();
|
|
60157
|
+
this.syncSelectOverlayGroups();
|
|
59878
60158
|
this.component.updateScrollBar();
|
|
59879
60159
|
this.updateNextFrame();
|
|
59880
60160
|
}
|
|
60161
|
+
syncSelectOverlayGroups() {
|
|
60162
|
+
this.bodySelectGroup.setAttributes({
|
|
60163
|
+
x: this.bodyGroup.attribute.x,
|
|
60164
|
+
y: this.bodyGroup.attribute.y,
|
|
60165
|
+
width: this.bodyGroup.attribute.width,
|
|
60166
|
+
height: this.bodyGroup.attribute.height
|
|
60167
|
+
});
|
|
60168
|
+
this.rowHeaderSelectGroup.setAttributes({
|
|
60169
|
+
x: this.rowHeaderGroup.attribute.x,
|
|
60170
|
+
y: this.rowHeaderGroup.attribute.y,
|
|
60171
|
+
width: this.rowHeaderGroup.attribute.width,
|
|
60172
|
+
height: this.rowHeaderGroup.attribute.height
|
|
60173
|
+
});
|
|
60174
|
+
this.colHeaderSelectGroup.setAttributes({
|
|
60175
|
+
x: this.colHeaderGroup.attribute.x,
|
|
60176
|
+
y: this.colHeaderGroup.attribute.y,
|
|
60177
|
+
width: this.colHeaderGroup.attribute.width,
|
|
60178
|
+
height: this.colHeaderGroup.attribute.height
|
|
60179
|
+
});
|
|
60180
|
+
this.cornerHeaderSelectGroup.setAttributes({
|
|
60181
|
+
x: this.cornerHeaderGroup.attribute.x,
|
|
60182
|
+
y: this.cornerHeaderGroup.attribute.y,
|
|
60183
|
+
width: this.cornerHeaderGroup.attribute.width,
|
|
60184
|
+
height: this.cornerHeaderGroup.attribute.height
|
|
60185
|
+
});
|
|
60186
|
+
this.rightFrozenSelectGroup.setAttributes({
|
|
60187
|
+
x: this.rightFrozenGroup.attribute.x,
|
|
60188
|
+
y: this.rightFrozenGroup.attribute.y,
|
|
60189
|
+
width: this.rightFrozenGroup.attribute.width,
|
|
60190
|
+
height: this.rightFrozenGroup.attribute.height,
|
|
60191
|
+
visible: this.rightFrozenGroup.attribute.visible
|
|
60192
|
+
});
|
|
60193
|
+
this.bottomFrozenSelectGroup.setAttributes({
|
|
60194
|
+
x: this.bottomFrozenGroup.attribute.x,
|
|
60195
|
+
y: this.bottomFrozenGroup.attribute.y,
|
|
60196
|
+
width: this.bottomFrozenGroup.attribute.width,
|
|
60197
|
+
height: this.bottomFrozenGroup.attribute.height,
|
|
60198
|
+
visible: this.bottomFrozenGroup.attribute.visible
|
|
60199
|
+
});
|
|
60200
|
+
this.rightTopCornerSelectGroup.setAttributes({
|
|
60201
|
+
x: this.rightTopCornerGroup.attribute.x,
|
|
60202
|
+
y: this.rightTopCornerGroup.attribute.y,
|
|
60203
|
+
width: this.rightTopCornerGroup.attribute.width,
|
|
60204
|
+
height: this.rightTopCornerGroup.attribute.height,
|
|
60205
|
+
visible: this.rightTopCornerGroup.attribute.visible
|
|
60206
|
+
});
|
|
60207
|
+
this.leftBottomCornerSelectGroup.setAttributes({
|
|
60208
|
+
x: this.leftBottomCornerGroup.attribute.x,
|
|
60209
|
+
y: this.leftBottomCornerGroup.attribute.y,
|
|
60210
|
+
width: this.leftBottomCornerGroup.attribute.width,
|
|
60211
|
+
height: this.leftBottomCornerGroup.attribute.height,
|
|
60212
|
+
visible: this.leftBottomCornerGroup.attribute.visible
|
|
60213
|
+
});
|
|
60214
|
+
this.rightBottomCornerSelectGroup.setAttributes({
|
|
60215
|
+
x: this.rightBottomCornerGroup.attribute.x,
|
|
60216
|
+
y: this.rightBottomCornerGroup.attribute.y,
|
|
60217
|
+
width: this.rightBottomCornerGroup.attribute.width,
|
|
60218
|
+
height: this.rightBottomCornerGroup.attribute.height,
|
|
60219
|
+
visible: this.rightBottomCornerGroup.attribute.visible
|
|
60220
|
+
});
|
|
60221
|
+
}
|
|
60222
|
+
getSelectOverlayGroup(selectRangeType) {
|
|
60223
|
+
switch (selectRangeType) {
|
|
60224
|
+
case 'body':
|
|
60225
|
+
return this.bodySelectGroup;
|
|
60226
|
+
case 'rowHeader':
|
|
60227
|
+
return this.rowHeaderSelectGroup;
|
|
60228
|
+
case 'bottomFrozen':
|
|
60229
|
+
return this.bottomFrozenSelectGroup;
|
|
60230
|
+
case 'columnHeader':
|
|
60231
|
+
return this.colHeaderSelectGroup;
|
|
60232
|
+
case 'rightFrozen':
|
|
60233
|
+
return this.rightFrozenSelectGroup;
|
|
60234
|
+
case 'rightTopCorner':
|
|
60235
|
+
return this.rightTopCornerSelectGroup;
|
|
60236
|
+
case 'leftBottomCorner':
|
|
60237
|
+
return this.leftBottomCornerSelectGroup;
|
|
60238
|
+
case 'rightBottomCorner':
|
|
60239
|
+
return this.rightBottomCornerSelectGroup;
|
|
60240
|
+
case 'cornerHeader':
|
|
60241
|
+
default:
|
|
60242
|
+
return this.cornerHeaderSelectGroup;
|
|
60243
|
+
}
|
|
60244
|
+
}
|
|
59881
60245
|
updateCellContentWhileResize(col, row) {
|
|
59882
60246
|
const isVtableMerge = this.table.getCellRawRecord(col, row)?.vtableMerge;
|
|
59883
60247
|
const type = isVtableMerge ? 'text' : this.table.getCellType(col, row);
|
|
@@ -62439,6 +62803,9 @@
|
|
|
62439
62803
|
const startRow = Math.min(start_Row, end_Row);
|
|
62440
62804
|
const endCol = Math.max(start_Col, end_Col);
|
|
62441
62805
|
const endRow = Math.max(start_Row, end_Row);
|
|
62806
|
+
const overlayGroup = scene.getSelectOverlayGroup(selectRangeType);
|
|
62807
|
+
const offsetX = scene.tableGroup.attribute.x + (overlayGroup.attribute.x ?? 0);
|
|
62808
|
+
const offsetY = scene.tableGroup.attribute.y + (overlayGroup.attribute.y ?? 0);
|
|
62442
62809
|
const firstCellBound = scene.highPerformanceGetCell(startCol, startRow).globalAABBBounds;
|
|
62443
62810
|
const rect = createRect({
|
|
62444
62811
|
pickable: false,
|
|
@@ -62451,8 +62818,8 @@
|
|
|
62451
62818
|
}
|
|
62452
62819
|
return false;
|
|
62453
62820
|
}),
|
|
62454
|
-
x: firstCellBound.x1 -
|
|
62455
|
-
y: firstCellBound.y1 -
|
|
62821
|
+
x: firstCellBound.x1 - offsetX,
|
|
62822
|
+
y: firstCellBound.y1 - offsetY,
|
|
62456
62823
|
width: 0,
|
|
62457
62824
|
height: 0,
|
|
62458
62825
|
visible: true,
|
|
@@ -62462,23 +62829,7 @@
|
|
|
62462
62829
|
rect,
|
|
62463
62830
|
role: selectRangeType
|
|
62464
62831
|
});
|
|
62465
|
-
|
|
62466
|
-
? scene.bodyGroup
|
|
62467
|
-
: selectRangeType === 'columnHeader'
|
|
62468
|
-
? scene.colHeaderGroup
|
|
62469
|
-
: selectRangeType === 'rowHeader'
|
|
62470
|
-
? scene.rowHeaderGroup
|
|
62471
|
-
: selectRangeType === 'cornerHeader'
|
|
62472
|
-
? scene.cornerHeaderGroup
|
|
62473
|
-
: selectRangeType === 'rightTopCorner'
|
|
62474
|
-
? scene.rightTopCornerGroup
|
|
62475
|
-
: selectRangeType === 'rightFrozen'
|
|
62476
|
-
? scene.rightFrozenGroup
|
|
62477
|
-
: selectRangeType === 'leftBottomCorner'
|
|
62478
|
-
? scene.leftBottomCornerGroup
|
|
62479
|
-
: selectRangeType === 'bottomFrozen'
|
|
62480
|
-
? scene.bottomFrozenGroup
|
|
62481
|
-
: scene.rightBottomCornerGroup);
|
|
62832
|
+
overlayGroup.addChild(rect);
|
|
62482
62833
|
}
|
|
62483
62834
|
|
|
62484
62835
|
function deletaCustomSelectRanges(state) {
|
|
@@ -62534,6 +62885,8 @@
|
|
|
62534
62885
|
this.initState();
|
|
62535
62886
|
this.updateVerticalScrollBar = this.updateVerticalScrollBar.bind(this);
|
|
62536
62887
|
this.updateHorizontalScrollBar = this.updateHorizontalScrollBar.bind(this);
|
|
62888
|
+
this.updateFrozenHorizontalScrollBar = this.updateFrozenHorizontalScrollBar.bind(this);
|
|
62889
|
+
this.updateRightFrozenHorizontalScrollBar = this.updateRightFrozenHorizontalScrollBar.bind(this);
|
|
62537
62890
|
}
|
|
62538
62891
|
initState() {
|
|
62539
62892
|
this._initState();
|
|
@@ -62681,7 +63034,9 @@
|
|
|
62681
63034
|
};
|
|
62682
63035
|
this.scroll = {
|
|
62683
63036
|
horizontalBarPos: 0,
|
|
62684
|
-
verticalBarPos: 0
|
|
63037
|
+
verticalBarPos: 0,
|
|
63038
|
+
frozenHorizontalBarPos: 0,
|
|
63039
|
+
rightFrozenHorizontalBarPos: 0
|
|
62685
63040
|
};
|
|
62686
63041
|
this.tablePosition = {
|
|
62687
63042
|
absoluteX: 0,
|
|
@@ -63099,7 +63454,13 @@
|
|
|
63099
63454
|
const frozenWidth = this.table.getColsWidth(0, originalFrozenColCount - 1);
|
|
63100
63455
|
const maxFrozenWidth = this.table._getMaxFrozenWidth();
|
|
63101
63456
|
if (frozenWidth > maxFrozenWidth) {
|
|
63102
|
-
if (this.table.
|
|
63457
|
+
if (this.table.options.scrollFrozenCols) {
|
|
63458
|
+
if (this.table.frozenColCount !== originalFrozenColCount) {
|
|
63459
|
+
this.table._setFrozenColCount(originalFrozenColCount);
|
|
63460
|
+
this.setFrozenCol(originalFrozenColCount);
|
|
63461
|
+
}
|
|
63462
|
+
}
|
|
63463
|
+
else if (this.table.internalProps.unfreezeAllOnExceedsMaxWidth) {
|
|
63103
63464
|
this.table._setFrozenColCount(0);
|
|
63104
63465
|
this.setFrozenCol(-1);
|
|
63105
63466
|
}
|
|
@@ -63113,11 +63474,69 @@
|
|
|
63113
63474
|
this.table._setFrozenColCount(originalFrozenColCount);
|
|
63114
63475
|
this.setFrozenCol(originalFrozenColCount);
|
|
63115
63476
|
}
|
|
63477
|
+
if (!this.table.options.scrollFrozenCols || this.table.getFrozenColsOffset() === 0) {
|
|
63478
|
+
this.setFrozenColsScrollLeft(0, false);
|
|
63479
|
+
}
|
|
63480
|
+
else {
|
|
63481
|
+
this.setFrozenColsScrollLeft(this.scroll.frozenHorizontalBarPos, false);
|
|
63482
|
+
}
|
|
63483
|
+
if (!this.table.options.scrollRightFrozenCols || this.table.getRightFrozenColsOffset() === 0) {
|
|
63484
|
+
this.setRightFrozenColsScrollLeft(0, false);
|
|
63485
|
+
}
|
|
63486
|
+
else {
|
|
63487
|
+
this.setRightFrozenColsScrollLeft(this.scroll.rightFrozenHorizontalBarPos, false);
|
|
63488
|
+
}
|
|
63116
63489
|
}
|
|
63117
63490
|
else {
|
|
63118
63491
|
this.clearFrozenObserver();
|
|
63119
63492
|
}
|
|
63120
63493
|
}
|
|
63494
|
+
setFrozenColsScrollLeft(left, triggerRender = true) {
|
|
63495
|
+
if (!this.table || !this.table.scenegraph) {
|
|
63496
|
+
return;
|
|
63497
|
+
}
|
|
63498
|
+
const maxScrollLeft = this.table.getFrozenColsOffset();
|
|
63499
|
+
left = Math.max(0, Math.min(left, maxScrollLeft));
|
|
63500
|
+
left = Math.ceil(left);
|
|
63501
|
+
if (this.scroll.frozenHorizontalBarPos === left) {
|
|
63502
|
+
return;
|
|
63503
|
+
}
|
|
63504
|
+
this.scroll.frozenHorizontalBarPos = left;
|
|
63505
|
+
const ratio = maxScrollLeft ? left / maxScrollLeft : 0;
|
|
63506
|
+
this.table.scenegraph.component.updateFrozenHorizontalScrollBarPos(ratio);
|
|
63507
|
+
triggerRender && this.table.scenegraph.setFrozenColsScrollLeft(left);
|
|
63508
|
+
}
|
|
63509
|
+
setRightFrozenColsScrollLeft(left, triggerRender = true) {
|
|
63510
|
+
if (!this.table || !this.table.scenegraph) {
|
|
63511
|
+
return;
|
|
63512
|
+
}
|
|
63513
|
+
const maxScrollLeft = this.table.getRightFrozenColsOffset();
|
|
63514
|
+
left = Math.max(0, Math.min(left, maxScrollLeft));
|
|
63515
|
+
left = Math.ceil(left);
|
|
63516
|
+
if (this.scroll.rightFrozenHorizontalBarPos === left) {
|
|
63517
|
+
return;
|
|
63518
|
+
}
|
|
63519
|
+
this.scroll.rightFrozenHorizontalBarPos = left;
|
|
63520
|
+
const ratio = maxScrollLeft ? 1 - left / maxScrollLeft : 1;
|
|
63521
|
+
this.table.scenegraph.component.updateRightFrozenHorizontalScrollBarPos(ratio);
|
|
63522
|
+
triggerRender && this.table.scenegraph.setRightFrozenColsScrollLeft(left);
|
|
63523
|
+
}
|
|
63524
|
+
updateFrozenHorizontalScrollBar(xRatio) {
|
|
63525
|
+
const maxScrollLeft = this.table.getFrozenColsOffset?.() ?? 0;
|
|
63526
|
+
let left = Math.ceil(xRatio * maxScrollLeft);
|
|
63527
|
+
if (!isValid$1(left) || isNaN(left)) {
|
|
63528
|
+
left = 0;
|
|
63529
|
+
}
|
|
63530
|
+
this.setFrozenColsScrollLeft(left, true);
|
|
63531
|
+
}
|
|
63532
|
+
updateRightFrozenHorizontalScrollBar(xRatio) {
|
|
63533
|
+
const maxScrollLeft = this.table.getRightFrozenColsOffset?.() ?? 0;
|
|
63534
|
+
let left = Math.ceil((1 - xRatio) * maxScrollLeft);
|
|
63535
|
+
if (!isValid$1(left) || isNaN(left)) {
|
|
63536
|
+
left = 0;
|
|
63537
|
+
}
|
|
63538
|
+
this.setRightFrozenColsScrollLeft(left, true);
|
|
63539
|
+
}
|
|
63121
63540
|
clearFrozenObserver() {
|
|
63122
63541
|
if (this._frozenObserver) {
|
|
63123
63542
|
this._frozenObserver.disconnect();
|
|
@@ -63219,7 +63638,10 @@
|
|
|
63219
63638
|
updateHorizontalScrollBar(xRatio) {
|
|
63220
63639
|
const totalWidth = this.table.getAllColsWidth();
|
|
63221
63640
|
const oldHorizontalBarPos = this.scroll.horizontalBarPos;
|
|
63222
|
-
|
|
63641
|
+
const frozenOffset = this.table.getFrozenColsOffset?.() ?? 0;
|
|
63642
|
+
const rightFrozenOffset = this.table.getRightFrozenColsOffset?.() ?? 0;
|
|
63643
|
+
const scrollRange = Math.max(0, totalWidth - this.table.scenegraph.width - frozenOffset - rightFrozenOffset);
|
|
63644
|
+
let horizontalBarPos = Math.ceil(xRatio * scrollRange);
|
|
63223
63645
|
if (!isValid$1(horizontalBarPos) || isNaN(horizontalBarPos)) {
|
|
63224
63646
|
horizontalBarPos = 0;
|
|
63225
63647
|
}
|
|
@@ -63237,7 +63659,7 @@
|
|
|
63237
63659
|
dx: dx
|
|
63238
63660
|
});
|
|
63239
63661
|
if (canScroll.some(value => value === false)) {
|
|
63240
|
-
const xRatio = this.scroll.horizontalBarPos /
|
|
63662
|
+
const xRatio = scrollRange ? this.scroll.horizontalBarPos / scrollRange : 0;
|
|
63241
63663
|
this.table.scenegraph.component.updateHorizontalScrollBarPos(xRatio);
|
|
63242
63664
|
return;
|
|
63243
63665
|
}
|
|
@@ -63329,12 +63751,14 @@
|
|
|
63329
63751
|
}
|
|
63330
63752
|
this.table.scrollLeft;
|
|
63331
63753
|
const totalWidth = this.table.getAllColsWidth();
|
|
63332
|
-
this.table.
|
|
63754
|
+
const frozenOffset = this.table.getFrozenColsOffset?.() ?? 0;
|
|
63755
|
+
const rightFrozenOffset = this.table.getRightFrozenColsOffset?.() ?? 0;
|
|
63756
|
+
const scrollRange = Math.max(0, totalWidth - this.table.scenegraph.width - frozenOffset - rightFrozenOffset);
|
|
63333
63757
|
const sizeTolerance = this.table.options.customConfig?._disableColumnAndRowSizeRound ? 1 : 0;
|
|
63334
|
-
left = Math.max(0, Math.min(left,
|
|
63758
|
+
left = Math.max(0, Math.min(left, scrollRange - sizeTolerance));
|
|
63335
63759
|
left = Math.ceil(left);
|
|
63336
63760
|
const oldHorizontalBarPos = this.scroll.horizontalBarPos;
|
|
63337
|
-
const xRatio = left /
|
|
63761
|
+
const xRatio = scrollRange ? left / scrollRange : 0;
|
|
63338
63762
|
if ((oldHorizontalBarPos !== left || this.table.options?.customConfig?.scrollEventAlwaysTrigger === true) &&
|
|
63339
63763
|
triggerEvent) {
|
|
63340
63764
|
let horizontalBarPos = left;
|
|
@@ -63355,7 +63779,7 @@
|
|
|
63355
63779
|
dx
|
|
63356
63780
|
});
|
|
63357
63781
|
if (canScroll.some(value => value === false)) {
|
|
63358
|
-
const xRatio = this.scroll.horizontalBarPos /
|
|
63782
|
+
const xRatio = scrollRange ? this.scroll.horizontalBarPos / scrollRange : 0;
|
|
63359
63783
|
this.table.scenegraph.component.updateHorizontalScrollBarPos(xRatio);
|
|
63360
63784
|
return;
|
|
63361
63785
|
}
|
|
@@ -63391,8 +63815,8 @@
|
|
|
63391
63815
|
}
|
|
63392
63816
|
showVerticalScrollBar(autoHide) {
|
|
63393
63817
|
this.table.scenegraph.component.showVerticalScrollBar();
|
|
63818
|
+
clearTimeout(this._clearVerticalScrollBar);
|
|
63394
63819
|
if (autoHide) {
|
|
63395
|
-
clearTimeout(this._clearVerticalScrollBar);
|
|
63396
63820
|
this._clearVerticalScrollBar = setTimeout(() => {
|
|
63397
63821
|
this.table.scenegraph?.component.hideVerticalScrollBar();
|
|
63398
63822
|
}, 1000);
|
|
@@ -63401,11 +63825,11 @@
|
|
|
63401
63825
|
hideHorizontalScrollBar() {
|
|
63402
63826
|
this.table.scenegraph.component.hideHorizontalScrollBar();
|
|
63403
63827
|
}
|
|
63404
|
-
showHorizontalScrollBar(autoHide) {
|
|
63405
|
-
this.table.scenegraph.component.showHorizontalScrollBar();
|
|
63828
|
+
showHorizontalScrollBar(autoHide, target = 'all') {
|
|
63829
|
+
this.table.scenegraph.component.showHorizontalScrollBar(target);
|
|
63406
63830
|
this.table.scenegraph?.component.showFrozenColumnShadow();
|
|
63831
|
+
clearTimeout(this._clearHorizontalScrollBar);
|
|
63407
63832
|
if (autoHide) {
|
|
63408
|
-
clearTimeout(this._clearHorizontalScrollBar);
|
|
63409
63833
|
this._clearHorizontalScrollBar = setTimeout(() => {
|
|
63410
63834
|
this.table.scenegraph?.component.hideFrozenColumnShadow();
|
|
63411
63835
|
this.table.scenegraph?.component.hideHorizontalScrollBar();
|
|
@@ -63982,21 +64406,100 @@
|
|
|
63982
64406
|
state.updateInteractionState(InteractionState.scrolling);
|
|
63983
64407
|
}
|
|
63984
64408
|
}
|
|
63985
|
-
const
|
|
64409
|
+
const visible1 = state.table.theme.scrollStyle?.visible;
|
|
64410
|
+
const horizontalVisible = state.table.theme.scrollStyle?.horizontalVisible ?? visible1;
|
|
64411
|
+
const verticalVisible = state.table.theme.scrollStyle?.verticalVisible ?? visible1;
|
|
64412
|
+
const horizontalAutoHide = horizontalVisible === 'scrolling';
|
|
64413
|
+
const verticalAutoHide = verticalVisible === 'scrolling';
|
|
64414
|
+
let usedFrozenHorizontal = false;
|
|
64415
|
+
let usedRightFrozenHorizontal = false;
|
|
64416
|
+
let blockedFrozenHorizontal = false;
|
|
64417
|
+
let blockedRightFrozenHorizontal = false;
|
|
63986
64418
|
if (optimizedDeltaX) {
|
|
63987
|
-
|
|
63988
|
-
|
|
64419
|
+
const pxEvent = event.x;
|
|
64420
|
+
const pyEvent = event.y;
|
|
64421
|
+
const pxFallback = state.table.eventManager?.LastBodyPointerXY?.x;
|
|
64422
|
+
const pyFallback = state.table.eventManager?.LastBodyPointerXY?.y;
|
|
64423
|
+
const px = typeof pxEvent === 'number' ? pxEvent : pxFallback;
|
|
64424
|
+
const py = typeof pyEvent === 'number' ? pyEvent : pyFallback;
|
|
64425
|
+
const relativeX = typeof px === 'number' ? px - state.table.tableX : NaN;
|
|
64426
|
+
const relativeY = typeof py === 'number' ? py - state.table.tableY : NaN;
|
|
64427
|
+
const isInTable = isFinite(relativeX) &&
|
|
64428
|
+
isFinite(relativeY) &&
|
|
64429
|
+
relativeX >= 0 &&
|
|
64430
|
+
relativeY >= 0 &&
|
|
64431
|
+
relativeX <= state.table.tableNoFrameWidth &&
|
|
64432
|
+
relativeY <= state.table.tableNoFrameHeight;
|
|
64433
|
+
const frozenColsScrollable = state.table.options.scrollFrozenCols && state.table.getFrozenColsOffset() > 0;
|
|
64434
|
+
const rightFrozenColsScrollable = state.table.options.scrollRightFrozenCols && state.table.getRightFrozenColsOffset() > 0;
|
|
64435
|
+
const isInFrozenViewport = isInTable && relativeX > 0 && relativeX < state.table.getFrozenColsWidth();
|
|
64436
|
+
const isInRightFrozenViewport = isInTable && relativeX > state.table.tableNoFrameWidth - state.table.getRightFrozenColsWidth();
|
|
64437
|
+
if (frozenColsScrollable && isInFrozenViewport) {
|
|
64438
|
+
const maxFrozenScrollLeft = state.table.getFrozenColsOffset();
|
|
64439
|
+
const nextFrozenScrollLeft = state.scroll.frozenHorizontalBarPos + optimizedDeltaX;
|
|
64440
|
+
const canScrollFrozen = (optimizedDeltaX < 0 && state.scroll.frozenHorizontalBarPos > 0) ||
|
|
64441
|
+
(optimizedDeltaX > 0 && state.scroll.frozenHorizontalBarPos < maxFrozenScrollLeft);
|
|
64442
|
+
if (canScrollFrozen) {
|
|
64443
|
+
state.setFrozenColsScrollLeft(nextFrozenScrollLeft);
|
|
64444
|
+
usedFrozenHorizontal = true;
|
|
64445
|
+
state.showHorizontalScrollBar(horizontalAutoHide, 'frozen');
|
|
64446
|
+
}
|
|
64447
|
+
else {
|
|
64448
|
+
if (state.table.options.scrollFrozenColsPassThroughToBody) {
|
|
64449
|
+
state.setScrollLeft(state.scroll.horizontalBarPos + optimizedDeltaX, event);
|
|
64450
|
+
state.showHorizontalScrollBar(horizontalAutoHide, 'body');
|
|
64451
|
+
}
|
|
64452
|
+
else {
|
|
64453
|
+
blockedFrozenHorizontal = true;
|
|
64454
|
+
state.showHorizontalScrollBar(horizontalAutoHide, 'frozen');
|
|
64455
|
+
}
|
|
64456
|
+
}
|
|
64457
|
+
}
|
|
64458
|
+
else if (rightFrozenColsScrollable && isInRightFrozenViewport) {
|
|
64459
|
+
const maxRightFrozenScrollLeft = state.table.getRightFrozenColsOffset();
|
|
64460
|
+
const rightFrozenDelta = -optimizedDeltaX;
|
|
64461
|
+
const nextRightFrozenScrollLeft = state.scroll.rightFrozenHorizontalBarPos + rightFrozenDelta;
|
|
64462
|
+
const canScrollRightFrozen = (rightFrozenDelta < 0 && state.scroll.rightFrozenHorizontalBarPos > 0) ||
|
|
64463
|
+
(rightFrozenDelta > 0 && state.scroll.rightFrozenHorizontalBarPos < maxRightFrozenScrollLeft);
|
|
64464
|
+
if (canScrollRightFrozen) {
|
|
64465
|
+
state.setRightFrozenColsScrollLeft(nextRightFrozenScrollLeft);
|
|
64466
|
+
usedRightFrozenHorizontal = true;
|
|
64467
|
+
state.showHorizontalScrollBar(horizontalAutoHide, 'rightFrozen');
|
|
64468
|
+
}
|
|
64469
|
+
else {
|
|
64470
|
+
if (state.table.options.scrollFrozenColsPassThroughToBody) {
|
|
64471
|
+
state.setScrollLeft(state.scroll.horizontalBarPos + optimizedDeltaX, event);
|
|
64472
|
+
state.showHorizontalScrollBar(horizontalAutoHide, 'body');
|
|
64473
|
+
}
|
|
64474
|
+
else {
|
|
64475
|
+
blockedRightFrozenHorizontal = true;
|
|
64476
|
+
state.showHorizontalScrollBar(horizontalAutoHide, 'rightFrozen');
|
|
64477
|
+
}
|
|
64478
|
+
}
|
|
64479
|
+
}
|
|
64480
|
+
else {
|
|
64481
|
+
state.setScrollLeft(state.scroll.horizontalBarPos + optimizedDeltaX, event);
|
|
64482
|
+
state.showHorizontalScrollBar(horizontalAutoHide, 'body');
|
|
64483
|
+
}
|
|
63989
64484
|
}
|
|
63990
64485
|
if (optimizedDeltaY) {
|
|
63991
64486
|
state.setScrollTop(state.scroll.verticalBarPos + optimizedDeltaY, event);
|
|
63992
|
-
state.showVerticalScrollBar(
|
|
64487
|
+
state.showVerticalScrollBar(verticalAutoHide);
|
|
63993
64488
|
}
|
|
63994
64489
|
isWheelEvent && state.resetInteractionState(state.interactionStateBeforeScroll);
|
|
63995
64490
|
if (event.nativeEvent?.cancelable &&
|
|
63996
64491
|
((state.table.internalProps.overscrollBehavior === 'none' &&
|
|
63997
64492
|
((deltaY && isVerticalExistScrollBar(state)) || (deltaX && isHorizontalExistScrollBar(state)))) ||
|
|
63998
64493
|
(Math.abs(deltaY) >= Math.abs(deltaX) && deltaY !== 0 && isVerticalScrollable(deltaY, state)) ||
|
|
63999
|
-
(Math.abs(deltaY) <= Math.abs(deltaX) &&
|
|
64494
|
+
(Math.abs(deltaY) <= Math.abs(deltaX) &&
|
|
64495
|
+
deltaX !== 0 &&
|
|
64496
|
+
(blockedFrozenHorizontal || blockedRightFrozenHorizontal
|
|
64497
|
+
? false
|
|
64498
|
+
: usedFrozenHorizontal
|
|
64499
|
+
? state.table.getFrozenColsOffset() > 0
|
|
64500
|
+
: usedRightFrozenHorizontal
|
|
64501
|
+
? state.table.getRightFrozenColsOffset() > 0
|
|
64502
|
+
: isHorizontalScrollable(deltaX, state))))) {
|
|
64000
64503
|
event.nativeEvent.preventDefault();
|
|
64001
64504
|
}
|
|
64002
64505
|
}
|
|
@@ -64015,7 +64518,9 @@
|
|
|
64015
64518
|
return !isScrollToTop(deltaY, state) && !isScrollToBottom(deltaY, state);
|
|
64016
64519
|
}
|
|
64017
64520
|
function isHorizontalScrollable(deltaX, state) {
|
|
64018
|
-
const
|
|
64521
|
+
const frozenOffset = state.table.getFrozenColsOffset?.() ?? 0;
|
|
64522
|
+
const rightFrozenOffset = state.table.getRightFrozenColsOffset?.() ?? 0;
|
|
64523
|
+
const totalWidth = state.table.getAllColsWidth() - state.table.scenegraph.width - frozenOffset - rightFrozenOffset;
|
|
64019
64524
|
if (totalWidth === 0) {
|
|
64020
64525
|
return false;
|
|
64021
64526
|
}
|
|
@@ -64029,7 +64534,9 @@
|
|
|
64029
64534
|
return true;
|
|
64030
64535
|
}
|
|
64031
64536
|
function isHorizontalExistScrollBar(state) {
|
|
64032
|
-
const
|
|
64537
|
+
const frozenOffset = state.table.getFrozenColsOffset?.() ?? 0;
|
|
64538
|
+
const rightFrozenOffset = state.table.getRightFrozenColsOffset?.() ?? 0;
|
|
64539
|
+
const totalWidth = state.table.getAllColsWidth() - state.table.scenegraph.width - frozenOffset - rightFrozenOffset;
|
|
64033
64540
|
if (totalWidth <= 0) {
|
|
64034
64541
|
return false;
|
|
64035
64542
|
}
|
|
@@ -64045,12 +64552,16 @@
|
|
|
64045
64552
|
return totalHeight !== 0 && deltaY >= 0 && Math.abs(state.scroll.verticalBarPos - totalHeight) < 1 + sizeTolerance;
|
|
64046
64553
|
}
|
|
64047
64554
|
function isScrollToLeft(deltaX, state) {
|
|
64048
|
-
const
|
|
64555
|
+
const frozenOffset = state.table.getFrozenColsOffset?.() ?? 0;
|
|
64556
|
+
const rightFrozenOffset = state.table.getRightFrozenColsOffset?.() ?? 0;
|
|
64557
|
+
const totalWidth = state.table.getAllColsWidth() - state.table.scenegraph.width - frozenOffset - rightFrozenOffset;
|
|
64049
64558
|
return totalWidth !== 0 && deltaX <= 0 && state.scroll.horizontalBarPos < 1;
|
|
64050
64559
|
}
|
|
64051
64560
|
function isScrollToRight(deltaX, state) {
|
|
64052
64561
|
const sizeTolerance = state.table.options.customConfig?._disableColumnAndRowSizeRound ? 1 : 0;
|
|
64053
|
-
const
|
|
64562
|
+
const frozenOffset = state.table.getFrozenColsOffset?.() ?? 0;
|
|
64563
|
+
const rightFrozenOffset = state.table.getRightFrozenColsOffset?.() ?? 0;
|
|
64564
|
+
const totalWidth = state.table.getAllColsWidth() - state.table.scenegraph.width - frozenOffset - rightFrozenOffset;
|
|
64054
64565
|
return totalWidth !== 0 && deltaX >= 0 && Math.abs(state.scroll.horizontalBarPos - totalWidth) < 1 + sizeTolerance;
|
|
64055
64566
|
}
|
|
64056
64567
|
class InertiaScroll {
|
|
@@ -64156,6 +64667,7 @@
|
|
|
64156
64667
|
function bindTableGroupListener(eventManager) {
|
|
64157
64668
|
const table = eventManager.table;
|
|
64158
64669
|
const stateManager = table.stateManager;
|
|
64670
|
+
const getEventArgsSet = (e) => getCellEventArgsSetWithTable(e, table);
|
|
64159
64671
|
table.scenegraph.tableGroup.addEventListener('pointermove', (e) => {
|
|
64160
64672
|
const lastX = table.eventManager.LastPointerXY?.x ?? e.x;
|
|
64161
64673
|
const lastY = table.eventManager.LastPointerXY?.y ?? e.y;
|
|
@@ -64164,7 +64676,7 @@
|
|
|
64164
64676
|
clearTimeout(eventManager.touchSetTimeout);
|
|
64165
64677
|
eventManager.touchSetTimeout = undefined;
|
|
64166
64678
|
}
|
|
64167
|
-
const eventArgsSet =
|
|
64679
|
+
const eventArgsSet = getEventArgsSet(e);
|
|
64168
64680
|
if (eventArgsSet.eventArgs && table.hasListeners(TABLE_EVENT_TYPE.MOUSEMOVE_TABLE)) {
|
|
64169
64681
|
table.fireListeners(TABLE_EVENT_TYPE.MOUSEMOVE_TABLE, {
|
|
64170
64682
|
col: eventArgsSet.eventArgs.col,
|
|
@@ -64268,16 +64780,31 @@
|
|
|
64268
64780
|
mergeCellInfo: eventArgsSet.eventArgs?.mergeInfo
|
|
64269
64781
|
});
|
|
64270
64782
|
}
|
|
64783
|
+
if ((table.theme.scrollStyle.horizontalVisible && table.theme.scrollStyle.horizontalVisible === 'focus') ||
|
|
64784
|
+
(!table.theme.scrollStyle.horizontalVisible && table.theme.scrollStyle.visible === 'focus')) {
|
|
64785
|
+
const relativeX = e.x - table.tableX;
|
|
64786
|
+
const target = table.options.scrollFrozenCols &&
|
|
64787
|
+
table.getFrozenColsOffset?.() > 0 &&
|
|
64788
|
+
relativeX >= 0 &&
|
|
64789
|
+
relativeX < table.getFrozenColsWidth()
|
|
64790
|
+
? 'frozen'
|
|
64791
|
+
: table.options.scrollRightFrozenCols &&
|
|
64792
|
+
table.getRightFrozenColsOffset?.() > 0 &&
|
|
64793
|
+
relativeX > table.tableNoFrameWidth - table.getRightFrozenColsWidth()
|
|
64794
|
+
? 'rightFrozen'
|
|
64795
|
+
: 'body';
|
|
64796
|
+
stateManager.showHorizontalScrollBar(false, target);
|
|
64797
|
+
}
|
|
64271
64798
|
});
|
|
64272
64799
|
table.scenegraph.tableGroup.addEventListener('pointerout', (e) => {
|
|
64273
|
-
const eventArgsSet =
|
|
64800
|
+
const eventArgsSet = getEventArgsSet(e);
|
|
64274
64801
|
const cellGoup = eventArgsSet?.eventArgs?.target;
|
|
64275
64802
|
if (cellGoup?.role === 'table') {
|
|
64276
64803
|
eventManager.dealTableHover();
|
|
64277
64804
|
}
|
|
64278
64805
|
});
|
|
64279
64806
|
table.scenegraph.tableGroup.addEventListener('pointerover', (e) => {
|
|
64280
|
-
const eventArgsSet =
|
|
64807
|
+
const eventArgsSet = getEventArgsSet(e);
|
|
64281
64808
|
const cellGoup = eventArgsSet?.eventArgs?.target;
|
|
64282
64809
|
if (cellGoup &&
|
|
64283
64810
|
table.hasListeners(TABLE_EVENT_TYPE.MOUSEOVER_CHART_SYMBOL) &&
|
|
@@ -64308,7 +64835,18 @@
|
|
|
64308
64835
|
table.scenegraph.tableGroup.addEventListener('pointerenter', (e) => {
|
|
64309
64836
|
if ((table.theme.scrollStyle.horizontalVisible && table.theme.scrollStyle.horizontalVisible === 'focus') ||
|
|
64310
64837
|
(!table.theme.scrollStyle.horizontalVisible && table.theme.scrollStyle.visible === 'focus')) {
|
|
64311
|
-
|
|
64838
|
+
const relativeX = e.x - table.tableX;
|
|
64839
|
+
const target = table.options.scrollFrozenCols &&
|
|
64840
|
+
table.getFrozenColsOffset?.() > 0 &&
|
|
64841
|
+
relativeX >= 0 &&
|
|
64842
|
+
relativeX < table.getFrozenColsWidth()
|
|
64843
|
+
? 'frozen'
|
|
64844
|
+
: table.options.scrollRightFrozenCols &&
|
|
64845
|
+
table.getRightFrozenColsOffset?.() > 0 &&
|
|
64846
|
+
relativeX > table.tableNoFrameWidth - table.getRightFrozenColsWidth()
|
|
64847
|
+
? 'rightFrozen'
|
|
64848
|
+
: 'body';
|
|
64849
|
+
stateManager.showHorizontalScrollBar(false, target);
|
|
64312
64850
|
}
|
|
64313
64851
|
if ((table.theme.scrollStyle.verticalVisible && table.theme.scrollStyle.verticalVisible === 'focus') ||
|
|
64314
64852
|
(!table.theme.scrollStyle.verticalVisible && table.theme.scrollStyle.visible === 'focus')) {
|
|
@@ -64372,7 +64910,7 @@
|
|
|
64372
64910
|
if (e.button !== 0) {
|
|
64373
64911
|
return;
|
|
64374
64912
|
}
|
|
64375
|
-
const eventArgsSet =
|
|
64913
|
+
const eventArgsSet = getEventArgsSet(e);
|
|
64376
64914
|
eventManager.downIcon = undefined;
|
|
64377
64915
|
if (stateManager.interactionState !== InteractionState.default) {
|
|
64378
64916
|
return;
|
|
@@ -64471,7 +65009,7 @@
|
|
|
64471
65009
|
stateManager.updateInteractionState(InteractionState.grabing);
|
|
64472
65010
|
}
|
|
64473
65011
|
if (table.hasListeners(TABLE_EVENT_TYPE.MOUSEDOWN_CELL)) {
|
|
64474
|
-
const eventArgsSet =
|
|
65012
|
+
const eventArgsSet = getEventArgsSet(e);
|
|
64475
65013
|
if (eventArgsSet.eventArgs) {
|
|
64476
65014
|
table.fireListeners(TABLE_EVENT_TYPE.MOUSEDOWN_CELL, {
|
|
64477
65015
|
col: eventArgsSet.eventArgs.col,
|
|
@@ -64505,7 +65043,7 @@
|
|
|
64505
65043
|
if (table.stateManager.isFillHandle()) {
|
|
64506
65044
|
table.stateManager.endFillSelect();
|
|
64507
65045
|
}
|
|
64508
|
-
const eventArgsSet =
|
|
65046
|
+
const eventArgsSet = getEventArgsSet(e);
|
|
64509
65047
|
if (table.eventManager.isDraging &&
|
|
64510
65048
|
eventArgsSet.eventArgs &&
|
|
64511
65049
|
table.hasListeners(TABLE_EVENT_TYPE.DRAG_SELECT_END)) {
|
|
@@ -64527,7 +65065,7 @@
|
|
|
64527
65065
|
stateManager.updateInteractionState(InteractionState.default);
|
|
64528
65066
|
}
|
|
64529
65067
|
if (!table.eventManager.isDraging) {
|
|
64530
|
-
const eventArgsSet =
|
|
65068
|
+
const eventArgsSet = getEventArgsSet(e);
|
|
64531
65069
|
if (!eventManager.isTouchMove &&
|
|
64532
65070
|
e.button === 0 &&
|
|
64533
65071
|
eventArgsSet.eventArgs &&
|
|
@@ -64562,7 +65100,7 @@
|
|
|
64562
65100
|
}
|
|
64563
65101
|
}
|
|
64564
65102
|
if (table.hasListeners(TABLE_EVENT_TYPE.MOUSEUP_CELL)) {
|
|
64565
|
-
const eventArgsSet =
|
|
65103
|
+
const eventArgsSet = getEventArgsSet(e);
|
|
64566
65104
|
if (eventArgsSet.eventArgs) {
|
|
64567
65105
|
table.fireListeners(TABLE_EVENT_TYPE.MOUSEUP_CELL, {
|
|
64568
65106
|
col: eventArgsSet.eventArgs.col,
|
|
@@ -64582,7 +65120,7 @@
|
|
|
64582
65120
|
}, 0);
|
|
64583
65121
|
});
|
|
64584
65122
|
table.scenegraph.tableGroup.addEventListener('rightdown', (e) => {
|
|
64585
|
-
const eventArgsSet =
|
|
65123
|
+
const eventArgsSet = getEventArgsSet(e);
|
|
64586
65124
|
if (eventArgsSet.eventArgs) {
|
|
64587
65125
|
stateManager.triggerContextMenu(eventArgsSet.eventArgs.col, eventArgsSet.eventArgs.row, eventArgsSet.abstractPos.x, eventArgsSet.abstractPos.y);
|
|
64588
65126
|
const { col, row } = eventArgsSet.eventArgs;
|
|
@@ -64651,7 +65189,7 @@
|
|
|
64651
65189
|
if (table.stateManager.columnResize.resizing) {
|
|
64652
65190
|
return;
|
|
64653
65191
|
}
|
|
64654
|
-
const eventArgsSet =
|
|
65192
|
+
const eventArgsSet = getEventArgsSet(e);
|
|
64655
65193
|
if (table.stateManager.columnResize.resizing || table.stateManager.columnMove.moving) {
|
|
64656
65194
|
return;
|
|
64657
65195
|
}
|
|
@@ -64661,7 +65199,7 @@
|
|
|
64661
65199
|
}
|
|
64662
65200
|
if (eventManager.touchSetTimeout) {
|
|
64663
65201
|
if (e.pointerType === 'touch') {
|
|
64664
|
-
const eventArgsSet =
|
|
65202
|
+
const eventArgsSet = getEventArgsSet(e);
|
|
64665
65203
|
if (eventManager.touchSetTimeout) {
|
|
64666
65204
|
clearTimeout(eventManager.touchSetTimeout);
|
|
64667
65205
|
const isHasSelected = !!stateManager.select.ranges?.length;
|
|
@@ -64673,7 +65211,7 @@
|
|
|
64673
65211
|
}
|
|
64674
65212
|
});
|
|
64675
65213
|
table.scenegraph.stage.addEventListener('pointerdown', (e) => {
|
|
64676
|
-
const eventArgsSet =
|
|
65214
|
+
const eventArgsSet = getCellEventArgsSetWithTable(e, table);
|
|
64677
65215
|
if (!eventArgsSet.eventArgs?.target ||
|
|
64678
65216
|
eventArgsSet.eventArgs?.target !== stateManager.residentHoverIcon?.icon) {
|
|
64679
65217
|
stateManager.hideMenu();
|
|
@@ -64750,7 +65288,7 @@
|
|
|
64750
65288
|
}
|
|
64751
65289
|
});
|
|
64752
65290
|
table.scenegraph.stage.addEventListener('pointermove', (e) => {
|
|
64753
|
-
const eventArgsSet =
|
|
65291
|
+
const eventArgsSet = getCellEventArgsSetWithTable(e, table);
|
|
64754
65292
|
const isEventFromCurrentTable = e.target?.isDescendantsOf?.(table.scenegraph.tableGroup) ?? false;
|
|
64755
65293
|
if (!isEventFromCurrentTable) {
|
|
64756
65294
|
return;
|
|
@@ -64777,7 +65315,7 @@
|
|
|
64777
65315
|
}
|
|
64778
65316
|
});
|
|
64779
65317
|
table.scenegraph.tableGroup.addEventListener('checkbox_state_change', (e) => {
|
|
64780
|
-
const eventArgsSet =
|
|
65318
|
+
const eventArgsSet = getEventArgsSet(e);
|
|
64781
65319
|
const { col, row } = eventArgsSet.eventArgs;
|
|
64782
65320
|
const cellInfo = table.getCellInfo(col, row);
|
|
64783
65321
|
const mergeRange = getCellMergeInfo(table, col, row);
|
|
@@ -64829,7 +65367,7 @@
|
|
|
64829
65367
|
table.scenegraph.updateNextFrame();
|
|
64830
65368
|
});
|
|
64831
65369
|
table.scenegraph.tableGroup.addEventListener('radio_checked', (e) => {
|
|
64832
|
-
const eventArgsSet =
|
|
65370
|
+
const eventArgsSet = getEventArgsSet(e);
|
|
64833
65371
|
const { col, row, target } = eventArgsSet.eventArgs;
|
|
64834
65372
|
const cellInfo = table.getCellInfo(col, row);
|
|
64835
65373
|
const indexInCell = regIndexReg.exec(target.id)?.[1];
|
|
@@ -64901,7 +65439,7 @@
|
|
|
64901
65439
|
table.scenegraph.updateNextFrame();
|
|
64902
65440
|
});
|
|
64903
65441
|
table.scenegraph.tableGroup.addEventListener('switch_state_change', (e) => {
|
|
64904
|
-
const eventArgsSet =
|
|
65442
|
+
const eventArgsSet = getEventArgsSet(e);
|
|
64905
65443
|
const { col, row, target } = eventArgsSet.eventArgs;
|
|
64906
65444
|
const cellInfo = table.getCellInfo(col, row);
|
|
64907
65445
|
const mergeRange = getCellMergeInfo(table, col, row);
|
|
@@ -64974,7 +65512,7 @@
|
|
|
64974
65512
|
});
|
|
64975
65513
|
}
|
|
64976
65514
|
function dblclickHandler(e, table) {
|
|
64977
|
-
const eventArgsSet =
|
|
65515
|
+
const eventArgsSet = getCellEventArgsSetWithTable(e, table);
|
|
64978
65516
|
let col = -1;
|
|
64979
65517
|
let row = -1;
|
|
64980
65518
|
if (eventArgsSet.eventArgs) {
|
|
@@ -65019,23 +65557,72 @@
|
|
|
65019
65557
|
const table = eventManager.table;
|
|
65020
65558
|
const stateManager = table.stateManager;
|
|
65021
65559
|
const scenegraph = table.scenegraph;
|
|
65560
|
+
const visible1 = table.theme.scrollStyle?.visible;
|
|
65561
|
+
const horizontalVisible = table.theme.scrollStyle?.horizontalVisible ?? visible1;
|
|
65562
|
+
const verticalVisible = table.theme.scrollStyle?.verticalVisible ?? visible1;
|
|
65022
65563
|
scenegraph.component.vScrollBar.addEventListener('pointerover', (e) => {
|
|
65023
|
-
|
|
65564
|
+
if (verticalVisible === 'focus' || verticalVisible === 'scrolling') {
|
|
65565
|
+
stateManager.showVerticalScrollBar();
|
|
65566
|
+
}
|
|
65024
65567
|
});
|
|
65025
65568
|
scenegraph.component.hScrollBar.addEventListener('pointerover', (e) => {
|
|
65026
|
-
|
|
65569
|
+
if (horizontalVisible === 'focus' || horizontalVisible === 'scrolling') {
|
|
65570
|
+
stateManager.showHorizontalScrollBar(false, 'body');
|
|
65571
|
+
}
|
|
65572
|
+
});
|
|
65573
|
+
scenegraph.component.frozenHScrollBar.addEventListener('pointerover', (e) => {
|
|
65574
|
+
if (horizontalVisible === 'focus' || horizontalVisible === 'scrolling') {
|
|
65575
|
+
stateManager.showHorizontalScrollBar(false, 'frozen');
|
|
65576
|
+
}
|
|
65577
|
+
});
|
|
65578
|
+
scenegraph.component.rightFrozenHScrollBar.addEventListener('pointerover', (e) => {
|
|
65579
|
+
if (horizontalVisible === 'focus' || horizontalVisible === 'scrolling') {
|
|
65580
|
+
stateManager.showHorizontalScrollBar(false, 'rightFrozen');
|
|
65581
|
+
}
|
|
65027
65582
|
});
|
|
65028
65583
|
scenegraph.component.vScrollBar.addEventListener('pointerout', (e) => {
|
|
65029
65584
|
if (stateManager.interactionState === InteractionState.scrolling) {
|
|
65030
65585
|
return;
|
|
65031
65586
|
}
|
|
65032
|
-
|
|
65587
|
+
if (verticalVisible === 'focus') {
|
|
65588
|
+
stateManager.hideVerticalScrollBar();
|
|
65589
|
+
}
|
|
65590
|
+
else if (verticalVisible === 'scrolling') {
|
|
65591
|
+
stateManager.showVerticalScrollBar(true);
|
|
65592
|
+
}
|
|
65033
65593
|
});
|
|
65034
65594
|
scenegraph.component.hScrollBar.addEventListener('pointerout', (e) => {
|
|
65035
65595
|
if (stateManager.interactionState === InteractionState.scrolling) {
|
|
65036
65596
|
return;
|
|
65037
65597
|
}
|
|
65038
|
-
|
|
65598
|
+
if (horizontalVisible === 'focus') {
|
|
65599
|
+
stateManager.hideHorizontalScrollBar();
|
|
65600
|
+
}
|
|
65601
|
+
else if (horizontalVisible === 'scrolling') {
|
|
65602
|
+
stateManager.showHorizontalScrollBar(true, 'body');
|
|
65603
|
+
}
|
|
65604
|
+
});
|
|
65605
|
+
scenegraph.component.frozenHScrollBar.addEventListener('pointerout', (e) => {
|
|
65606
|
+
if (stateManager.interactionState === InteractionState.scrolling) {
|
|
65607
|
+
return;
|
|
65608
|
+
}
|
|
65609
|
+
if (horizontalVisible === 'focus') {
|
|
65610
|
+
stateManager.hideHorizontalScrollBar();
|
|
65611
|
+
}
|
|
65612
|
+
else if (horizontalVisible === 'scrolling') {
|
|
65613
|
+
stateManager.showHorizontalScrollBar(true, 'frozen');
|
|
65614
|
+
}
|
|
65615
|
+
});
|
|
65616
|
+
scenegraph.component.rightFrozenHScrollBar.addEventListener('pointerout', (e) => {
|
|
65617
|
+
if (stateManager.interactionState === InteractionState.scrolling) {
|
|
65618
|
+
return;
|
|
65619
|
+
}
|
|
65620
|
+
if (horizontalVisible === 'focus') {
|
|
65621
|
+
stateManager.hideHorizontalScrollBar();
|
|
65622
|
+
}
|
|
65623
|
+
else if (horizontalVisible === 'scrolling') {
|
|
65624
|
+
stateManager.showHorizontalScrollBar(true, 'rightFrozen');
|
|
65625
|
+
}
|
|
65039
65626
|
});
|
|
65040
65627
|
scenegraph.component.vScrollBar.addEventListener('pointermove', (e) => {
|
|
65041
65628
|
scenegraph.table.stateManager.updateCursor('default');
|
|
@@ -65083,6 +65670,14 @@
|
|
|
65083
65670
|
scenegraph.table.stateManager.updateCursor();
|
|
65084
65671
|
e.stopPropagation();
|
|
65085
65672
|
});
|
|
65673
|
+
scenegraph.component.frozenHScrollBar.addEventListener('pointermove', (e) => {
|
|
65674
|
+
scenegraph.table.stateManager.updateCursor();
|
|
65675
|
+
e.stopPropagation();
|
|
65676
|
+
});
|
|
65677
|
+
scenegraph.component.rightFrozenHScrollBar.addEventListener('pointermove', (e) => {
|
|
65678
|
+
scenegraph.table.stateManager.updateCursor();
|
|
65679
|
+
e.stopPropagation();
|
|
65680
|
+
});
|
|
65086
65681
|
scenegraph.component.hScrollBar.addEventListener('pointerdown', (e) => {
|
|
65087
65682
|
e.stopPropagation();
|
|
65088
65683
|
if (scenegraph.table.hasListeners(TABLE_EVENT_TYPE.MOUSEDOWN_TABLE)) {
|
|
@@ -65091,6 +65686,22 @@
|
|
|
65091
65686
|
});
|
|
65092
65687
|
}
|
|
65093
65688
|
});
|
|
65689
|
+
scenegraph.component.frozenHScrollBar.addEventListener('pointerdown', (e) => {
|
|
65690
|
+
e.stopPropagation();
|
|
65691
|
+
if (scenegraph.table.hasListeners(TABLE_EVENT_TYPE.MOUSEDOWN_TABLE)) {
|
|
65692
|
+
scenegraph.table.fireListeners(TABLE_EVENT_TYPE.MOUSEDOWN_TABLE, {
|
|
65693
|
+
event: e.nativeEvent
|
|
65694
|
+
});
|
|
65695
|
+
}
|
|
65696
|
+
});
|
|
65697
|
+
scenegraph.component.rightFrozenHScrollBar.addEventListener('pointerdown', (e) => {
|
|
65698
|
+
e.stopPropagation();
|
|
65699
|
+
if (scenegraph.table.hasListeners(TABLE_EVENT_TYPE.MOUSEDOWN_TABLE)) {
|
|
65700
|
+
scenegraph.table.fireListeners(TABLE_EVENT_TYPE.MOUSEDOWN_TABLE, {
|
|
65701
|
+
event: e.nativeEvent
|
|
65702
|
+
});
|
|
65703
|
+
}
|
|
65704
|
+
});
|
|
65094
65705
|
scenegraph.component.hScrollBar.addEventListener('scrollDown', (e) => {
|
|
65095
65706
|
scenegraph.table.eventManager.LastBodyPointerXY = { x: e.x, y: e.y };
|
|
65096
65707
|
scenegraph.table.eventManager.isDown = true;
|
|
@@ -65105,6 +65716,34 @@
|
|
|
65105
65716
|
});
|
|
65106
65717
|
}
|
|
65107
65718
|
});
|
|
65719
|
+
scenegraph.component.frozenHScrollBar.addEventListener('scrollDown', (e) => {
|
|
65720
|
+
scenegraph.table.eventManager.LastBodyPointerXY = { x: e.x, y: e.y };
|
|
65721
|
+
scenegraph.table.eventManager.isDown = true;
|
|
65722
|
+
if (stateManager.interactionState !== InteractionState.scrolling) {
|
|
65723
|
+
stateManager.updateInteractionState(InteractionState.scrolling);
|
|
65724
|
+
}
|
|
65725
|
+
scenegraph.table.stateManager.hideMenu();
|
|
65726
|
+
scenegraph.table.editorManager?.completeEdit();
|
|
65727
|
+
if (scenegraph.table.hasListeners(TABLE_EVENT_TYPE.MOUSEDOWN_TABLE)) {
|
|
65728
|
+
scenegraph.table.fireListeners(TABLE_EVENT_TYPE.MOUSEDOWN_TABLE, {
|
|
65729
|
+
event: e.nativeEvent
|
|
65730
|
+
});
|
|
65731
|
+
}
|
|
65732
|
+
});
|
|
65733
|
+
scenegraph.component.rightFrozenHScrollBar.addEventListener('scrollDown', (e) => {
|
|
65734
|
+
scenegraph.table.eventManager.LastBodyPointerXY = { x: e.x, y: e.y };
|
|
65735
|
+
scenegraph.table.eventManager.isDown = true;
|
|
65736
|
+
if (stateManager.interactionState !== InteractionState.scrolling) {
|
|
65737
|
+
stateManager.updateInteractionState(InteractionState.scrolling);
|
|
65738
|
+
}
|
|
65739
|
+
scenegraph.table.stateManager.hideMenu();
|
|
65740
|
+
scenegraph.table.editorManager?.completeEdit();
|
|
65741
|
+
if (scenegraph.table.hasListeners(TABLE_EVENT_TYPE.MOUSEDOWN_TABLE)) {
|
|
65742
|
+
scenegraph.table.fireListeners(TABLE_EVENT_TYPE.MOUSEDOWN_TABLE, {
|
|
65743
|
+
event: e.nativeEvent
|
|
65744
|
+
});
|
|
65745
|
+
}
|
|
65746
|
+
});
|
|
65108
65747
|
scenegraph.component.hScrollBar.addEventListener('pointerup', () => {
|
|
65109
65748
|
stateManager.fastScrolling = false;
|
|
65110
65749
|
scenegraph.table.eventManager.isDraging = false;
|
|
@@ -65121,8 +65760,42 @@
|
|
|
65121
65760
|
scenegraph.component.hScrollBar.addEventListener('scrollUp', (e) => {
|
|
65122
65761
|
scenegraph.table.eventManager.isDraging = false;
|
|
65123
65762
|
});
|
|
65763
|
+
scenegraph.component.frozenHScrollBar.addEventListener('pointerup', () => {
|
|
65764
|
+
stateManager.fastScrolling = false;
|
|
65765
|
+
scenegraph.table.eventManager.isDraging = false;
|
|
65766
|
+
if (stateManager.interactionState === InteractionState.scrolling) {
|
|
65767
|
+
stateManager.updateInteractionState(InteractionState.default);
|
|
65768
|
+
}
|
|
65769
|
+
});
|
|
65770
|
+
scenegraph.component.frozenHScrollBar.addEventListener('pointerupoutside', () => {
|
|
65771
|
+
stateManager.fastScrolling = false;
|
|
65772
|
+
if (stateManager.interactionState === InteractionState.scrolling) {
|
|
65773
|
+
stateManager.updateInteractionState(InteractionState.default);
|
|
65774
|
+
}
|
|
65775
|
+
});
|
|
65776
|
+
scenegraph.component.frozenHScrollBar.addEventListener('scrollUp', (e) => {
|
|
65777
|
+
scenegraph.table.eventManager.isDraging = false;
|
|
65778
|
+
});
|
|
65779
|
+
scenegraph.component.rightFrozenHScrollBar.addEventListener('pointerup', () => {
|
|
65780
|
+
stateManager.fastScrolling = false;
|
|
65781
|
+
scenegraph.table.eventManager.isDraging = false;
|
|
65782
|
+
if (stateManager.interactionState === InteractionState.scrolling) {
|
|
65783
|
+
stateManager.updateInteractionState(InteractionState.default);
|
|
65784
|
+
}
|
|
65785
|
+
});
|
|
65786
|
+
scenegraph.component.rightFrozenHScrollBar.addEventListener('pointerupoutside', () => {
|
|
65787
|
+
stateManager.fastScrolling = false;
|
|
65788
|
+
if (stateManager.interactionState === InteractionState.scrolling) {
|
|
65789
|
+
stateManager.updateInteractionState(InteractionState.default);
|
|
65790
|
+
}
|
|
65791
|
+
});
|
|
65792
|
+
scenegraph.component.rightFrozenHScrollBar.addEventListener('scrollUp', (e) => {
|
|
65793
|
+
scenegraph.table.eventManager.isDraging = false;
|
|
65794
|
+
});
|
|
65124
65795
|
const throttleVerticalWheel = throttle(stateManager.updateVerticalScrollBar, 20);
|
|
65125
65796
|
const throttleHorizontalWheel = throttle(stateManager.updateHorizontalScrollBar, 20);
|
|
65797
|
+
const throttleFrozenHorizontalWheel = throttle(stateManager.updateFrozenHorizontalScrollBar, 20);
|
|
65798
|
+
const throttleRightFrozenHorizontalWheel = throttle(stateManager.updateRightFrozenHorizontalScrollBar, 20);
|
|
65126
65799
|
scenegraph.component.vScrollBar.addEventListener('scrollDrag', (e) => {
|
|
65127
65800
|
if (scenegraph.table.eventManager.isDown) {
|
|
65128
65801
|
scenegraph.table.eventManager.isDraging = true;
|
|
@@ -65151,6 +65824,34 @@
|
|
|
65151
65824
|
const ratio = e.detail.value[0] / (1 - e.detail.value[1] + e.detail.value[0]);
|
|
65152
65825
|
throttleHorizontalWheel(ratio);
|
|
65153
65826
|
});
|
|
65827
|
+
scenegraph.component.frozenHScrollBar.addEventListener('scrollDrag', (e) => {
|
|
65828
|
+
if (scenegraph.table.eventManager.isDown) {
|
|
65829
|
+
scenegraph.table.eventManager.isDraging = true;
|
|
65830
|
+
}
|
|
65831
|
+
stateManager.fastScrolling = true;
|
|
65832
|
+
if (stateManager.interactionState !== InteractionState.scrolling) {
|
|
65833
|
+
stateManager.updateInteractionState(InteractionState.scrolling);
|
|
65834
|
+
}
|
|
65835
|
+
scenegraph.table.stateManager.hideMenu();
|
|
65836
|
+
scenegraph.table.editorManager?.completeEdit();
|
|
65837
|
+
table.scenegraph.deactivateChart(-1, -1, true);
|
|
65838
|
+
const ratio = e.detail.value[0] / (1 - e.detail.value[1] + e.detail.value[0]);
|
|
65839
|
+
throttleFrozenHorizontalWheel(ratio);
|
|
65840
|
+
});
|
|
65841
|
+
scenegraph.component.rightFrozenHScrollBar.addEventListener('scrollDrag', (e) => {
|
|
65842
|
+
if (scenegraph.table.eventManager.isDown) {
|
|
65843
|
+
scenegraph.table.eventManager.isDraging = true;
|
|
65844
|
+
}
|
|
65845
|
+
stateManager.fastScrolling = true;
|
|
65846
|
+
if (stateManager.interactionState !== InteractionState.scrolling) {
|
|
65847
|
+
stateManager.updateInteractionState(InteractionState.scrolling);
|
|
65848
|
+
}
|
|
65849
|
+
scenegraph.table.stateManager.hideMenu();
|
|
65850
|
+
scenegraph.table.editorManager?.completeEdit();
|
|
65851
|
+
table.scenegraph.deactivateChart(-1, -1, true);
|
|
65852
|
+
const ratio = e.detail.value[0] / (1 - e.detail.value[1] + e.detail.value[0]);
|
|
65853
|
+
throttleRightFrozenHorizontalWheel(ratio);
|
|
65854
|
+
});
|
|
65154
65855
|
}
|
|
65155
65856
|
|
|
65156
65857
|
let defaultPixelRatio = 1;
|
|
@@ -65632,6 +66333,7 @@
|
|
|
65632
66333
|
handleWhell({ deltaX: -dx, deltaY: -dy }, table.stateManager, false);
|
|
65633
66334
|
let selectX;
|
|
65634
66335
|
let selectY;
|
|
66336
|
+
const frozenOffset = table.getFrozenColsOffset?.() ?? 0;
|
|
65635
66337
|
if (bottom) {
|
|
65636
66338
|
selectY = table.scrollTop + drawRange.height - bottomFrozenRowHeight - 20;
|
|
65637
66339
|
}
|
|
@@ -65639,10 +66341,10 @@
|
|
|
65639
66341
|
selectY = table.scrollTop + topFrozenRowHeight + 20;
|
|
65640
66342
|
}
|
|
65641
66343
|
if (right) {
|
|
65642
|
-
selectX = table.scrollLeft + drawRange.width - rightFrozenColsWidth - 20;
|
|
66344
|
+
selectX = table.scrollLeft + frozenOffset + drawRange.width - rightFrozenColsWidth - 20;
|
|
65643
66345
|
}
|
|
65644
66346
|
else if (left) {
|
|
65645
|
-
selectX = table.scrollLeft + leftFrozenColsWidth + 20;
|
|
66347
|
+
selectX = table.scrollLeft + frozenOffset + leftFrozenColsWidth + 20;
|
|
65646
66348
|
}
|
|
65647
66349
|
let considerFrozenY = false;
|
|
65648
66350
|
let considerFrozenX = false;
|
|
@@ -65653,7 +66355,7 @@
|
|
|
65653
66355
|
considerFrozenX = true;
|
|
65654
66356
|
}
|
|
65655
66357
|
else {
|
|
65656
|
-
selectX = table.scrollLeft + x;
|
|
66358
|
+
selectX = table.scrollLeft + frozenOffset + x;
|
|
65657
66359
|
}
|
|
65658
66360
|
}
|
|
65659
66361
|
if (!bottom && !top) {
|
|
@@ -70339,10 +71041,12 @@
|
|
|
70339
71041
|
return { left: 0, col: 0, right: 0, width: 0 };
|
|
70340
71042
|
}
|
|
70341
71043
|
absoluteX = absoluteX - _this.tableX;
|
|
71044
|
+
const rightFrozenScrollLeft = _this.getRightFrozenColsScrollLeft?.() ?? 0;
|
|
70342
71045
|
if (isConsider &&
|
|
70343
71046
|
absoluteX > _this.tableNoFrameWidth - _this.getRightFrozenColsWidth() &&
|
|
70344
71047
|
absoluteX < _this.tableNoFrameWidth &&
|
|
70345
71048
|
absoluteX <= _this.getAllColsWidth()) {
|
|
71049
|
+
absoluteX -= rightFrozenScrollLeft;
|
|
70346
71050
|
for (let i = 0; i < _this.rightFrozenColCount; i++) {
|
|
70347
71051
|
if (absoluteX > _this.tableNoFrameWidth - _this.getColsWidth(_this.colCount - i - 1, _this.colCount - 1)) {
|
|
70348
71052
|
return {
|
|
@@ -70407,12 +71111,15 @@
|
|
|
70407
71111
|
function getCellAtRelativePosition(x, y, _this) {
|
|
70408
71112
|
x -= _this.tableX;
|
|
70409
71113
|
y -= _this.tableY;
|
|
71114
|
+
const frozenColsWidth = _this.getFrozenColsWidth();
|
|
71115
|
+
const frozenColsOffset = _this.getFrozenColsOffset?.() ?? 0;
|
|
71116
|
+
const frozenColsScrollLeft = _this.getFrozenColsScrollLeft?.() ?? 0;
|
|
70410
71117
|
let topFrozen = false;
|
|
70411
71118
|
if (y > 0 && y < _this.getFrozenRowsHeight()) {
|
|
70412
71119
|
topFrozen = true;
|
|
70413
71120
|
}
|
|
70414
71121
|
let leftFrozen = false;
|
|
70415
|
-
if (x > 0 && x <
|
|
71122
|
+
if (x > 0 && x < frozenColsWidth) {
|
|
70416
71123
|
leftFrozen = true;
|
|
70417
71124
|
}
|
|
70418
71125
|
let bottomFrozen = false;
|
|
@@ -70427,7 +71134,7 @@
|
|
|
70427
71134
|
x <= _this.getAllColsWidth()) {
|
|
70428
71135
|
rightFrozen = true;
|
|
70429
71136
|
}
|
|
70430
|
-
const colInfo = getTargetColAtConsiderRightFrozen((leftFrozen
|
|
71137
|
+
const colInfo = getTargetColAtConsiderRightFrozen((leftFrozen ? x + frozenColsScrollLeft : rightFrozen ? x : x + _this.scrollLeft + frozenColsOffset) + _this.tableX, rightFrozen, _this);
|
|
70431
71138
|
const rowInfo = getTargetRowAtConsiderBottomFrozen((topFrozen || bottomFrozen ? y : y + _this.scrollTop) + _this.tableY, bottomFrozen, _this);
|
|
70432
71139
|
if (colInfo && rowInfo) {
|
|
70433
71140
|
const { row, top, bottom, height } = rowInfo;
|
|
@@ -70450,8 +71157,11 @@
|
|
|
70450
71157
|
}
|
|
70451
71158
|
function getColAtRelativePosition(x, _this) {
|
|
70452
71159
|
x -= _this.tableX;
|
|
71160
|
+
const frozenColsWidth = _this.getFrozenColsWidth();
|
|
71161
|
+
const frozenColsOffset = _this.getFrozenColsOffset?.() ?? 0;
|
|
71162
|
+
const frozenColsScrollLeft = _this.getFrozenColsScrollLeft?.() ?? 0;
|
|
70453
71163
|
let leftFrozen = false;
|
|
70454
|
-
if (x > 0 && x <
|
|
71164
|
+
if (x > 0 && x < frozenColsWidth) {
|
|
70455
71165
|
leftFrozen = true;
|
|
70456
71166
|
}
|
|
70457
71167
|
let rightFrozen = false;
|
|
@@ -70460,7 +71170,7 @@
|
|
|
70460
71170
|
x <= _this.getAllColsWidth()) {
|
|
70461
71171
|
rightFrozen = true;
|
|
70462
71172
|
}
|
|
70463
|
-
const colInfo = getTargetColAtConsiderRightFrozen((leftFrozen
|
|
71173
|
+
const colInfo = getTargetColAtConsiderRightFrozen((leftFrozen ? x + frozenColsScrollLeft : rightFrozen ? x : x + _this.scrollLeft + frozenColsOffset) + _this.tableX, rightFrozen, _this);
|
|
70464
71174
|
if (colInfo) {
|
|
70465
71175
|
const { col } = colInfo;
|
|
70466
71176
|
return col;
|
|
@@ -71130,7 +71840,7 @@
|
|
|
71130
71840
|
return TABLE_EVENT_TYPE;
|
|
71131
71841
|
}
|
|
71132
71842
|
options;
|
|
71133
|
-
version = "1.
|
|
71843
|
+
version = "1.25.1-alpha.0";
|
|
71134
71844
|
pagination;
|
|
71135
71845
|
id = `VTable${Date.now()}`;
|
|
71136
71846
|
headerStyleCache;
|
|
@@ -71148,6 +71858,20 @@
|
|
|
71148
71858
|
rotateDegree;
|
|
71149
71859
|
constructor(container, options = {}) {
|
|
71150
71860
|
super();
|
|
71861
|
+
if (typeof window !== 'undefined') {
|
|
71862
|
+
const g = window;
|
|
71863
|
+
g[this.id] = this;
|
|
71864
|
+
const registry = g.__vtable__ ||
|
|
71865
|
+
(g.__vtable__ = {
|
|
71866
|
+
byId: Object.create(null),
|
|
71867
|
+
list: [],
|
|
71868
|
+
last: null
|
|
71869
|
+
});
|
|
71870
|
+
registry.byId[this.id] = this;
|
|
71871
|
+
registry.list.push(this);
|
|
71872
|
+
registry.last = this;
|
|
71873
|
+
g.__vtable_last_id__ = this.id;
|
|
71874
|
+
}
|
|
71151
71875
|
if (Env.mode === 'node') {
|
|
71152
71876
|
options = container;
|
|
71153
71877
|
container = null;
|
|
@@ -71233,6 +71957,12 @@
|
|
|
71233
71957
|
internalProps.focusControl = new FocusInput(this, internalProps.element);
|
|
71234
71958
|
internalProps.canvas = this.options.canvas;
|
|
71235
71959
|
internalProps.context = internalProps.canvas.getContext('2d');
|
|
71960
|
+
internalProps.canvas.__vtable__ = this;
|
|
71961
|
+
internalProps.canvas.__vtable_id__ = this.id;
|
|
71962
|
+
if (internalProps.element) {
|
|
71963
|
+
internalProps.element.__vtable__ = this;
|
|
71964
|
+
internalProps.element.__vtable_id__ = this.id;
|
|
71965
|
+
}
|
|
71236
71966
|
}
|
|
71237
71967
|
else if (Env.mode !== 'node') {
|
|
71238
71968
|
internalProps.element = createRootElement(this.padding);
|
|
@@ -71240,6 +71970,10 @@
|
|
|
71240
71970
|
internalProps.canvas = document.createElement('canvas');
|
|
71241
71971
|
internalProps.element.appendChild(internalProps.canvas);
|
|
71242
71972
|
internalProps.context = internalProps.canvas.getContext('2d');
|
|
71973
|
+
internalProps.canvas.__vtable__ = this;
|
|
71974
|
+
internalProps.canvas.__vtable_id__ = this.id;
|
|
71975
|
+
internalProps.element.__vtable__ = this;
|
|
71976
|
+
internalProps.element.__vtable_id__ = this.id;
|
|
71243
71977
|
if (options.customConfig?.createReactContainer) {
|
|
71244
71978
|
createReactContainer(this);
|
|
71245
71979
|
}
|
|
@@ -71521,7 +72255,7 @@
|
|
|
71521
72255
|
this.internalProps.frozenColCount = frozenColCount;
|
|
71522
72256
|
this.options.frozenColCount = frozenColCount;
|
|
71523
72257
|
const maxFrozenWidth = this._getMaxFrozenWidth();
|
|
71524
|
-
if (this.getColsWidth(0, frozenColCount - 1) > maxFrozenWidth) {
|
|
72258
|
+
if (!this.options.scrollFrozenCols && this.getColsWidth(0, frozenColCount - 1) > maxFrozenWidth) {
|
|
71525
72259
|
if (this.internalProps.unfreezeAllOnExceedsMaxWidth) {
|
|
71526
72260
|
this.internalProps.frozenColCount = 0;
|
|
71527
72261
|
}
|
|
@@ -71539,7 +72273,7 @@
|
|
|
71539
72273
|
this.internalProps.frozenColCount = frozenColCount;
|
|
71540
72274
|
this.options.frozenColCount = frozenColCount;
|
|
71541
72275
|
const maxFrozenWidth = this._getMaxFrozenWidth();
|
|
71542
|
-
if (this.getColsWidth(0, frozenColCount - 1) > maxFrozenWidth) {
|
|
72276
|
+
if (!this.options.scrollFrozenCols && this.getColsWidth(0, frozenColCount - 1) > maxFrozenWidth) {
|
|
71543
72277
|
if (this.internalProps.unfreezeAllOnExceedsMaxWidth) {
|
|
71544
72278
|
this.internalProps.frozenColCount = 0;
|
|
71545
72279
|
}
|
|
@@ -71729,6 +72463,10 @@
|
|
|
71729
72463
|
const maxFrozenWidth = this.options.maxFrozenWidth ?? '80%';
|
|
71730
72464
|
return _toPxWidth(this, maxFrozenWidth);
|
|
71731
72465
|
}
|
|
72466
|
+
_getMaxRightFrozenWidth() {
|
|
72467
|
+
const maxRightFrozenWidth = this.options.maxRightFrozenWidth ?? this.options.maxFrozenWidth ?? '80%';
|
|
72468
|
+
return _toPxWidth(this, maxRightFrozenWidth);
|
|
72469
|
+
}
|
|
71732
72470
|
_getComputedFrozenColCount(frozenColCount) {
|
|
71733
72471
|
const maxFrozenWidth = this._getMaxFrozenWidth();
|
|
71734
72472
|
let computedfrozenColCount = frozenColCount;
|
|
@@ -72374,7 +73112,11 @@
|
|
|
72374
73112
|
relativeY = false;
|
|
72375
73113
|
}
|
|
72376
73114
|
const cellRect = this.getCellRect(col, row);
|
|
72377
|
-
|
|
73115
|
+
const rect = this._toRelativeRect(cellRect, relativeX, relativeY);
|
|
73116
|
+
if (isFrozenCell?.col && !this.isRightFrozenColumn(col, row)) {
|
|
73117
|
+
rect.offsetLeft(-this.getFrozenColsScrollLeft());
|
|
73118
|
+
}
|
|
73119
|
+
return rect;
|
|
72378
73120
|
}
|
|
72379
73121
|
getCellRangeRelativeRect(range) {
|
|
72380
73122
|
if (range.start) {
|
|
@@ -72391,7 +73133,11 @@
|
|
|
72391
73133
|
else if (isFrozenCell?.row) {
|
|
72392
73134
|
relativeY = false;
|
|
72393
73135
|
}
|
|
72394
|
-
|
|
73136
|
+
const rect = this._toRelativeRect(this.getCellsRect(range.start.col, range.start.row, range.end.col, range.end.row), relativeX, relativeY);
|
|
73137
|
+
if (isFrozenCell?.col && !this.isRightFrozenColumn(range.start.col, range.start.row)) {
|
|
73138
|
+
rect.offsetLeft(-this.getFrozenColsScrollLeft());
|
|
73139
|
+
}
|
|
73140
|
+
return rect;
|
|
72395
73141
|
}
|
|
72396
73142
|
const cellRange = this.getCellRange(range.col, range.row);
|
|
72397
73143
|
const isFrozenCell = this.isFrozenCell(range.col, range.row);
|
|
@@ -72407,7 +73153,11 @@
|
|
|
72407
73153
|
else if (isFrozenCell?.row) {
|
|
72408
73154
|
relativeY = false;
|
|
72409
73155
|
}
|
|
72410
|
-
|
|
73156
|
+
const rect = this._toRelativeRect(this.getCellsRect(cellRange.start.col, cellRange.start.row, cellRange.end.col, cellRange.end.row), relativeX, relativeY);
|
|
73157
|
+
if (isFrozenCell?.col && !this.isRightFrozenColumn(range.col, range.row)) {
|
|
73158
|
+
rect.offsetLeft(-this.getFrozenColsScrollLeft());
|
|
73159
|
+
}
|
|
73160
|
+
return rect;
|
|
72411
73161
|
}
|
|
72412
73162
|
getVisibleCellRangeRelativeRect(range) {
|
|
72413
73163
|
let cellRange;
|
|
@@ -72591,7 +73341,7 @@
|
|
|
72591
73341
|
const { scrollTop, scrollLeft } = this;
|
|
72592
73342
|
const width = this.tableNoFrameWidth;
|
|
72593
73343
|
const height = this.tableNoFrameHeight;
|
|
72594
|
-
return new Rect$1(scrollLeft, scrollTop, width, height);
|
|
73344
|
+
return new Rect$1(scrollLeft + this.getFrozenColsOffset(), scrollTop, width, height);
|
|
72595
73345
|
}
|
|
72596
73346
|
get visibleRowCount() {
|
|
72597
73347
|
const { frozenRowCount } = this;
|
|
@@ -72619,16 +73369,17 @@
|
|
|
72619
73369
|
getBodyVisibleCellRange() {
|
|
72620
73370
|
const { scrollTop, scrollLeft } = this;
|
|
72621
73371
|
const frozenRowsHeight = this.getFrozenRowsHeight();
|
|
72622
|
-
const
|
|
73372
|
+
const frozenColsContentWidth = this.getFrozenColsContentWidth();
|
|
73373
|
+
const frozenColsOffset = this.getFrozenColsOffset();
|
|
72623
73374
|
const bottomFrozenRowsHeight = this.getBottomFrozenRowsHeight();
|
|
72624
73375
|
const rightFrozenColsWidth = this.getRightFrozenColsWidth();
|
|
72625
73376
|
const { row: rowStart } = this.getRowAt(scrollTop + frozenRowsHeight + 1);
|
|
72626
|
-
const { col: colStart } = this.getColAt(scrollLeft +
|
|
73377
|
+
const { col: colStart } = this.getColAt(scrollLeft + frozenColsContentWidth + 1);
|
|
72627
73378
|
const rowEnd = this.getAllRowsHeight() > this.tableNoFrameHeight
|
|
72628
73379
|
? this.getRowAt(scrollTop + this.tableNoFrameHeight - 1 - bottomFrozenRowsHeight).row
|
|
72629
73380
|
: this.rowCount - 1;
|
|
72630
73381
|
const colEnd = this.getAllColsWidth() > this.tableNoFrameWidth
|
|
72631
|
-
? this.getColAt(scrollLeft + this.tableNoFrameWidth - 1 - rightFrozenColsWidth).col
|
|
73382
|
+
? this.getColAt(scrollLeft + frozenColsOffset + this.tableNoFrameWidth - 1 - rightFrozenColsWidth).col
|
|
72632
73383
|
: this.colCount - 1;
|
|
72633
73384
|
if (colEnd < 0 || rowEnd < 0) {
|
|
72634
73385
|
return null;
|
|
@@ -72650,11 +73401,13 @@
|
|
|
72650
73401
|
}
|
|
72651
73402
|
getBodyVisibleColRange(start_deltaX = 0, end_deltaX = 0) {
|
|
72652
73403
|
const { scrollLeft } = this;
|
|
72653
|
-
const
|
|
73404
|
+
const frozenColsContentWidth = this.getFrozenColsContentWidth();
|
|
73405
|
+
const frozenColsOffset = this.getFrozenColsOffset();
|
|
72654
73406
|
const rightFrozenColsWidth = this.getRightFrozenColsWidth();
|
|
72655
|
-
const { col: colStart } = this.getColAt(scrollLeft +
|
|
73407
|
+
const { col: colStart } = this.getColAt(scrollLeft + frozenColsContentWidth + 1 + start_deltaX);
|
|
72656
73408
|
const colEnd = this.getAllColsWidth() > this.tableNoFrameWidth
|
|
72657
|
-
? this.getColAt(scrollLeft + this.tableNoFrameWidth - 1 - rightFrozenColsWidth + end_deltaX)
|
|
73409
|
+
? this.getColAt(scrollLeft + frozenColsOffset + this.tableNoFrameWidth - 1 - rightFrozenColsWidth + end_deltaX)
|
|
73410
|
+
.col
|
|
72658
73411
|
: this.colCount - 1;
|
|
72659
73412
|
if (colEnd < 0) {
|
|
72660
73413
|
return null;
|
|
@@ -72664,7 +73417,7 @@
|
|
|
72664
73417
|
get visibleColCount() {
|
|
72665
73418
|
const { frozenColCount } = this;
|
|
72666
73419
|
const visibleRect = this.getVisibleRect();
|
|
72667
|
-
const visibleLeft = frozenColCount > 0 ? visibleRect.left + this.
|
|
73420
|
+
const visibleLeft = frozenColCount > 0 ? visibleRect.left + this.getFrozenColsWidth() : visibleRect.left;
|
|
72668
73421
|
const initCol = this.getTargetColAt(visibleLeft);
|
|
72669
73422
|
if (!initCol) {
|
|
72670
73423
|
return 0;
|
|
@@ -72728,14 +73481,51 @@
|
|
|
72728
73481
|
}
|
|
72729
73482
|
}
|
|
72730
73483
|
release() {
|
|
73484
|
+
if (typeof window !== 'undefined') {
|
|
73485
|
+
const g = window;
|
|
73486
|
+
if (g?.[this.id] === this) {
|
|
73487
|
+
delete g[this.id];
|
|
73488
|
+
}
|
|
73489
|
+
else if (g?.[this.id]) {
|
|
73490
|
+
g[this.id] = null;
|
|
73491
|
+
}
|
|
73492
|
+
const registry = g?.__vtable__;
|
|
73493
|
+
if (registry?.byId?.[this.id] === this) {
|
|
73494
|
+
delete registry.byId[this.id];
|
|
73495
|
+
}
|
|
73496
|
+
const list = registry?.list;
|
|
73497
|
+
if (Array.isArray(list) && list.length) {
|
|
73498
|
+
for (let i = list.length - 1; i >= 0; i--) {
|
|
73499
|
+
if (list[i] === this) {
|
|
73500
|
+
list.splice(i, 1);
|
|
73501
|
+
}
|
|
73502
|
+
}
|
|
73503
|
+
}
|
|
73504
|
+
if (registry?.last === this) {
|
|
73505
|
+
registry.last = Array.isArray(list) && list.length ? list[list.length - 1] : null;
|
|
73506
|
+
}
|
|
73507
|
+
if (g?.__vtable_last_id__ === this.id) {
|
|
73508
|
+
g.__vtable_last_id__ = registry?.last?.id ?? null;
|
|
73509
|
+
}
|
|
73510
|
+
}
|
|
73511
|
+
if (this.isReleased) {
|
|
73512
|
+
return;
|
|
73513
|
+
}
|
|
72731
73514
|
this.scenegraph?.component?.vScrollBar?.release();
|
|
72732
73515
|
this.scenegraph?.component?.hScrollBar?.release();
|
|
72733
73516
|
this.animationManager.clear();
|
|
72734
73517
|
this.animationManager.ticker.release();
|
|
72735
73518
|
this.scenegraph?.stage?.ticker?.release();
|
|
72736
73519
|
const internalProps = this.internalProps;
|
|
72737
|
-
|
|
72738
|
-
|
|
73520
|
+
const canvas = internalProps?.canvas;
|
|
73521
|
+
if (canvas?.__vtable__ === this) {
|
|
73522
|
+
delete canvas.__vtable__;
|
|
73523
|
+
delete canvas.__vtable_id__;
|
|
73524
|
+
}
|
|
73525
|
+
const element = internalProps?.element;
|
|
73526
|
+
if (element?.__vtable__ === this) {
|
|
73527
|
+
delete element.__vtable__;
|
|
73528
|
+
delete element.__vtable_id__;
|
|
72739
73529
|
}
|
|
72740
73530
|
this.clearCorrectTimer();
|
|
72741
73531
|
internalProps.tooltipHandler?.release?.();
|
|
@@ -72981,8 +73771,23 @@
|
|
|
72981
73771
|
return height;
|
|
72982
73772
|
}
|
|
72983
73773
|
getFrozenColsWidth() {
|
|
72984
|
-
const
|
|
72985
|
-
|
|
73774
|
+
const contentWidth = this.getFrozenColsContentWidth();
|
|
73775
|
+
if (!this.options.scrollFrozenCols) {
|
|
73776
|
+
return contentWidth;
|
|
73777
|
+
}
|
|
73778
|
+
const maxFrozenWidth = this._getMaxFrozenWidth();
|
|
73779
|
+
return Math.min(contentWidth, maxFrozenWidth);
|
|
73780
|
+
}
|
|
73781
|
+
getFrozenColsContentWidth() {
|
|
73782
|
+
return this.getColsWidth(0, this.frozenColCount - 1);
|
|
73783
|
+
}
|
|
73784
|
+
getFrozenColsOffset() {
|
|
73785
|
+
const contentWidth = this.getFrozenColsContentWidth();
|
|
73786
|
+
const viewportWidth = this.getFrozenColsWidth();
|
|
73787
|
+
return Math.max(0, contentWidth - viewportWidth);
|
|
73788
|
+
}
|
|
73789
|
+
getFrozenColsScrollLeft() {
|
|
73790
|
+
return this.stateManager.scroll.frozenHorizontalBarPos ?? 0;
|
|
72986
73791
|
}
|
|
72987
73792
|
getBottomFrozenRowsHeight() {
|
|
72988
73793
|
if (this.bottomFrozenRowCount > 0) {
|
|
@@ -72995,6 +73800,14 @@
|
|
|
72995
73800
|
return 0;
|
|
72996
73801
|
}
|
|
72997
73802
|
getRightFrozenColsWidth() {
|
|
73803
|
+
const contentWidth = this.getRightFrozenColsContentWidth();
|
|
73804
|
+
if (!this.options.scrollRightFrozenCols) {
|
|
73805
|
+
return contentWidth;
|
|
73806
|
+
}
|
|
73807
|
+
const maxRightFrozenWidth = this._getMaxRightFrozenWidth();
|
|
73808
|
+
return Math.min(contentWidth, maxRightFrozenWidth);
|
|
73809
|
+
}
|
|
73810
|
+
getRightFrozenColsContentWidth() {
|
|
72998
73811
|
if (this.rightFrozenColCount > 0) {
|
|
72999
73812
|
let width = 0;
|
|
73000
73813
|
for (let col = this.colCount - this.rightFrozenColCount; col <= this.colCount - 1; col++) {
|
|
@@ -73004,6 +73817,14 @@
|
|
|
73004
73817
|
}
|
|
73005
73818
|
return 0;
|
|
73006
73819
|
}
|
|
73820
|
+
getRightFrozenColsOffset() {
|
|
73821
|
+
const contentWidth = this.getRightFrozenColsContentWidth();
|
|
73822
|
+
const viewportWidth = this.getRightFrozenColsWidth();
|
|
73823
|
+
return Math.max(0, contentWidth - viewportWidth);
|
|
73824
|
+
}
|
|
73825
|
+
getRightFrozenColsScrollLeft() {
|
|
73826
|
+
return this.stateManager.scroll.rightFrozenHorizontalBarPos ?? 0;
|
|
73827
|
+
}
|
|
73007
73828
|
getDrawRange() {
|
|
73008
73829
|
const width = this.containerFit?.width
|
|
73009
73830
|
? this.tableNoFrameWidth
|
|
@@ -95491,7 +96312,7 @@
|
|
|
95491
96312
|
}
|
|
95492
96313
|
|
|
95493
96314
|
registerForVrender();
|
|
95494
|
-
const version = "1.
|
|
96315
|
+
const version = "1.25.1-alpha.0";
|
|
95495
96316
|
function getIcons() {
|
|
95496
96317
|
return get$2();
|
|
95497
96318
|
}
|