@visactor/vtable-gantt
Version:
canvas table width high performance
49 lines (45 loc) • 1.57 kB
JavaScript
;
Object.defineProperty(exports, "__esModule", {
value: !0
}), exports.DragOrderLine = void 0;
const vrender_1 = require("@visactor/vtable/es/vrender");
class DragOrderLine {
constructor(scene) {
this._scene = scene, this.dragLineContainer = new vrender_1.Group({
x: 0,
y: 0,
width: scene._gantt.tableNoFrameWidth,
height: Math.min(scene._gantt.tableNoFrameHeight, scene._gantt.drawHeight),
pickable: !1,
clip: !0,
visible: !1
}), this.dragLineContainer.name = "drag-order-line-container", scene.ganttGroup.addChild(this.dragLineContainer),
this.initDragLine();
}
initDragLine() {
if (this._scene._gantt.taskListTableInstance) {
const style = this._scene._gantt.taskListTableInstance.theme.dragHeaderSplitLine, lineObj = (0,
vrender_1.createLine)({
pickable: !1,
stroke: style.lineColor,
lineWidth: style.lineWidth,
points: []
});
this.dragLine = lineObj, this.dragLineContainer.appendChild(lineObj);
}
}
showDragLine(y) {
this.dragLineContainer.showAll(), this.dragLine.setAttribute("points", [ {
x: 0,
y: y
}, {
x: this._scene._gantt.tableNoFrameWidth,
y: y
} ]);
}
hideDragLine() {
this.dragLineContainer.hideAll();
}
}
exports.DragOrderLine = DragOrderLine;
//# sourceMappingURL=drag-order-line.js.map