@visactor/vtable-gantt 1.26.2-none → 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/event/EventTarget.js +2 -1
- package/cjs/event/touch.js +0 -1
- package/cjs/index.d.ts +1 -1
- package/cjs/index.js +1 -1
- package/cjs/index.js.map +1 -1
- package/cjs/scenegraph/timeline-header.js +2 -1
- package/cjs/tools/debounce.js +1 -2
- package/dist/vtable-gantt.js +76 -80
- package/dist/vtable-gantt.min.js +1 -1
- package/es/event/EventTarget.js +2 -1
- package/es/event/touch.js +1 -2
- package/es/index.d.ts +1 -1
- package/es/index.js +1 -1
- package/es/index.js.map +1 -1
- package/es/scenegraph/timeline-header.js +2 -1
- package/es/tools/debounce.js +1 -2
- package/package.json +5 -5
package/cjs/event/EventTarget.js
CHANGED
package/cjs/event/touch.js
CHANGED
package/cjs/index.d.ts
CHANGED
|
@@ -6,5 +6,5 @@ import * as tools from './tools';
|
|
|
6
6
|
import * as VRender from './vrender';
|
|
7
7
|
import * as VTable from './vtable';
|
|
8
8
|
import * as plugins from './plugins';
|
|
9
|
-
export declare const version = "1.26.2
|
|
9
|
+
export declare const version = "1.26.2";
|
|
10
10
|
export { TYPES, GanttConstructorOptions, Gantt, ColumnsDefine, ColumnDefine, LinkColumnDefine, ChartColumnDefine, ImageColumnDefine, SparklineColumnDefine, ProgressbarColumnDefine, TextColumnDefine, GroupColumnDefine, TextAlignType, TextBaselineType, tools, VRender, VTable, plugins };
|
package/cjs/index.js
CHANGED
package/cjs/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AACA,kDAAoC;AAwBlC,sBAAK;AAVP,mCAAgC;AAY9B,sFAZO,aAAK,OAYP;AAXP,+CAAiC;AAuB/B,sBAAK;AAtBP,mDAAqC;AAuBnC,0BAAO;AAtBT,iDAAmC;AAuBjC,wBAAM;AAtBR,mDAAqC;AAuBnC,0BAAO;AAtBI,QAAA,OAAO,GAAG,
|
|
1
|
+
{"version":3,"sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AACA,kDAAoC;AAwBlC,sBAAK;AAVP,mCAAgC;AAY9B,sFAZO,aAAK,OAYP;AAXP,+CAAiC;AAuB/B,sBAAK;AAtBP,mDAAqC;AAuBnC,0BAAO;AAtBT,iDAAmC;AAuBjC,wBAAM;AAtBR,mDAAqC;AAuBnC,0BAAO;AAtBI,QAAA,OAAO,GAAG,QAAQ,CAAC","file":"index.js","sourcesContent":["import type { GanttConstructorOptions } from './ts-types';\nimport * as TYPES from './ts-types';\nimport type {\n ColumnDefine,\n ColumnsDefine,\n LinkColumnDefine,\n ChartColumnDefine,\n ImageColumnDefine,\n SparklineColumnDefine,\n ProgressbarColumnDefine,\n TextColumnDefine,\n GroupColumnDefine,\n TextAlignType,\n TextBaselineType\n} from '@visactor/vtable';\nimport { Gantt } from './Gantt';\nimport * as tools from './tools';\nimport * as VRender from './vrender';\nimport * as VTable from './vtable';\nimport * as plugins from './plugins';\nexport const version = \"1.26.2\";\n/**\n * @namespace VTableGantt\n */\nexport {\n TYPES,\n GanttConstructorOptions,\n Gantt,\n ColumnsDefine,\n ColumnDefine,\n LinkColumnDefine,\n ChartColumnDefine,\n ImageColumnDefine,\n SparklineColumnDefine,\n ProgressbarColumnDefine,\n TextColumnDefine,\n GroupColumnDefine,\n TextAlignType,\n TextBaselineType,\n tools,\n VRender,\n VTable,\n plugins\n};\n"]}
|
package/cjs/tools/debounce.js
CHANGED
package/dist/vtable-gantt.js
CHANGED
|
@@ -47166,6 +47166,17 @@
|
|
|
47166
47166
|
}
|
|
47167
47167
|
}
|
|
47168
47168
|
|
|
47169
|
+
function getBodyHorizontalScrollRange(table) {
|
|
47170
|
+
var _a, _b, _c, _d;
|
|
47171
|
+
const totalWidth = table.getAllColsWidth(),
|
|
47172
|
+
frozenColsWidth = table.getFrozenColsWidth(),
|
|
47173
|
+
rightFrozenColsWidth = table.getRightFrozenColsWidth(),
|
|
47174
|
+
frozenColsContentWidth = null !== (_b = null === (_a = table.getFrozenColsContentWidth) || void 0 === _a ? void 0 : _a.call(table)) && void 0 !== _b ? _b : frozenColsWidth,
|
|
47175
|
+
rightFrozenColsContentWidth = null !== (_d = null === (_c = table.getRightFrozenColsContentWidth) || void 0 === _c ? void 0 : _c.call(table)) && void 0 !== _d ? _d : rightFrozenColsWidth,
|
|
47176
|
+
bodyViewportWidth = table.tableNoFrameWidth - frozenColsWidth - rightFrozenColsWidth,
|
|
47177
|
+
bodyContentWidth = totalWidth - frozenColsContentWidth - rightFrozenColsContentWidth;
|
|
47178
|
+
return Math.max(0, bodyContentWidth - bodyViewportWidth);
|
|
47179
|
+
}
|
|
47169
47180
|
function getColX(col, table, isRightFrozen) {
|
|
47170
47181
|
var _a, _b, _c, _d, _e, _f;
|
|
47171
47182
|
if (isRightFrozen) return Math.min(table.tableNoFrameWidth, table.getAllColsWidth()) - table.getColsWidth(col, table.colCount - 1) + (null !== (_b = null === (_a = table.getRightFrozenColsScrollLeft) || void 0 === _a ? void 0 : _a.call(table)) && void 0 !== _b ? _b : 0);
|
|
@@ -47458,17 +47469,18 @@
|
|
|
47458
47469
|
rightFrozenColsWidth = this.table.getRightFrozenColsWidth(),
|
|
47459
47470
|
rightFrozenColsContentWidth = null !== (_m = null === (_l = (_k = this.table).getRightFrozenColsContentWidth) || void 0 === _l ? void 0 : _l.call(_k)) && void 0 !== _m ? _m : rightFrozenColsWidth,
|
|
47460
47471
|
hoverOn = this.table.theme.scrollStyle.hoverOn,
|
|
47461
|
-
sizeTolerance = (null === (_o = this.table.options.customConfig) || void 0 === _o ? void 0 : _o._disableColumnAndRowSizeRound) ? 1 : 0
|
|
47462
|
-
|
|
47463
|
-
|
|
47464
|
-
|
|
47465
|
-
|
|
47472
|
+
sizeTolerance = (null === (_o = this.table.options.customConfig) || void 0 === _o ? void 0 : _o._disableColumnAndRowSizeRound) ? 1 : 0,
|
|
47473
|
+
bodyScrollRange = getBodyHorizontalScrollRange(this.table),
|
|
47474
|
+
y = Math.min(tableHeight, totalHeight);
|
|
47475
|
+
let attrY = 0;
|
|
47476
|
+
attrY = this.table.theme.scrollStyle.barToSide ? this.table.tableNoFrameHeight - (hoverOn ? width : -this.table.scenegraph.tableGroup.attribute.y) + this.table.tableY : y - (hoverOn ? width : -this.table.scenegraph.tableGroup.attribute.y);
|
|
47477
|
+
const ignoreFrozenCols = null !== (_q = null === (_p = this.table.theme.scrollStyle) || void 0 === _p ? void 0 : _p.ignoreFrozenCols) && void 0 !== _q && _q;
|
|
47478
|
+
if (bodyScrollRange > sizeTolerance) {
|
|
47479
|
+
const bodyViewportWidth = tableWidth - frozenColsWidth - rightFrozenColsWidth,
|
|
47480
|
+
bodyContentWidth = bodyViewportWidth + bodyScrollRange,
|
|
47466
47481
|
rangeEnd = bodyContentWidth > 0 ? Math.max(.05, bodyViewportWidth / bodyContentWidth) : 1;
|
|
47467
|
-
let attrY = 0;
|
|
47468
|
-
attrY = this.table.theme.scrollStyle.barToSide ? this.table.tableNoFrameHeight - (hoverOn ? width : -this.table.scenegraph.tableGroup.attribute.y) + this.table.tableY : y - (hoverOn ? width : -this.table.scenegraph.tableGroup.attribute.y);
|
|
47469
47482
|
let hScrollBarx = frozenColsWidth + (hoverOn ? 0 : this.table.scenegraph.tableGroup.attribute.x),
|
|
47470
47483
|
hScrollBarWidth = tableWidth - frozenColsWidth - rightFrozenColsWidth;
|
|
47471
|
-
const ignoreFrozenCols = null !== (_q = null === (_p = this.table.theme.scrollStyle) || void 0 === _p ? void 0 : _p.ignoreFrozenCols) && void 0 !== _q && _q;
|
|
47472
47484
|
ignoreFrozenCols ? (hScrollBarx = hoverOn ? 0 : this.table.scenegraph.tableGroup.attribute.x, hScrollBarWidth = tableWidth) : (hScrollBarx = frozenColsWidth + (hoverOn ? 0 : this.table.scenegraph.tableGroup.attribute.x), hScrollBarWidth = tableWidth - frozenColsWidth - rightFrozenColsWidth), this.hScrollBar.setAttributes({
|
|
47473
47485
|
x: hScrollBarx,
|
|
47474
47486
|
y: attrY,
|
|
@@ -47481,61 +47493,51 @@
|
|
|
47481
47493
|
x: bounds.x1,
|
|
47482
47494
|
y: bounds.y1
|
|
47483
47495
|
}, "always" === horizontalVisible && this.hScrollBar.showAll();
|
|
47484
|
-
const frozenScrollable = this.table.options.scrollFrozenCols && this.table.getFrozenColsOffset() > 0;
|
|
47485
|
-
if (!ignoreFrozenCols && frozenScrollable) {
|
|
47486
|
-
const frozenRangeEnd = Math.max(.05, frozenColsWidth / frozenColsContentWidth),
|
|
47487
|
-
x = hoverOn ? 0 : this.table.scenegraph.tableGroup.attribute.x;
|
|
47488
|
-
this.frozenHScrollBar.setAttributes({
|
|
47489
|
-
x: x,
|
|
47490
|
-
y: attrY,
|
|
47491
|
-
width: frozenColsWidth,
|
|
47492
|
-
range: [0, frozenRangeEnd],
|
|
47493
|
-
visible: "always" === horizontalVisible
|
|
47494
|
-
});
|
|
47495
|
-
const bounds = this.frozenHScrollBar.AABBBounds && this.frozenHScrollBar.globalAABBBounds;
|
|
47496
|
-
this.frozenHScrollBar._viewPosition = {
|
|
47497
|
-
x: bounds.x1,
|
|
47498
|
-
y: bounds.y1
|
|
47499
|
-
}, "always" === horizontalVisible && this.frozenHScrollBar.showAll();
|
|
47500
|
-
} else this.frozenHScrollBar.setAttributes({
|
|
47501
|
-
x: 2 * -this.table.tableNoFrameWidth,
|
|
47502
|
-
y: 2 * -this.table.tableNoFrameHeight,
|
|
47503
|
-
width: 0,
|
|
47504
|
-
visible: !1
|
|
47505
|
-
});
|
|
47506
|
-
const rightFrozenScrollable = this.table.options.scrollRightFrozenCols && this.table.getRightFrozenColsOffset() > 0;
|
|
47507
|
-
if (!ignoreFrozenCols && rightFrozenScrollable) {
|
|
47508
|
-
const rightFrozenRangeEnd = Math.max(.05, rightFrozenColsWidth / rightFrozenColsContentWidth),
|
|
47509
|
-
x = tableWidth - rightFrozenColsWidth + (hoverOn ? 0 : this.table.scenegraph.tableGroup.attribute.x);
|
|
47510
|
-
this.rightFrozenHScrollBar.setAttributes({
|
|
47511
|
-
x: x,
|
|
47512
|
-
y: attrY,
|
|
47513
|
-
width: rightFrozenColsWidth,
|
|
47514
|
-
range: [0, rightFrozenRangeEnd],
|
|
47515
|
-
visible: "always" === horizontalVisible
|
|
47516
|
-
});
|
|
47517
|
-
const bounds = this.rightFrozenHScrollBar.AABBBounds && this.rightFrozenHScrollBar.globalAABBBounds;
|
|
47518
|
-
this.rightFrozenHScrollBar._viewPosition = {
|
|
47519
|
-
x: bounds.x1,
|
|
47520
|
-
y: bounds.y1
|
|
47521
|
-
}, "always" === horizontalVisible && this.rightFrozenHScrollBar.showAll();
|
|
47522
|
-
} else this.rightFrozenHScrollBar.setAttributes({
|
|
47523
|
-
x: 2 * -this.table.tableNoFrameWidth,
|
|
47524
|
-
y: 2 * -this.table.tableNoFrameHeight,
|
|
47525
|
-
width: 0,
|
|
47526
|
-
visible: !1
|
|
47527
|
-
});
|
|
47528
47496
|
} else this.hScrollBar.setAttributes({
|
|
47529
47497
|
x: 2 * -this.table.tableNoFrameWidth,
|
|
47530
47498
|
y: 2 * -this.table.tableNoFrameHeight,
|
|
47531
47499
|
width: 0,
|
|
47532
47500
|
visible: !1
|
|
47533
|
-
})
|
|
47501
|
+
});
|
|
47502
|
+
const frozenScrollable = this.table.options.scrollFrozenCols && this.table.getFrozenColsOffset() > 0;
|
|
47503
|
+
if (!ignoreFrozenCols && frozenScrollable) {
|
|
47504
|
+
const frozenRangeEnd = Math.max(.05, frozenColsWidth / frozenColsContentWidth),
|
|
47505
|
+
x = hoverOn ? 0 : this.table.scenegraph.tableGroup.attribute.x;
|
|
47506
|
+
this.frozenHScrollBar.setAttributes({
|
|
47507
|
+
x: x,
|
|
47508
|
+
y: attrY,
|
|
47509
|
+
width: frozenColsWidth,
|
|
47510
|
+
range: [0, frozenRangeEnd],
|
|
47511
|
+
visible: "always" === horizontalVisible
|
|
47512
|
+
});
|
|
47513
|
+
const bounds = this.frozenHScrollBar.AABBBounds && this.frozenHScrollBar.globalAABBBounds;
|
|
47514
|
+
this.frozenHScrollBar._viewPosition = {
|
|
47515
|
+
x: bounds.x1,
|
|
47516
|
+
y: bounds.y1
|
|
47517
|
+
}, "always" === horizontalVisible && this.frozenHScrollBar.showAll();
|
|
47518
|
+
} else this.frozenHScrollBar.setAttributes({
|
|
47534
47519
|
x: 2 * -this.table.tableNoFrameWidth,
|
|
47535
47520
|
y: 2 * -this.table.tableNoFrameHeight,
|
|
47536
47521
|
width: 0,
|
|
47537
47522
|
visible: !1
|
|
47538
|
-
})
|
|
47523
|
+
});
|
|
47524
|
+
const rightFrozenScrollable = this.table.options.scrollRightFrozenCols && this.table.getRightFrozenColsOffset() > 0;
|
|
47525
|
+
if (!ignoreFrozenCols && rightFrozenScrollable) {
|
|
47526
|
+
const rightFrozenRangeEnd = Math.max(.05, rightFrozenColsWidth / rightFrozenColsContentWidth),
|
|
47527
|
+
x = tableWidth - rightFrozenColsWidth + (hoverOn ? 0 : this.table.scenegraph.tableGroup.attribute.x);
|
|
47528
|
+
this.rightFrozenHScrollBar.setAttributes({
|
|
47529
|
+
x: x,
|
|
47530
|
+
y: attrY,
|
|
47531
|
+
width: rightFrozenColsWidth,
|
|
47532
|
+
range: [0, rightFrozenRangeEnd],
|
|
47533
|
+
visible: "always" === horizontalVisible
|
|
47534
|
+
});
|
|
47535
|
+
const bounds = this.rightFrozenHScrollBar.AABBBounds && this.rightFrozenHScrollBar.globalAABBBounds;
|
|
47536
|
+
this.rightFrozenHScrollBar._viewPosition = {
|
|
47537
|
+
x: bounds.x1,
|
|
47538
|
+
y: bounds.y1
|
|
47539
|
+
}, "always" === horizontalVisible && this.rightFrozenHScrollBar.showAll();
|
|
47540
|
+
} else this.rightFrozenHScrollBar.setAttributes({
|
|
47539
47541
|
x: 2 * -this.table.tableNoFrameWidth,
|
|
47540
47542
|
y: 2 * -this.table.tableNoFrameHeight,
|
|
47541
47543
|
width: 0,
|
|
@@ -54088,7 +54090,7 @@
|
|
|
54088
54090
|
setBodyAndColHeaderX(x) {
|
|
54089
54091
|
const firstBodyCol = this.bodyGroup.firstChild;
|
|
54090
54092
|
let lastBodyCol = this.bodyGroup.lastChild;
|
|
54091
|
-
lastBodyCol && "group" !== lastBodyCol.type && (lastBodyCol = lastBodyCol._prev), 0 === x && firstBodyCol && firstBodyCol.col === this.table.frozenColCount && firstBodyCol.attribute.x + x < 0 ? x = -firstBodyCol.attribute.x : lastBodyCol && this.table.tableNoFrameWidth < this.table.getAllColsWidth() && lastBodyCol.col === this.table.colCount - this.table.rightFrozenColCount - 1 && lastBodyCol.attribute.x + lastBodyCol.attribute.width + x < this.table.tableNoFrameWidth - this.table.getFrozenColsWidth() - this.table.getRightFrozenColsWidth() && (x = this.table.tableNoFrameWidth - this.table.getFrozenColsWidth() - this.table.getRightFrozenColsWidth() - lastBodyCol.attribute.x - lastBodyCol.attribute.width), this.table.getFrozenColsWidth() + x !== this.bodyGroup.attribute.x && (this.bodyGroup.setAttribute("x", this.table.getFrozenColsWidth() + x), this.colHeaderGroup.setAttribute("x", this.table.getFrozenColsWidth() + x), this.bodySelectGroup.setAttribute("x", this.bodyGroup.attribute.x), this.colHeaderSelectGroup.setAttribute("x", this.colHeaderGroup.attribute.x), this.rowHeaderSelectGroup.setAttribute("x", this.rowHeaderGroup.attribute.x), this.cornerHeaderSelectGroup.setAttribute("x", this.cornerHeaderGroup.attribute.x), this.table.bottomFrozenRowCount > 0 && (this.bottomFrozenGroup.setAttribute("x", this.table.getFrozenColsWidth() + x), this.bottomFrozenSelectGroup.setAttribute("x", this.bottomFrozenGroup.attribute.x), this.leftBottomCornerSelectGroup.setAttribute("x", this.leftBottomCornerGroup.attribute.x)), this.table.rightFrozenColCount > 0 && (this.rightFrozenSelectGroup.setAttribute("x", this.rightFrozenGroup.attribute.x), this.rightTopCornerSelectGroup.setAttribute("x", this.rightTopCornerGroup.attribute.x)), this.table.rightFrozenColCount > 0 && this.table.bottomFrozenRowCount > 0 && this.rightBottomCornerSelectGroup.setAttribute("x", this.rightBottomCornerGroup.attribute.x), this.updateNextFrame());
|
|
54093
|
+
lastBodyCol && "group" !== lastBodyCol.type && (lastBodyCol = lastBodyCol._prev), 0 === x && firstBodyCol && firstBodyCol.col === this.table.frozenColCount && firstBodyCol.attribute.x + x < 0 ? x = -firstBodyCol.attribute.x : lastBodyCol && this.table.tableNoFrameWidth < this.table.getAllColsWidth() && lastBodyCol.col === this.table.colCount - this.table.rightFrozenColCount - 1 && lastBodyCol.attribute.x + lastBodyCol.attribute.width + x < this.table.tableNoFrameWidth - this.table.getFrozenColsWidth() - this.table.getRightFrozenColsWidth() && (x = this.table.tableNoFrameWidth - this.table.getFrozenColsWidth() - this.table.getRightFrozenColsWidth() - lastBodyCol.attribute.x - lastBodyCol.attribute.width), this.table.options.scrollFrozenCols && x > 0 && (x = 0), this.table.getFrozenColsWidth() + x !== this.bodyGroup.attribute.x && (this.bodyGroup.setAttribute("x", this.table.getFrozenColsWidth() + x), this.colHeaderGroup.setAttribute("x", this.table.getFrozenColsWidth() + x), this.bodySelectGroup.setAttribute("x", this.bodyGroup.attribute.x), this.colHeaderSelectGroup.setAttribute("x", this.colHeaderGroup.attribute.x), this.rowHeaderSelectGroup.setAttribute("x", this.rowHeaderGroup.attribute.x), this.cornerHeaderSelectGroup.setAttribute("x", this.cornerHeaderGroup.attribute.x), this.table.bottomFrozenRowCount > 0 && (this.bottomFrozenGroup.setAttribute("x", this.table.getFrozenColsWidth() + x), this.bottomFrozenSelectGroup.setAttribute("x", this.bottomFrozenGroup.attribute.x), this.leftBottomCornerSelectGroup.setAttribute("x", this.leftBottomCornerGroup.attribute.x)), this.table.rightFrozenColCount > 0 && (this.rightFrozenSelectGroup.setAttribute("x", this.rightFrozenGroup.attribute.x), this.rightTopCornerSelectGroup.setAttribute("x", this.rightTopCornerGroup.attribute.x)), this.table.rightFrozenColCount > 0 && this.table.bottomFrozenRowCount > 0 && this.rightBottomCornerSelectGroup.setAttribute("x", this.rightBottomCornerGroup.attribute.x), this.updateNextFrame());
|
|
54092
54094
|
}
|
|
54093
54095
|
afterScenegraphCreated() {
|
|
54094
54096
|
var _a, _b;
|
|
@@ -54135,11 +54137,11 @@
|
|
|
54135
54137
|
let rowHeaderWidth = 0;
|
|
54136
54138
|
this.rowHeaderGroup.forEachChildrenSkipChild(column => {
|
|
54137
54139
|
rowHeaderWidth += column.attribute.width;
|
|
54138
|
-
}), this.rowHeaderGroup.setAttribute("width", rowHeaderWidth);
|
|
54140
|
+
}), table.options.scrollFrozenCols && (rowHeaderWidth = table.getFrozenColsWidth()), this.rowHeaderGroup.setAttribute("width", rowHeaderWidth);
|
|
54139
54141
|
let cornerHeaderWidth = 0;
|
|
54140
54142
|
this.cornerHeaderGroup.forEachChildrenSkipChild(column => {
|
|
54141
54143
|
cornerHeaderWidth += column.attribute.width;
|
|
54142
|
-
}), this.cornerHeaderGroup.setAttribute("width", cornerHeaderWidth), this.colHeaderGroup.setAttribute("x", this.cornerHeaderGroup.attribute.width), this.rowHeaderGroup.setAttribute("y", this.cornerHeaderGroup.attribute.height), this.bodyGroup.setAttributes({
|
|
54144
|
+
}), table.options.scrollFrozenCols && (cornerHeaderWidth = table.getFrozenColsWidth()), this.cornerHeaderGroup.setAttribute("width", cornerHeaderWidth), this.colHeaderGroup.setAttribute("x", this.cornerHeaderGroup.attribute.width), this.rowHeaderGroup.setAttribute("y", this.cornerHeaderGroup.attribute.height), this.bodyGroup.setAttributes({
|
|
54143
54145
|
x: this.rowHeaderGroup.attribute.width,
|
|
54144
54146
|
y: this.colHeaderGroup.attribute.height
|
|
54145
54147
|
});
|
|
@@ -56318,12 +56320,9 @@
|
|
|
56318
56320
|
}), oldVerticalBarPos !== this.scroll.verticalBarPos && this.checkVerticalScrollBarEnd();
|
|
56319
56321
|
}
|
|
56320
56322
|
updateHorizontalScrollBar(xRatio) {
|
|
56321
|
-
var _a, _b, _c, _d
|
|
56322
|
-
const
|
|
56323
|
-
|
|
56324
|
-
frozenOffset = null !== (_c = null === (_b = (_a = this.table).getFrozenColsOffset) || void 0 === _b ? void 0 : _b.call(_a)) && void 0 !== _c ? _c : 0,
|
|
56325
|
-
rightFrozenOffset = null !== (_f = null === (_e = (_d = this.table).getRightFrozenColsOffset) || void 0 === _e ? void 0 : _e.call(_d)) && void 0 !== _f ? _f : 0,
|
|
56326
|
-
scrollRange = Math.max(0, totalWidth - this.table.scenegraph.width - frozenOffset - rightFrozenOffset);
|
|
56323
|
+
var _a, _b, _c, _d;
|
|
56324
|
+
const oldHorizontalBarPos = this.scroll.horizontalBarPos,
|
|
56325
|
+
scrollRange = getBodyHorizontalScrollRange(this.table);
|
|
56327
56326
|
let horizontalBarPos = Math.ceil(xRatio * scrollRange);
|
|
56328
56327
|
isValid$1(horizontalBarPos) && !isNaN(horizontalBarPos) || (horizontalBarPos = 0);
|
|
56329
56328
|
const dx = horizontalBarPos - this.table.scenegraph.proxy.deltaX - oldHorizontalBarPos;
|
|
@@ -56331,8 +56330,8 @@
|
|
|
56331
56330
|
event: void 0,
|
|
56332
56331
|
scrollTop: this.scroll.verticalBarPos,
|
|
56333
56332
|
scrollLeft: horizontalBarPos - this.table.scenegraph.proxy.deltaX,
|
|
56334
|
-
scrollHeight: null === (
|
|
56335
|
-
scrollWidth: null === (
|
|
56333
|
+
scrollHeight: null === (_a = this.table.theme.scrollStyle) || void 0 === _a ? void 0 : _a.width,
|
|
56334
|
+
scrollWidth: null === (_b = this.table.theme.scrollStyle) || void 0 === _b ? void 0 : _b.width,
|
|
56336
56335
|
viewHeight: this.table.tableNoFrameHeight,
|
|
56337
56336
|
viewWidth: this.table.tableNoFrameWidth,
|
|
56338
56337
|
scrollDirection: "horizontal",
|
|
@@ -56345,8 +56344,8 @@
|
|
|
56345
56344
|
event: void 0,
|
|
56346
56345
|
scrollTop: this.scroll.verticalBarPos,
|
|
56347
56346
|
scrollLeft: this.scroll.horizontalBarPos,
|
|
56348
|
-
scrollHeight: null === (
|
|
56349
|
-
scrollWidth: null === (
|
|
56347
|
+
scrollHeight: null === (_c = this.table.theme.scrollStyle) || void 0 === _c ? void 0 : _c.width,
|
|
56348
|
+
scrollWidth: null === (_d = this.table.theme.scrollStyle) || void 0 === _d ? void 0 : _d.width,
|
|
56350
56349
|
viewHeight: this.table.tableNoFrameHeight,
|
|
56351
56350
|
viewWidth: this.table.tableNoFrameWidth,
|
|
56352
56351
|
scrollDirection: "horizontal",
|
|
@@ -56398,18 +56397,15 @@
|
|
|
56398
56397
|
}), oldVerticalBarPos !== top && triggerEvent && this.checkVerticalScrollBarEnd();
|
|
56399
56398
|
}
|
|
56400
56399
|
setScrollLeft(left, event, triggerEvent = !0) {
|
|
56401
|
-
var _a, _b, _c, _d, _e, _f, _g
|
|
56400
|
+
var _a, _b, _c, _d, _e, _f, _g;
|
|
56402
56401
|
if (!this.table || !this.table.scenegraph) return;
|
|
56403
56402
|
this.table.scrollLeft;
|
|
56404
|
-
const
|
|
56405
|
-
|
|
56406
|
-
rightFrozenOffset = null !== (_f = null === (_e = (_d = this.table).getRightFrozenColsOffset) || void 0 === _e ? void 0 : _e.call(_d)) && void 0 !== _f ? _f : 0,
|
|
56407
|
-
scrollRange = Math.max(0, totalWidth - this.table.scenegraph.width - frozenOffset - rightFrozenOffset),
|
|
56408
|
-
sizeTolerance = (null === (_g = this.table.options.customConfig) || void 0 === _g ? void 0 : _g._disableColumnAndRowSizeRound) ? 1 : 0;
|
|
56403
|
+
const scrollRange = getBodyHorizontalScrollRange(this.table),
|
|
56404
|
+
sizeTolerance = (null === (_a = this.table.options.customConfig) || void 0 === _a ? void 0 : _a._disableColumnAndRowSizeRound) ? 1 : 0;
|
|
56409
56405
|
left = Math.max(0, Math.min(left, scrollRange - sizeTolerance)), left = Math.ceil(left);
|
|
56410
56406
|
const oldHorizontalBarPos = this.scroll.horizontalBarPos,
|
|
56411
56407
|
xRatio = scrollRange ? left / scrollRange : 0;
|
|
56412
|
-
if ((oldHorizontalBarPos !== left || !0 === (null === (
|
|
56408
|
+
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) {
|
|
56413
56409
|
let horizontalBarPos = left;
|
|
56414
56410
|
isValid$1(horizontalBarPos) && !isNaN(horizontalBarPos) || (horizontalBarPos = 0);
|
|
56415
56411
|
const dx = horizontalBarPos - oldHorizontalBarPos;
|
|
@@ -56417,8 +56413,8 @@
|
|
|
56417
56413
|
event: null == event ? void 0 : event.nativeEvent,
|
|
56418
56414
|
scrollTop: this.scroll.verticalBarPos,
|
|
56419
56415
|
scrollLeft: horizontalBarPos,
|
|
56420
|
-
scrollHeight: null === (
|
|
56421
|
-
scrollWidth: null === (
|
|
56416
|
+
scrollHeight: null === (_d = this.table.theme.scrollStyle) || void 0 === _d ? void 0 : _d.width,
|
|
56417
|
+
scrollWidth: null === (_e = this.table.theme.scrollStyle) || void 0 === _e ? void 0 : _e.width,
|
|
56422
56418
|
viewHeight: this.table.tableNoFrameHeight,
|
|
56423
56419
|
viewWidth: this.table.tableNoFrameWidth,
|
|
56424
56420
|
scrollDirection: "horizontal",
|
|
@@ -56435,8 +56431,8 @@
|
|
|
56435
56431
|
event: null == event ? void 0 : event.nativeEvent,
|
|
56436
56432
|
scrollTop: this.scroll.verticalBarPos,
|
|
56437
56433
|
scrollLeft: this.scroll.horizontalBarPos,
|
|
56438
|
-
scrollHeight: null === (
|
|
56439
|
-
scrollWidth: null === (
|
|
56434
|
+
scrollHeight: null === (_f = this.table.theme.scrollStyle) || void 0 === _f ? void 0 : _f.width,
|
|
56435
|
+
scrollWidth: null === (_g = this.table.theme.scrollStyle) || void 0 === _g ? void 0 : _g.width,
|
|
56440
56436
|
viewHeight: this.table.tableNoFrameHeight,
|
|
56441
56437
|
viewWidth: this.table.tableNoFrameWidth,
|
|
56442
56438
|
scrollDirection: "horizontal",
|
|
@@ -61076,7 +61072,7 @@
|
|
|
61076
61072
|
}
|
|
61077
61073
|
constructor(container, options = {}) {
|
|
61078
61074
|
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z;
|
|
61079
|
-
if (super(), this.showFrozenIcon = !0, this._scrollToRowCorrectTimer = null, this._tableBorderWidth_left = 0, this._tableBorderWidth_right = 0, this._tableBorderWidth_top = 0, this._tableBorderWidth_bottom = 0, this.version = "1.26.2
|
|
61075
|
+
if (super(), this.showFrozenIcon = !0, this._scrollToRowCorrectTimer = null, this._tableBorderWidth_left = 0, this._tableBorderWidth_right = 0, this._tableBorderWidth_top = 0, this._tableBorderWidth_bottom = 0, this.version = "1.26.2", this.id = `VTable${Date.now()}`, this.isReleased = !1, this._chartEventMap = {}, this.throttleInvalidate = throttle2(this.render.bind(this), 200), "undefined" != typeof window) {
|
|
61080
61076
|
const g = window;
|
|
61081
61077
|
g[this.id] = this;
|
|
61082
61078
|
const registry = g.__vtable__ || (g.__vtable__ = {
|
|
@@ -78607,7 +78603,7 @@
|
|
|
78607
78603
|
PluginManager: PluginManager
|
|
78608
78604
|
});
|
|
78609
78605
|
|
|
78610
|
-
const version = "1.26.2
|
|
78606
|
+
const version = "1.26.2";
|
|
78611
78607
|
|
|
78612
78608
|
exports.Gantt = Gantt;
|
|
78613
78609
|
exports.TYPES = index$4;
|