@visactor/vtable 1.26.2 → 1.26.3-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/dataset/DataStatistics.js +1 -2
- package/cjs/edit/edit-manager.js +1 -0
- package/cjs/event/EventHandler.js +1 -1
- package/cjs/event/EventTarget.js +1 -1
- package/cjs/event/drill.js +1 -1
- package/cjs/event/event.js +1 -1
- package/cjs/event/helper.js +1 -1
- package/cjs/event/media-click.js +1 -1
- package/cjs/event/scroll.js +1 -1
- package/cjs/event/sparkline-event.js +1 -1
- package/cjs/event/util.js +1 -1
- package/cjs/header-helper/style.js +2 -1
- package/cjs/layout/pivot-header-layout.js +0 -1
- package/cjs/plugins/index.js +1 -1
- package/cjs/plugins/interface.js +1 -1
- package/cjs/plugins/invert-highlight.js +1 -1
- package/cjs/plugins/list-tree-stick-cell.js +1 -1
- package/cjs/plugins/plugin-manager.js +1 -1
- package/cjs/scenegraph/component/table-component.js +41 -50
- package/cjs/scenegraph/component/table-component.js.map +1 -1
- package/cjs/scenegraph/component/util.d.ts +1 -0
- package/cjs/scenegraph/component/util.js +9 -1
- package/cjs/scenegraph/component/util.js.map +1 -1
- package/cjs/scenegraph/scenegraph.js +6 -4
- package/cjs/scenegraph/scenegraph.js.map +1 -1
- package/cjs/state/state.js +16 -16
- package/cjs/state/state.js.map +1 -1
- package/cjs/themes/ARCO.js +1 -1
- package/cjs/themes/BRIGHT.js +1 -1
- package/dist/vtable.js +80 -78
- package/dist/vtable.min.js +1 -1
- package/es/dataset/DataStatistics.js +1 -2
- package/es/edit/edit-manager.js +2 -1
- package/es/event/EventHandler.js +1 -1
- package/es/event/EventTarget.js +1 -1
- package/es/event/drill.js +1 -1
- package/es/event/event.js +1 -1
- package/es/event/helper.js +1 -1
- package/es/event/media-click.js +1 -1
- package/es/event/scroll.js +1 -1
- package/es/event/sparkline-event.js +1 -1
- package/es/event/util.js +1 -1
- package/es/header-helper/style.js +2 -1
- package/es/layout/pivot-header-layout.js +1 -2
- package/es/plugins/index.js +1 -1
- package/es/plugins/interface.js +1 -1
- package/es/plugins/invert-highlight.js +1 -1
- package/es/plugins/list-tree-stick-cell.js +1 -1
- package/es/plugins/plugin-manager.js +1 -1
- package/es/scenegraph/component/table-component.js +41 -51
- package/es/scenegraph/component/table-component.js.map +1 -1
- package/es/scenegraph/component/util.d.ts +1 -0
- package/es/scenegraph/component/util.js +6 -0
- package/es/scenegraph/component/util.js.map +1 -1
- package/es/scenegraph/scenegraph.js +6 -4
- package/es/scenegraph/scenegraph.js.map +1 -1
- package/es/state/state.js +16 -14
- package/es/state/state.js.map +1 -1
- package/es/themes/ARCO.js +1 -1
- package/es/themes/BRIGHT.js +1 -1
- package/package.json +4 -4
package/es/state/state.js
CHANGED
|
@@ -30,6 +30,8 @@ import { endMoveCol, startMoveCol, updateMoveCol } from "./cell-move";
|
|
|
30
30
|
|
|
31
31
|
import { getIconAndPositionFromTarget } from "../scenegraph/utils/icon";
|
|
32
32
|
|
|
33
|
+
import { getBodyHorizontalScrollRange } from "../scenegraph/component/util";
|
|
34
|
+
|
|
33
35
|
import { debounce } from "../tools/debounce";
|
|
34
36
|
|
|
35
37
|
import { updateResizeColumn } from "./resize/update-resize-column";
|
|
@@ -530,8 +532,8 @@ export class StateManager {
|
|
|
530
532
|
}), oldVerticalBarPos !== this.scroll.verticalBarPos && this.checkVerticalScrollBarEnd();
|
|
531
533
|
}
|
|
532
534
|
updateHorizontalScrollBar(xRatio) {
|
|
533
|
-
var _a, _b, _c, _d
|
|
534
|
-
const
|
|
535
|
+
var _a, _b, _c, _d;
|
|
536
|
+
const oldHorizontalBarPos = this.scroll.horizontalBarPos, scrollRange = getBodyHorizontalScrollRange(this.table);
|
|
535
537
|
let horizontalBarPos = Math.ceil(xRatio * scrollRange);
|
|
536
538
|
isValid(horizontalBarPos) && !isNaN(horizontalBarPos) || (horizontalBarPos = 0);
|
|
537
539
|
const dx = horizontalBarPos - this.table.scenegraph.proxy.deltaX - oldHorizontalBarPos;
|
|
@@ -539,8 +541,8 @@ export class StateManager {
|
|
|
539
541
|
event: void 0,
|
|
540
542
|
scrollTop: this.scroll.verticalBarPos,
|
|
541
543
|
scrollLeft: horizontalBarPos - this.table.scenegraph.proxy.deltaX,
|
|
542
|
-
scrollHeight: null === (
|
|
543
|
-
scrollWidth: null === (
|
|
544
|
+
scrollHeight: null === (_a = this.table.theme.scrollStyle) || void 0 === _a ? void 0 : _a.width,
|
|
545
|
+
scrollWidth: null === (_b = this.table.theme.scrollStyle) || void 0 === _b ? void 0 : _b.width,
|
|
544
546
|
viewHeight: this.table.tableNoFrameHeight,
|
|
545
547
|
viewWidth: this.table.tableNoFrameWidth,
|
|
546
548
|
scrollDirection: "horizontal",
|
|
@@ -555,8 +557,8 @@ export class StateManager {
|
|
|
555
557
|
event: void 0,
|
|
556
558
|
scrollTop: this.scroll.verticalBarPos,
|
|
557
559
|
scrollLeft: this.scroll.horizontalBarPos,
|
|
558
|
-
scrollHeight: null === (
|
|
559
|
-
scrollWidth: null === (
|
|
560
|
+
scrollHeight: null === (_c = this.table.theme.scrollStyle) || void 0 === _c ? void 0 : _c.width,
|
|
561
|
+
scrollWidth: null === (_d = this.table.theme.scrollStyle) || void 0 === _d ? void 0 : _d.width,
|
|
560
562
|
viewHeight: this.table.tableNoFrameHeight,
|
|
561
563
|
viewWidth: this.table.tableNoFrameWidth,
|
|
562
564
|
scrollDirection: "horizontal",
|
|
@@ -609,13 +611,13 @@ export class StateManager {
|
|
|
609
611
|
}), oldVerticalBarPos !== top && triggerEvent && this.checkVerticalScrollBarEnd();
|
|
610
612
|
}
|
|
611
613
|
setScrollLeft(left, event, triggerEvent = !0) {
|
|
612
|
-
var _a, _b, _c, _d, _e, _f, _g
|
|
614
|
+
var _a, _b, _c, _d, _e, _f, _g;
|
|
613
615
|
if (!this.table || !this.table.scenegraph) return;
|
|
614
616
|
this.table.scrollLeft;
|
|
615
|
-
const
|
|
617
|
+
const scrollRange = getBodyHorizontalScrollRange(this.table), sizeTolerance = (null === (_a = this.table.options.customConfig) || void 0 === _a ? void 0 : _a._disableColumnAndRowSizeRound) ? 1 : 0;
|
|
616
618
|
left = Math.max(0, Math.min(left, scrollRange - sizeTolerance)), left = Math.ceil(left);
|
|
617
619
|
const oldHorizontalBarPos = this.scroll.horizontalBarPos, xRatio = scrollRange ? left / scrollRange : 0;
|
|
618
|
-
if ((oldHorizontalBarPos !== left || !0 === (null === (
|
|
620
|
+
if ((oldHorizontalBarPos !== left || !0 === (null === (_c = null === (_b = this.table.options) || void 0 === _b ? void 0 : _b.customConfig) || void 0 === _c ? void 0 : _c.scrollEventAlwaysTrigger)) && triggerEvent) {
|
|
619
621
|
let horizontalBarPos = left;
|
|
620
622
|
isValid(horizontalBarPos) && !isNaN(horizontalBarPos) || (horizontalBarPos = 0);
|
|
621
623
|
const dx = horizontalBarPos - oldHorizontalBarPos;
|
|
@@ -623,8 +625,8 @@ export class StateManager {
|
|
|
623
625
|
event: null == event ? void 0 : event.nativeEvent,
|
|
624
626
|
scrollTop: this.scroll.verticalBarPos,
|
|
625
627
|
scrollLeft: horizontalBarPos,
|
|
626
|
-
scrollHeight: null === (
|
|
627
|
-
scrollWidth: null === (
|
|
628
|
+
scrollHeight: null === (_d = this.table.theme.scrollStyle) || void 0 === _d ? void 0 : _d.width,
|
|
629
|
+
scrollWidth: null === (_e = this.table.theme.scrollStyle) || void 0 === _e ? void 0 : _e.width,
|
|
628
630
|
viewHeight: this.table.tableNoFrameHeight,
|
|
629
631
|
viewWidth: this.table.tableNoFrameWidth,
|
|
630
632
|
scrollDirection: "horizontal",
|
|
@@ -643,8 +645,8 @@ export class StateManager {
|
|
|
643
645
|
event: null == event ? void 0 : event.nativeEvent,
|
|
644
646
|
scrollTop: this.scroll.verticalBarPos,
|
|
645
647
|
scrollLeft: this.scroll.horizontalBarPos,
|
|
646
|
-
scrollHeight: null === (
|
|
647
|
-
scrollWidth: null === (
|
|
648
|
+
scrollHeight: null === (_f = this.table.theme.scrollStyle) || void 0 === _f ? void 0 : _f.width,
|
|
649
|
+
scrollWidth: null === (_g = this.table.theme.scrollStyle) || void 0 === _g ? void 0 : _g.width,
|
|
648
650
|
viewHeight: this.table.tableNoFrameHeight,
|
|
649
651
|
viewWidth: this.table.tableNoFrameWidth,
|
|
650
652
|
scrollDirection: "horizontal",
|
|
@@ -907,4 +909,4 @@ export class StateManager {
|
|
|
907
909
|
deletaCustomSelectRanges(this), addCustomSelectRanges(customSelectRanges, this);
|
|
908
910
|
}
|
|
909
911
|
}
|
|
910
|
-
//# sourceMappingURL=state.js.map
|
|
912
|
+
//# sourceMappingURL=state.js.map
|