@visactor/vtable-gantt 1.19.1 → 1.19.2
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/Gantt.js +81 -66
- package/cjs/Gantt.js.map +1 -1
- package/cjs/gantt-helper.js +2 -2
- package/cjs/gantt-helper.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/frame-border.js +28 -19
- package/cjs/scenegraph/frame-border.js.map +1 -1
- package/cjs/ts-types/gantt-engine.d.ts +1 -1
- package/cjs/ts-types/gantt-engine.js.map +1 -1
- package/dist/vtable-gantt.js +255 -180
- package/dist/vtable-gantt.min.js +2 -2
- package/es/Gantt.js +80 -65
- package/es/Gantt.js.map +1 -1
- package/es/gantt-helper.js +2 -2
- package/es/gantt-helper.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/frame-border.js +28 -18
- package/es/scenegraph/frame-border.js.map +1 -1
- package/es/ts-types/gantt-engine.d.ts +1 -1
- package/es/ts-types/gantt-engine.js.map +1 -1
- package/package.json +3 -3
package/cjs/Gantt.js
CHANGED
|
@@ -4,7 +4,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: !0
|
|
5
5
|
}), exports.Gantt = exports.createRootElement = void 0;
|
|
6
6
|
|
|
7
|
-
const scenegraph_1 = require("./scenegraph/scenegraph"), env_1 = require("./env"), ts_types_1 = require("./ts-types"), vtable_1 = require("@visactor/vtable"), event_manager_1 = require("./event/event-manager"), state_manager_1 = require("./state/state-manager"), gantt_helper_1 = require("./gantt-helper"), EventTarget_1 = require("./event/EventTarget"), util_1 = require("./tools/util"), DataSource_1 = require("./data/DataSource"), vutils_1 = require("@visactor/vutils"), plugin_manager_1 = require("./plugins/plugin-manager");
|
|
7
|
+
const scenegraph_1 = require("./scenegraph/scenegraph"), env_1 = require("./env"), ts_types_1 = require("./ts-types"), vtable_1 = require("@visactor/vtable"), event_manager_1 = require("./event/event-manager"), state_manager_1 = require("./state/state-manager"), gantt_helper_1 = require("./gantt-helper"), EventTarget_1 = require("./event/EventTarget"), util_1 = require("./tools/util"), DataSource_1 = require("./data/DataSource"), vutils_1 = require("@visactor/vutils"), plugin_manager_1 = require("./plugins/plugin-manager"), vtable_2 = require("@visactor/vtable");
|
|
8
8
|
|
|
9
9
|
function createRootElement(padding, className = "vtable-gantt") {
|
|
10
10
|
var _a, _b;
|
|
@@ -33,7 +33,7 @@ class Gantt extends EventTarget_1.EventTarget {
|
|
|
33
33
|
right: 0,
|
|
34
34
|
left: 0,
|
|
35
35
|
bottom: 0
|
|
36
|
-
}, "vtable-gantt"), this.element.style.left = this.taskTableWidth ? `${this.taskTableWidth}px` : "0px",
|
|
36
|
+
}, "vtable-gantt"), this.element.style.left = -1 !== this.taskTableWidth ? `${this.taskTableWidth}px` : "0px",
|
|
37
37
|
this.canvas = document.createElement("canvas"), this.element.appendChild(this.canvas),
|
|
38
38
|
this.context = this.canvas.getContext("2d"), container ? (container.appendChild(this.element),
|
|
39
39
|
this._updateSize()) : this._updateSize(), this._generateListTable(), this._syncPropsFromTable(),
|
|
@@ -45,7 +45,7 @@ class Gantt extends EventTarget_1.EventTarget {
|
|
|
45
45
|
this.scenegraph.updateNextFrame();
|
|
46
46
|
}
|
|
47
47
|
_updateSize() {
|
|
48
|
-
var _a, _b, _c, _d, _e, _f, _g, _h;
|
|
48
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
|
49
49
|
let widthP = 0, heightP = 0;
|
|
50
50
|
if ("browser" === env_1.Env.mode) {
|
|
51
51
|
const element = this.getElement();
|
|
@@ -68,22 +68,27 @@ class Gantt extends EventTarget_1.EventTarget {
|
|
|
68
68
|
gantt_helper_1.getHorizontalScrollBarSize)(this.parsedOptions.scrollStyle));
|
|
69
69
|
if (this.tableNoFrameWidth = widthP, this.tableNoFrameHeight = Math.floor(heightP),
|
|
70
70
|
this.parsedOptions.outerFrameStyle) {
|
|
71
|
-
const
|
|
72
|
-
this.tableX = this.taskTableColumns.length >= 1 || (null === (
|
|
73
|
-
this.tableY =
|
|
74
|
-
this.tableNoFrameHeight = height -
|
|
71
|
+
const [top, right, bottom, left] = (0, vtable_2.toBoxArray)(null !== (_g = null === (_f = this.parsedOptions.outerFrameStyle) || void 0 === _f ? void 0 : _f.borderLineWidth) && void 0 !== _g ? _g : 0);
|
|
72
|
+
this.tableX = this.taskTableColumns.length >= 1 || (null === (_h = this.options) || void 0 === _h ? void 0 : _h.rowSeriesNumber) ? null !== (_j = this.parsedOptions.verticalSplitLine.lineWidth) && void 0 !== _j ? _j : 0 : left,
|
|
73
|
+
this.tableY = top, this.tableNoFrameWidth = Math.min(width - right - this.tableX, this.getAllDateColsWidth()),
|
|
74
|
+
this.tableNoFrameHeight = height - top - bottom;
|
|
75
75
|
}
|
|
76
76
|
}
|
|
77
77
|
_updateListTableSize(taskListTableInstance) {
|
|
78
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
79
|
-
if (taskListTableInstance
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
78
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m;
|
|
79
|
+
if (taskListTableInstance) {
|
|
80
|
+
if ("auto" === (null === (_b = null === (_a = this.options) || void 0 === _a ? void 0 : _a.taskListTable) || void 0 === _b ? void 0 : _b.tableWidth) || -1 === this.taskTableWidth) {
|
|
81
|
+
const [top, right, bottom, left] = (0, vtable_2.toBoxArray)(null !== (_d = null === (_c = this.parsedOptions.outerFrameStyle) || void 0 === _c ? void 0 : _c.borderLineWidth) && void 0 !== _d ? _d : 0);
|
|
82
|
+
this.taskTableWidth = taskListTableInstance.getAllColsWidth() + right, (null === (_f = null === (_e = this.options) || void 0 === _e ? void 0 : _e.taskListTable) || void 0 === _f ? void 0 : _f.maxTableWidth) && (this.taskTableWidth = Math.min(null === (_h = null === (_g = this.options) || void 0 === _g ? void 0 : _g.taskListTable) || void 0 === _h ? void 0 : _h.maxTableWidth, this.taskTableWidth)),
|
|
83
|
+
(null === (_k = null === (_j = this.options) || void 0 === _j ? void 0 : _j.taskListTable) || void 0 === _k ? void 0 : _k.minTableWidth) && (this.taskTableWidth = Math.max(null === (_m = null === (_l = this.options) || void 0 === _l ? void 0 : _l.taskListTable) || void 0 === _m ? void 0 : _m.minTableWidth, this.taskTableWidth)),
|
|
84
|
+
this.element.style.left = -1 !== this.taskTableWidth ? `${this.taskTableWidth}px` : "0px",
|
|
85
|
+
taskListTableInstance.setCanvasSize(this.taskTableWidth, this.tableNoFrameHeight + top + bottom),
|
|
86
|
+
this._updateSize();
|
|
87
|
+
}
|
|
88
|
+
if (taskListTableInstance.columnHeaderLevelCount > 1) if (taskListTableInstance.columnHeaderLevelCount === this.parsedOptions.timeLineHeaderRowHeights.length) for (let i = 0; i < taskListTableInstance.columnHeaderLevelCount; i++) taskListTableInstance.setRowHeight(i, this.parsedOptions.timeLineHeaderRowHeights[i]); else {
|
|
89
|
+
const newRowHeight = this.getAllHeaderRowsHeight() / taskListTableInstance.columnHeaderLevelCount;
|
|
90
|
+
for (let i = 0; i < taskListTableInstance.columnHeaderLevelCount; i++) taskListTableInstance.setRowHeight(i, newRowHeight);
|
|
91
|
+
}
|
|
87
92
|
}
|
|
88
93
|
}
|
|
89
94
|
_generateListTable() {
|
|
@@ -95,11 +100,10 @@ class Gantt extends EventTarget_1.EventTarget {
|
|
|
95
100
|
}
|
|
96
101
|
}
|
|
97
102
|
_generateListTableOptions() {
|
|
98
|
-
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, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23, _24, _25, _26, _27, _28, _29
|
|
103
|
+
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, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23, _24, _25, _26, _27, _28, _29;
|
|
99
104
|
const listTable_options = {}, needPutInListTableKeys = [ "container", "records", "rowSeriesNumber", "overscrollBehavior", "pixelRatio", "eventOptions" ];
|
|
100
|
-
for (const key
|
|
101
|
-
listTable_options.defaultRowHeight = this.options.rowHeight
|
|
102
|
-
for (const key in this.options.taskListTable) {
|
|
105
|
+
for (const key of needPutInListTableKeys) key in this.options && (listTable_options[key] = this.options[key]);
|
|
106
|
+
if (listTable_options.defaultRowHeight = this.options.rowHeight, this.options.taskListTable) for (const key in this.options.taskListTable) {
|
|
103
107
|
if (listTable_options[key] = this.options.taskListTable[key], "columns" === key && (listTable_options[key][listTable_options[key].length - 1].disableColumnResize = !0,
|
|
104
108
|
this.parsedOptions.tasksShowMode === ts_types_1.TasksShowMode.Sub_Tasks_Inline || this.parsedOptions.tasksShowMode === ts_types_1.TasksShowMode.Sub_Tasks_Separate || this.parsedOptions.tasksShowMode === ts_types_1.TasksShowMode.Sub_Tasks_Arrange || this.parsedOptions.tasksShowMode === ts_types_1.TasksShowMode.Sub_Tasks_Compact)) for (let i = 0; i < listTable_options.columns.length; i++) listTable_options.columns[i].tree && (listTable_options.columns[i].tree = !1);
|
|
105
109
|
"hierarchyExpandLevel" !== key || this.parsedOptions.tasksShowMode !== ts_types_1.TasksShowMode.Sub_Tasks_Inline && this.parsedOptions.tasksShowMode !== ts_types_1.TasksShowMode.Sub_Tasks_Separate && this.parsedOptions.tasksShowMode !== ts_types_1.TasksShowMode.Sub_Tasks_Arrange && this.parsedOptions.tasksShowMode !== ts_types_1.TasksShowMode.Sub_Tasks_Compact || delete listTable_options[key];
|
|
@@ -118,59 +122,68 @@ class Gantt extends EventTarget_1.EventTarget {
|
|
|
118
122
|
borderLineWidth: [ null !== (_k = null === (_j = this.parsedOptions.horizontalSplitLine) || void 0 === _j ? void 0 : _j.lineWidth) && void 0 !== _k ? _k : 0, 0, 0, 0 ],
|
|
119
123
|
borderColor: null === (_l = this.parsedOptions.horizontalSplitLine) || void 0 === _l ? void 0 : _l.lineColor
|
|
120
124
|
}
|
|
121
|
-
}, extendThemeOption.cellInnerBorder = !1
|
|
125
|
+
}, extendThemeOption.cellInnerBorder = !1;
|
|
126
|
+
const [top, right, bottom, left] = (0, vtable_2.toBoxArray)(null !== (_o = null === (_m = this.parsedOptions.outerFrameStyle) || void 0 === _m ? void 0 : _m.borderLineWidth) && void 0 !== _o ? _o : 0);
|
|
127
|
+
extendThemeOption.frameStyle = Object.assign({}, this.parsedOptions.outerFrameStyle, {
|
|
122
128
|
shadowBlur: 0,
|
|
123
|
-
cornerRadius: [ null !== (
|
|
124
|
-
borderLineWidth: [
|
|
125
|
-
}), extendThemeOption.scrollStyle = Object.assign({}, null === (
|
|
129
|
+
cornerRadius: [ null !== (_q = null === (_p = this.parsedOptions.outerFrameStyle) || void 0 === _p ? void 0 : _p.cornerRadius) && void 0 !== _q ? _q : 0, 0, 0, null !== (_s = null === (_r = this.parsedOptions.outerFrameStyle) || void 0 === _r ? void 0 : _r.cornerRadius) && void 0 !== _s ? _s : 0 ],
|
|
130
|
+
borderLineWidth: [ top, 0, bottom, left ]
|
|
131
|
+
}), extendThemeOption.scrollStyle = Object.assign({}, null === (_u = null === (_t = this.options.taskListTable) || void 0 === _t ? void 0 : _t.theme) || void 0 === _u ? void 0 : _u.scrollStyle, this.parsedOptions.scrollStyle, {
|
|
126
132
|
verticalVisible: "none"
|
|
127
133
|
}), extendThemeOption.columnResize = Object.assign({
|
|
128
134
|
labelColor: "rgba(0,0,0,0)",
|
|
129
135
|
labelBackgroundFill: "rgba(0,0,0,0)"
|
|
130
136
|
}, null == extendThemeOption ? void 0 : extendThemeOption.columnResize), extendThemeOption.underlayBackgroundColor || (extendThemeOption.underlayBackgroundColor = this.parsedOptions.underlayBackgroundColor);
|
|
131
|
-
} else
|
|
132
|
-
bgColor
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
}, null === (_0 = null === (_z = this.options.taskListTable) || void 0 === _z ? void 0 : _z.theme) || void 0 === _0 ? void 0 : _0.headerStyle),
|
|
136
|
-
listTable_options.theme.bodyStyle = Object.assign({}, vtable_1.themes.DEFAULT.bodyStyle, null === (_2 = null === (_1 = this.options.taskListTable) || void 0 === _1 ? void 0 : _1.theme) || void 0 === _2 ? void 0 : _2.bodyStyle, {
|
|
137
|
-
frameStyle: {
|
|
138
|
-
borderLineWidth: [ null !== (_4 = null === (_3 = this.parsedOptions.horizontalSplitLine) || void 0 === _3 ? void 0 : _3.lineWidth) && void 0 !== _4 ? _4 : 0, 0, 0, 0 ],
|
|
139
|
-
borderColor: null === (_5 = this.parsedOptions.horizontalSplitLine) || void 0 === _5 ? void 0 : _5.lineColor
|
|
140
|
-
}
|
|
141
|
-
}), listTable_options.theme.cellInnerBorder = !1, listTable_options.theme.frameStyle = Object.assign({}, this.parsedOptions.outerFrameStyle, {
|
|
142
|
-
cornerRadius: [ null !== (_7 = null === (_6 = this.parsedOptions.outerFrameStyle) || void 0 === _6 ? void 0 : _6.cornerRadius) && void 0 !== _7 ? _7 : 0, 0, 0, null !== (_9 = null === (_8 = this.parsedOptions.outerFrameStyle) || void 0 === _8 ? void 0 : _8.cornerRadius) && void 0 !== _9 ? _9 : 0 ],
|
|
143
|
-
borderLineWidth: [ null !== (_11 = null === (_10 = this.parsedOptions.outerFrameStyle) || void 0 === _10 ? void 0 : _10.borderLineWidth) && void 0 !== _11 ? _11 : 0, 0, null !== (_13 = null === (_12 = this.parsedOptions.outerFrameStyle) || void 0 === _12 ? void 0 : _12.borderLineWidth) && void 0 !== _13 ? _13 : 0, null !== (_15 = null === (_14 = this.parsedOptions.outerFrameStyle) || void 0 === _14 ? void 0 : _14.borderLineWidth) && void 0 !== _15 ? _15 : 0 ]
|
|
144
|
-
}), listTable_options.theme.scrollStyle = Object.assign({}, null === (_17 = null === (_16 = this.options.taskListTable) || void 0 === _16 ? void 0 : _16.theme) || void 0 === _17 ? void 0 : _17.scrollStyle, this.parsedOptions.scrollStyle, {
|
|
145
|
-
verticalVisible: "none"
|
|
146
|
-
}), listTable_options.theme.columnResize = Object.assign({
|
|
147
|
-
labelColor: "rgba(0,0,0,0)",
|
|
148
|
-
labelBackgroundFill: "rgba(0,0,0,0)"
|
|
149
|
-
}, null === (_19 = null === (_18 = this.options.taskListTable) || void 0 === _18 ? void 0 : _18.theme) || void 0 === _19 ? void 0 : _19.columnResize),
|
|
150
|
-
listTable_options.theme.underlayBackgroundColor || (listTable_options.theme.underlayBackgroundColor = this.parsedOptions.underlayBackgroundColor); else listTable_options.theme = {
|
|
151
|
-
scrollStyle: Object.assign({}, null === (_21 = null === (_20 = this.options.taskListTable) || void 0 === _20 ? void 0 : _20.theme) || void 0 === _21 ? void 0 : _21.scrollStyle, this.parsedOptions.scrollStyle, {
|
|
152
|
-
verticalVisible: "none"
|
|
153
|
-
}),
|
|
154
|
-
headerStyle: Object.assign({}, vtable_1.themes.DEFAULT.headerStyle, {
|
|
137
|
+
} else {
|
|
138
|
+
listTable_options.theme.headerStyle ? listTable_options.theme.headerStyle.bgColor || (listTable_options.theme.headerStyle.bgColor = this.parsedOptions.timelineHeaderBackgroundColor) : listTable_options.theme.headerStyle = {
|
|
139
|
+
bgColor: this.parsedOptions.timelineHeaderBackgroundColor
|
|
140
|
+
}, listTable_options.theme.headerStyle = Object.assign({}, vtable_1.themes.DEFAULT.headerStyle, {
|
|
155
141
|
bgColor: this.parsedOptions.timelineHeaderBackgroundColor
|
|
156
|
-
}, null === (
|
|
157
|
-
bodyStyle
|
|
142
|
+
}, null === (_w = null === (_v = this.options.taskListTable) || void 0 === _v ? void 0 : _v.theme) || void 0 === _w ? void 0 : _w.headerStyle),
|
|
143
|
+
listTable_options.theme.bodyStyle = Object.assign({}, vtable_1.themes.DEFAULT.bodyStyle, null === (_y = null === (_x = this.options.taskListTable) || void 0 === _x ? void 0 : _x.theme) || void 0 === _y ? void 0 : _y.bodyStyle, {
|
|
158
144
|
frameStyle: {
|
|
159
|
-
borderLineWidth: [ null !== (
|
|
160
|
-
borderColor: null === (
|
|
145
|
+
borderLineWidth: [ null !== (_0 = null === (_z = this.parsedOptions.horizontalSplitLine) || void 0 === _z ? void 0 : _z.lineWidth) && void 0 !== _0 ? _0 : 0, 0, 0, 0 ],
|
|
146
|
+
borderColor: null === (_1 = this.parsedOptions.horizontalSplitLine) || void 0 === _1 ? void 0 : _1.lineColor
|
|
161
147
|
}
|
|
162
|
-
}),
|
|
163
|
-
|
|
164
|
-
frameStyle
|
|
165
|
-
cornerRadius: [ null !== (
|
|
166
|
-
borderLineWidth: [
|
|
167
|
-
}),
|
|
168
|
-
|
|
148
|
+
}), listTable_options.theme.cellInnerBorder = !1;
|
|
149
|
+
const [top, right, bottom, left] = (0, vtable_2.toBoxArray)(null !== (_3 = null === (_2 = this.parsedOptions.outerFrameStyle) || void 0 === _2 ? void 0 : _2.borderLineWidth) && void 0 !== _3 ? _3 : 0);
|
|
150
|
+
listTable_options.theme.frameStyle = Object.assign({}, this.parsedOptions.outerFrameStyle, {
|
|
151
|
+
cornerRadius: [ null !== (_5 = null === (_4 = this.parsedOptions.outerFrameStyle) || void 0 === _4 ? void 0 : _4.cornerRadius) && void 0 !== _5 ? _5 : 0, 0, 0, null !== (_7 = null === (_6 = this.parsedOptions.outerFrameStyle) || void 0 === _6 ? void 0 : _6.cornerRadius) && void 0 !== _7 ? _7 : 0 ],
|
|
152
|
+
borderLineWidth: [ top, 0, bottom, left ]
|
|
153
|
+
}), listTable_options.theme.scrollStyle = Object.assign({}, null === (_9 = null === (_8 = this.options.taskListTable) || void 0 === _8 ? void 0 : _8.theme) || void 0 === _9 ? void 0 : _9.scrollStyle, this.parsedOptions.scrollStyle, {
|
|
154
|
+
verticalVisible: "none"
|
|
155
|
+
}), listTable_options.theme.columnResize = Object.assign({
|
|
169
156
|
labelColor: "rgba(0,0,0,0)",
|
|
170
157
|
labelBackgroundFill: "rgba(0,0,0,0)"
|
|
171
|
-
}, null === (
|
|
172
|
-
underlayBackgroundColor
|
|
173
|
-
}
|
|
158
|
+
}, null === (_11 = null === (_10 = this.options.taskListTable) || void 0 === _10 ? void 0 : _10.theme) || void 0 === _11 ? void 0 : _11.columnResize),
|
|
159
|
+
listTable_options.theme.underlayBackgroundColor || (listTable_options.theme.underlayBackgroundColor = this.parsedOptions.underlayBackgroundColor);
|
|
160
|
+
} else {
|
|
161
|
+
const [top, right, bottom, left] = (0, vtable_2.toBoxArray)(null !== (_13 = null === (_12 = this.parsedOptions.outerFrameStyle) || void 0 === _12 ? void 0 : _12.borderLineWidth) && void 0 !== _13 ? _13 : 0);
|
|
162
|
+
listTable_options.theme = {
|
|
163
|
+
scrollStyle: Object.assign({}, null === (_15 = null === (_14 = this.options.taskListTable) || void 0 === _14 ? void 0 : _14.theme) || void 0 === _15 ? void 0 : _15.scrollStyle, this.parsedOptions.scrollStyle, {
|
|
164
|
+
verticalVisible: "none"
|
|
165
|
+
}),
|
|
166
|
+
headerStyle: Object.assign({}, vtable_1.themes.DEFAULT.headerStyle, {
|
|
167
|
+
bgColor: this.parsedOptions.timelineHeaderBackgroundColor
|
|
168
|
+
}, null === (_17 = null === (_16 = this.options.taskListTable) || void 0 === _16 ? void 0 : _16.theme) || void 0 === _17 ? void 0 : _17.headerStyle),
|
|
169
|
+
bodyStyle: Object.assign({}, vtable_1.themes.DEFAULT.bodyStyle, null === (_19 = null === (_18 = this.options.taskListTable) || void 0 === _18 ? void 0 : _18.theme) || void 0 === _19 ? void 0 : _19.bodyStyle, {
|
|
170
|
+
frameStyle: {
|
|
171
|
+
borderLineWidth: [ null !== (_21 = null === (_20 = this.parsedOptions.horizontalSplitLine) || void 0 === _20 ? void 0 : _20.lineWidth) && void 0 !== _21 ? _21 : 0, 0, 0, 0 ],
|
|
172
|
+
borderColor: null === (_22 = this.parsedOptions.horizontalSplitLine) || void 0 === _22 ? void 0 : _22.lineColor
|
|
173
|
+
}
|
|
174
|
+
}),
|
|
175
|
+
cellInnerBorder: !1,
|
|
176
|
+
frameStyle: Object.assign({}, this.parsedOptions.outerFrameStyle, {
|
|
177
|
+
cornerRadius: [ null !== (_24 = null === (_23 = this.parsedOptions.outerFrameStyle) || void 0 === _23 ? void 0 : _23.cornerRadius) && void 0 !== _24 ? _24 : 0, 0, 0, null !== (_26 = null === (_25 = this.parsedOptions.outerFrameStyle) || void 0 === _25 ? void 0 : _25.cornerRadius) && void 0 !== _26 ? _26 : 0 ],
|
|
178
|
+
borderLineWidth: [ top, 0, bottom, left ]
|
|
179
|
+
}),
|
|
180
|
+
columnResize: Object.assign({
|
|
181
|
+
labelColor: "rgba(0,0,0,0)",
|
|
182
|
+
labelBackgroundFill: "rgba(0,0,0,0)"
|
|
183
|
+
}, null === (_28 = null === (_27 = this.options.taskListTable) || void 0 === _27 ? void 0 : _27.theme) || void 0 === _28 ? void 0 : _28.columnResize),
|
|
184
|
+
underlayBackgroundColor: this.parsedOptions.underlayBackgroundColor
|
|
185
|
+
};
|
|
186
|
+
}
|
|
174
187
|
return listTable_options.canvasWidth = this.taskTableWidth, listTable_options.canvasHeight = this.canvas.height,
|
|
175
188
|
listTable_options.defaultHeaderRowHeight = this.getAllHeaderRowsHeight(), this.parsedOptions.tasksShowMode === ts_types_1.TasksShowMode.Sub_Tasks_Separate ? (listTable_options.customComputeRowHeight = args => {
|
|
176
189
|
var _a;
|
|
@@ -188,7 +201,7 @@ class Gantt extends EventTarget_1.EventTarget {
|
|
|
188
201
|
if (record) return (0, gantt_helper_1.computeRowsCountByRecordDate)(this, record) * this.parsedOptions.rowHeight;
|
|
189
202
|
}, listTable_options.defaultRowHeight = "auto", listTable_options.customConfig = {
|
|
190
203
|
forceComputeAllRowHeight: !0
|
|
191
|
-
}) : listTable_options.defaultRowHeight = null !== (
|
|
204
|
+
}) : listTable_options.defaultRowHeight = null !== (_29 = this.options.rowHeight) && void 0 !== _29 ? _29 : 40,
|
|
192
205
|
listTable_options.clearDOM = !1, listTable_options;
|
|
193
206
|
}
|
|
194
207
|
getElement() {
|
|
@@ -349,8 +362,10 @@ class Gantt extends EventTarget_1.EventTarget {
|
|
|
349
362
|
this.options.tasksShowMode = tasksShowMode, this.updateOption(this.options);
|
|
350
363
|
}
|
|
351
364
|
_resize() {
|
|
352
|
-
var _a;
|
|
353
|
-
this._updateSize(), null === (_a = this.taskListTableInstance) || void 0 === _a || _a.setCanvasSize(this.taskTableWidth, this.tableNoFrameHeight +
|
|
365
|
+
var _a, _b, _c, _d, _e;
|
|
366
|
+
this._updateSize(), null === (_a = this.taskListTableInstance) || void 0 === _a || _a.setCanvasSize(this.taskTableWidth, this.tableNoFrameHeight + (0,
|
|
367
|
+
vtable_2.toBoxArray)(null !== (_c = null === (_b = this.parsedOptions.outerFrameStyle) || void 0 === _b ? void 0 : _b.borderLineWidth) && void 0 !== _c ? _c : 0)[0] + (0,
|
|
368
|
+
vtable_2.toBoxArray)(null !== (_e = null === (_d = this.parsedOptions.outerFrameStyle) || void 0 === _d ? void 0 : _d.borderLineWidth) && void 0 !== _e ? _e : 0)[2]),
|
|
354
369
|
this._syncPropsFromTable(), this.scenegraph.resize(), (0, gantt_helper_1.updateSplitLineAndResizeLine)(this);
|
|
355
370
|
}
|
|
356
371
|
_syncPropsFromTable() {
|
|
@@ -381,7 +396,7 @@ class Gantt extends EventTarget_1.EventTarget {
|
|
|
381
396
|
const listTableOption = this._generateListTableOptions();
|
|
382
397
|
this.taskListTableInstance.updateOption(listTableOption), this._updateListTableSize(this.taskListTableInstance);
|
|
383
398
|
}
|
|
384
|
-
this._syncPropsFromTable(), this.scenegraph.updateStageBackground(), this.element.style.left = this.taskTableWidth ? `${this.taskTableWidth}px` : "0px",
|
|
399
|
+
this._syncPropsFromTable(), this.scenegraph.updateStageBackground(), this.element.style.left = -1 !== this.taskTableWidth ? `${this.taskTableWidth}px` : "0px",
|
|
385
400
|
(0, gantt_helper_1.updateSplitLineAndResizeLine)(this), this.scenegraph.updateSceneGraph(),
|
|
386
401
|
this.scenegraph.afterCreateSceneGraph(), this._scrollToMarkLine();
|
|
387
402
|
}
|