@visactor/vtable-gantt 1.23.3-alpha.0 → 1.24.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/Gantt.d.ts +18 -0
- package/cjs/Gantt.js +135 -9
- package/cjs/Gantt.js.map +1 -1
- package/cjs/gantt-helper.d.ts +7 -0
- package/cjs/gantt-helper.js +75 -66
- 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/plugins/index.js.map +1 -1
- package/cjs/scenegraph/dependency-link.js +28 -38
- package/cjs/scenegraph/dependency-link.js.map +1 -1
- package/cjs/scenegraph/grid.js +8 -7
- package/cjs/scenegraph/grid.js.map +1 -1
- package/cjs/scenegraph/mark-line.js +10 -12
- package/cjs/scenegraph/mark-line.js.map +1 -1
- package/cjs/scenegraph/task-bar.d.ts +4 -1
- package/cjs/scenegraph/task-bar.js +73 -23
- package/cjs/scenegraph/task-bar.js.map +1 -1
- package/cjs/scenegraph/timeline-header.js +1 -4
- package/cjs/scenegraph/timeline-header.js.map +1 -1
- package/cjs/state/state-manager.js +22 -18
- package/cjs/state/state-manager.js.map +1 -1
- package/cjs/tools/isx.d.ts +1 -1
- package/cjs/ts-types/gantt-engine.d.ts +7 -0
- package/cjs/ts-types/gantt-engine.js.map +1 -1
- package/dist/vtable-gantt.js +1374 -694
- package/dist/vtable-gantt.min.js +2 -2
- package/es/Gantt.d.ts +18 -0
- package/es/Gantt.js +135 -8
- package/es/Gantt.js.map +1 -1
- package/es/gantt-helper.d.ts +7 -0
- package/es/gantt-helper.js +74 -63
- 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/plugins/index.js.map +1 -1
- package/es/scenegraph/dependency-link.js +29 -27
- package/es/scenegraph/dependency-link.js.map +1 -1
- package/es/scenegraph/grid.js +6 -8
- package/es/scenegraph/grid.js.map +1 -1
- package/es/scenegraph/mark-line.js +10 -11
- package/es/scenegraph/mark-line.js.map +1 -1
- package/es/scenegraph/task-bar.d.ts +4 -1
- package/es/scenegraph/task-bar.js +74 -23
- package/es/scenegraph/task-bar.js.map +1 -1
- package/es/scenegraph/timeline-header.js +2 -3
- package/es/scenegraph/timeline-header.js.map +1 -1
- package/es/state/state-manager.js +22 -18
- package/es/state/state-manager.js.map +1 -1
- package/es/tools/isx.d.ts +1 -1
- package/es/ts-types/gantt-engine.d.ts +7 -0
- package/es/ts-types/gantt-engine.js.map +1 -1
- package/package.json +6 -6
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/scenegraph/task-bar.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,UAAU,EAAE,UAAU,EAAE,KAAK,EAAE,MAAM,EAAE,IAAI,EAAE,OAAO,EAAE,MAAM,6BAA6B,CAAC;AAG1G,OAAO,EAAE,uBAAuB,EAAE,mBAAmB,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AACzF,OAAO,EAAE,OAAO,EAAE,MAAM,kBAAkB,CAAC;AAC3C,OAAO,EAAE,mBAAmB,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAClE,OAAO,EAAE,gBAAgB,EAAE,MAAM,cAAc,CAAC;AAChD,OAAO,EAAE,aAAa,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AAEtD,MAAM,kBAAkB,GAAG;;;OAGpB,CAAC;AACR,MAAM,CAAC,MAAM,wBAAwB,GAAG,EAAE,CAAC;AAE3C,MAAM,OAAO,OAAO;IAClB,mBAAmB,CAAC,IAAY,EAAE,MAAW;QAC3C,IAAI,CAAC,IAAI,EAAE;YACT,OAAO,EAAE,CAAC;SACX;QACD,MAAM,YAAY,GAAG,YAAY,CAAC;QAClC,MAAM,OAAO,GAAG,IAAI,CAAC,KAAK,CAAC,YAAY,CAAC,CAAC;QAEzC,IAAI,OAAO,EAAE;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Y,CAAC,UAA8B,CAAC;QACzD,IAAI,CAAC,CAAC,EAAE;YACN,OAAO,IAAI,CAAC;SACb;QACD,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,IAAI,CAAC,YAAY,CAAC,aAAa,EAAE,CAAC,EAAE,EAAE;YACxD,IACE,CAAC,CAAC,UAAU,KAAK,KAAK;gBACtB,CAAC,CAAC,OAAO,CAAC,cAAc,CAAC,IAAI,CAAC,OAAO,CAAC,cAAc,CAAC,IAAI,CAAC,CAAC,cAAc,KAAK,cAAc,CAAC,CAAC,EAC9F;gBACA,OAAO,CAAC,CAAC;aACV;YACD,CAAC,GAAG,CAAC,CAAC,KAAyB,CAAC;SACjC;QACD,OAAO,IAAI,CAAC;IACd,CAAC;CACF","file":"task-bar.js","sourcesContent":["import { Group, createText, createRect, Image, Circle, Line, Polygon } from '@visactor/vtable/es/vrender';\nimport type { Scenegraph } from './scenegraph';\n// import { Icon } from './icon';\nimport { computeCountToTimeScale, parseStringTemplate, toBoxArray } from '../tools/util';\nimport { isValid } from '@visactor/vutils';\nimport { defaultTaskBarStyle, getTextPos } from '../gantt-helper';\nimport { GanttTaskBarNode } from './gantt-node';\nimport { TasksShowMode, TaskType } from '../ts-types';\n\nconst TASKBAR_HOVER_ICON = `<svg width=\"100\" height=\"200\" xmlns=\"http://www.w3.org/2000/svg\">\n <line x1=\"30\" y1=\"10\" x2=\"30\" y2=\"190\" stroke=\"black\" stroke-width=\"4\"/>\n <line x1=\"70\" y1=\"10\" x2=\"70\" y2=\"190\" stroke=\"black\" stroke-width=\"4\"/>\n</svg>`;\nexport const TASKBAR_HOVER_ICON_WIDTH = 10;\n\nexport class TaskBar {\n formatMilestoneText(text: string, record: any): string {\n if (!text) {\n return '';\n }\n const fieldPattern = /{([^}]+)}/g;\n const matches = text.match(fieldPattern);\n\n if (matches) {\n matches.forEach(match => {\n const fieldName = match.substring(1, match.length - 1);\n const fieldValue = record[fieldName];\n if (fieldValue !== undefined) {\n text = text.replace(match, String(fieldValue));\n }\n });\n }\n return text;\n }\n\n calculateMilestoneTextPosition(\n position: string,\n milestoneWidth: number,\n padding: number | number[] = 4\n ): {\n textX: number;\n textY: number;\n textAlignValue: CanvasTextAlign;\n textBaselineValue: CanvasTextBaseline;\n } {\n const paddingVal = typeof padding === 'number' ? padding : 4;\n let textX = 0;\n let textY = 0;\n let textAlignValue: CanvasTextAlign = 'left';\n let textBaselineValue: CanvasTextBaseline = 'middle';\n\n // 将文本位置改为以中心点为基准\n const center = milestoneWidth / 2;\n\n switch (position) {\n case 'left':\n textX = -paddingVal;\n textY = center;\n textAlignValue = 'end';\n textBaselineValue = 'middle';\n break;\n case 'right':\n textX = milestoneWidth + paddingVal;\n textY = center;\n textAlignValue = 'start';\n textBaselineValue = 'middle';\n break;\n case 'top':\n textX = center;\n textY = -paddingVal;\n textAlignValue = 'center';\n textBaselineValue = 'bottom';\n break;\n case 'bottom':\n textX = center;\n textY = milestoneWidth + paddingVal;\n textAlignValue = 'center';\n textBaselineValue = 'top';\n break;\n default:\n textX = milestoneWidth + paddingVal;\n textY = center;\n textAlignValue = 'start';\n textBaselineValue = 'middle';\n }\n\n return {\n textX,\n textY,\n textAlignValue,\n textBaselineValue\n };\n }\n group: Group;\n barContainer: Group;\n hoverBarGroup: Group;\n creatingDependencyLine: Line;\n hoverBarLeftIcon: Image;\n hoverBarRightIcon: Image;\n hoverBarProgressHandle: Group;\n _scene: Scenegraph;\n width: number;\n height: number;\n selectedBorders: Group[] = [];\n constructor(scene: Scenegraph) {\n this._scene = scene;\n // const height = Math.min(scene._gantt.tableNoFrameHeight, scene._gantt.drawHeight);\n this.width = scene._gantt.tableNoFrameWidth;\n this.height = scene._gantt.gridHeight;\n this.group = new Group({\n x: 0,\n y: scene._gantt.getAllHeaderRowsHeight(),\n width: this.width,\n height: this.height,\n pickable: false,\n clip: true\n });\n this.group.name = 'task-bar-container';\n scene.ganttGroup.addChild(this.group);\n this.initBars();\n this.initHoverBarIcons();\n }\n\n initBars() {\n this.barContainer = new Group({\n x: 0,\n y: 0,\n width: this._scene._gantt.getAllDateColsWidth(),\n height: this._scene._gantt.getAllTaskBarsHeight(),\n pickable: false,\n clip: true\n });\n this.group.appendChild(this.barContainer);\n\n for (let i = 0; i < this._scene._gantt.itemCount; i++) {\n if (\n this._scene._gantt.parsedOptions.tasksShowMode === TasksShowMode.Sub_Tasks_Inline ||\n this._scene._gantt.parsedOptions.tasksShowMode === TasksShowMode.Sub_Tasks_Separate ||\n this._scene._gantt.parsedOptions.tasksShowMode === TasksShowMode.Sub_Tasks_Arrange ||\n this._scene._gantt.parsedOptions.tasksShowMode === TasksShowMode.Sub_Tasks_Compact\n ) {\n const record = this._scene._gantt.getRecordByIndex(i);\n if (record.children?.length > 0) {\n for (let j = 0; j < record.children?.length; j++) {\n const barGroup = this.initBar(i, j, record.children.length);\n if (barGroup) {\n this.barContainer.appendChild(barGroup);\n }\n }\n } else {\n const barGroup = this.initBar(i);\n if (barGroup) {\n this.barContainer.appendChild(barGroup);\n }\n }\n continue;\n } else if (this._scene._gantt.parsedOptions.tasksShowMode === TasksShowMode.Project_Sub_Tasks_Inline) {\n const record = this._scene._gantt.getRecordByIndex(i);\n const isExpanded = record.hierarchyState === 'expand';\n // For project type records, we want to show all children in one line when collapsed\n if (record.type === TaskType.PROJECT && record.children?.length > 0 && !isExpanded) {\n const recordIndex = this._scene._gantt.getRecordIndexByTaskShowIndex(i);\n const sub_task_indexs: number[] = Array.isArray(recordIndex) ? [...recordIndex] : [recordIndex];\n\n const callInitBar = (record: any, sub_task_indexs: number[]) => {\n if (record.children?.length > 0) {\n for (let j = 0; j < record.children?.length; j++) {\n const child_record = record.children[j];\n if (child_record.type !== TaskType.PROJECT) {\n const barGroup = this.initBar(i, [...sub_task_indexs, j], record.children.length);\n if (barGroup) {\n this.barContainer.appendChild(barGroup);\n }\n } else {\n //如果是project类型的子任务,需要递归调用 只将类型不是project的子任务添加到barContainer中\n callInitBar(child_record, [...sub_task_indexs, j]);\n }\n }\n }\n };\n callInitBar(record, sub_task_indexs);\n } else {\n // For non-project tasks, use the default Tasks_Separate mode\n const barGroup = this.initBar(i);\n if (barGroup) {\n this.barContainer.appendChild(barGroup);\n }\n }\n continue;\n } else {\n const barGroup = this.initBar(i);\n if (barGroup) {\n this.barContainer.appendChild(barGroup);\n }\n }\n }\n }\n\n /**\n * @param index 任务显示的index,从0开始\n * @param childIndex 子任务的index, 当taskShowMode是sub_tasks_*模式时,会传入sub_task_index。如果是tasks_separate模式,sub_task_index传入undefined。\n * 如果模式Project_Sub_Tasks_Inline时,传入的sub_task_index是一个数组,数组的第一个元素是父任务的index,第二个元素是子任务的index,依次类推算是各层子任务的path。\n */\n initBar(index: number, childIndex?: number | number[], childrenLength?: number) {\n const taskBarCustomLayout = this._scene._gantt.parsedOptions.taskBarCustomLayout;\n const { startDate, endDate, taskDays, progress, taskRecord } = this._scene._gantt.getTaskInfoByTaskListIndex(\n index,\n childIndex\n );\n const isMilestone = taskRecord.type === TaskType.MILESTONE;\n if (\n (isMilestone && !startDate) ||\n (!isMilestone && (taskDays <= 0 || !startDate || !endDate || startDate.getTime() > endDate.getTime()))\n ) {\n return null;\n }\n const { unit, step } = this._scene._gantt.parsedOptions.reverseSortedTimelineScales[0];\n let taskBarSize =\n computeCountToTimeScale(endDate, startDate, unit, step, 1) * this._scene._gantt.parsedOptions.timelineColWidth;\n\n const taskBarStyle = this._scene._gantt.getTaskBarStyle(index, childIndex);\n const taskbarHeight = taskBarStyle.width;\n if (isValid(taskBarStyle.minSize)) {\n taskBarSize = Math.max(taskBarSize, taskBarStyle.minSize);\n }\n // const minDate = createDateAtMidnight(this._scene._gantt.parsedOptions.minDate);\n\n // const subTaskShowRowCount =\n // this._scene._gantt.parsedOptions.tasksShowMode === TasksShowMode.Sub_Tasks_Separate\n // ? childrenLength || 1\n // : this._scene._gantt.parsedOptions.tasksShowMode === TasksShowMode.Sub_Tasks_Arrange\n // ? computeRowsCountByRecordDate(this._scene._gantt, this._scene._gantt.records[index])\n // : this._scene._gantt.parsedOptions.tasksShowMode === TasksShowMode.Sub_Tasks_Compact\n // ? computeRowsCountByRecordDateForCompact(this._scene._gantt, this._scene._gantt.records[index])\n // : 1;\n const oneTaskHeigth = this._scene._gantt.parsedOptions.rowHeight; // this._scene._gantt.getRowHeightByIndex(index) / subTaskShowRowCount;\n const milestoneTaskBarHeight = this._scene._gantt.parsedOptions.taskBarMilestoneStyle.width;\n const x =\n computeCountToTimeScale(startDate, this._scene._gantt.parsedOptions.minDate, unit, step) *\n this._scene._gantt.parsedOptions.timelineColWidth -\n (isMilestone ? milestoneTaskBarHeight / 2 : 0);\n const y =\n this._scene._gantt.getRowsHeightByIndex(0, index - 1) +\n (this._scene._gantt.parsedOptions.tasksShowMode === TasksShowMode.Sub_Tasks_Separate\n ? ((childIndex as number) ?? 0) * oneTaskHeigth\n : this._scene._gantt.parsedOptions.tasksShowMode === TasksShowMode.Sub_Tasks_Arrange ||\n this._scene._gantt.parsedOptions.tasksShowMode === TasksShowMode.Sub_Tasks_Compact\n ? taskRecord.vtable_gantt_showIndex * oneTaskHeigth\n : 0) +\n (oneTaskHeigth - (isMilestone ? milestoneTaskBarHeight : taskbarHeight)) / 2;\n const barGroupBox = new GanttTaskBarNode({\n x,\n y,\n width: isMilestone ? milestoneTaskBarHeight : taskBarSize,\n // height: this._scene._gantt.parsedOptions.rowHeight,\n height: isMilestone ? milestoneTaskBarHeight : taskbarHeight,\n cornerRadius: isMilestone\n ? this._scene._gantt.parsedOptions.taskBarMilestoneStyle.cornerRadius\n : taskBarStyle.cornerRadius,\n lineWidth: isMilestone\n ? this._scene._gantt.parsedOptions.taskBarMilestoneStyle.borderLineWidth * 2\n : (taskBarStyle.borderLineWidth ?? taskBarStyle.borderWidth) * 2,\n stroke: isMilestone\n ? this._scene._gantt.parsedOptions.taskBarMilestoneStyle.borderColor\n : taskBarStyle.borderColor,\n angle: isMilestone ? (45 / 180) * Math.PI : 0,\n anchor: isMilestone ? [x + milestoneTaskBarHeight / 2, y + milestoneTaskBarHeight / 2] : undefined\n // clip: true\n });\n barGroupBox.name = 'task-bar';\n //如果TaskShowMode是tasks_separate模式 这里的task_index其实是table中的bodyIndex;如果TaskShowMode是sub_tasks_***模式 task_index也是对应父节点任务条在table中的bodyIndex(但不会渲染父节点,只是渲染子节点)\n barGroupBox.task_index = index;\n //如果TaskShowMode是tasks_separate模式,不会赋值sub_task_index;如果TaskShowMode是sub_tasks_***模式 这里的sub_task_index是父节点下子元素的index\n barGroupBox.sub_task_index = childIndex as any;\n barGroupBox.record = taskRecord;\n\n const barGroup = new Group({\n x: 0,\n y: 0,\n width: barGroupBox.attribute.width,\n height: barGroupBox.attribute.height,\n cornerRadius: isMilestone\n ? this._scene._gantt.parsedOptions.taskBarMilestoneStyle.cornerRadius\n : taskBarStyle.cornerRadius,\n clip: this._scene._gantt.parsedOptions.taskBarClip\n });\n barGroup.name = 'task-bar-group';\n barGroupBox.appendChild(barGroup);\n barGroupBox.clipGroupBox = barGroup;\n let rootContainer;\n let renderDefaultBar = true;\n let renderDefaultText = true;\n\n if (taskBarCustomLayout) {\n let customLayoutObj;\n if (typeof taskBarCustomLayout === 'function') {\n const arg = {\n width: taskBarSize,\n height: taskbarHeight,\n index,\n startDate,\n endDate,\n taskDays,\n progress,\n taskRecord,\n ganttInstance: this._scene._gantt\n };\n customLayoutObj = taskBarCustomLayout(arg);\n } else {\n customLayoutObj = taskBarCustomLayout;\n }\n if (customLayoutObj) {\n // if (customLayoutObj.rootContainer) {\n // customLayoutObj.rootContainer = decodeReactDom(customLayoutObj.rootContainer);\n // }\n rootContainer = customLayoutObj.rootContainer;\n renderDefaultBar = customLayoutObj.renderDefaultBar ?? false;\n renderDefaultText = customLayoutObj.renderDefaultText ?? false;\n rootContainer && (rootContainer.name = 'task-bar-custom-render');\n }\n }\n\n if (renderDefaultBar) {\n // 创建整个任务条rect\n const rect = createRect({\n x: 0,\n y: 0, //this._scene._gantt.parsedOptions.rowHeight - taskbarHeight) / 2,\n width: barGroupBox.attribute.width,\n height: barGroupBox.attribute.height,\n fill: isMilestone ? this._scene._gantt.parsedOptions.taskBarMilestoneStyle.fillColor : taskBarStyle.barColor,\n pickable: false\n });\n rect.name = 'task-bar-rect';\n barGroup.appendChild(rect);\n barGroupBox.barRect = rect;\n if (taskRecord.type !== TaskType.MILESTONE) {\n // 创建已完成部分任务条rect\n const progress_rect = createRect({\n x: 0,\n y: 0, //(this._scene._gantt.parsedOptions.rowHeight - taskbarHeight) / 2,\n width: (taskBarSize * progress) / 100,\n height: taskbarHeight,\n fill: taskBarStyle.completedBarColor,\n pickable: false\n });\n progress_rect.name = 'task-bar-progress-rect';\n barGroup.appendChild(progress_rect);\n barGroupBox.progressRect = progress_rect;\n }\n }\n\n rootContainer && barGroup.appendChild(rootContainer);\n if (renderDefaultText && taskRecord.type !== TaskType.MILESTONE) {\n const { textAlign, textBaseline, fontSize, fontFamily, textOverflow, color, padding } =\n this._scene._gantt.parsedOptions.taskBarLabelStyle;\n const position = getTextPos(toBoxArray(padding), textAlign, textBaseline, taskBarSize, taskbarHeight);\n //创建label 文字\n const label = createText({\n // visible: false,\n // pickable: false,\n x: position.x, //extAlign === 'center' ? taskBarSize / 2 : textAlign === 'left' ? 10 : taskBarSize - 10,\n y: position.y, //fontSize / 2,\n fontSize: fontSize, // 10\n fill: color,\n fontFamily: fontFamily,\n text: parseStringTemplate(this._scene._gantt.parsedOptions.taskBarLabelText as string, taskRecord),\n maxLineWidth: taskBarSize - TASKBAR_HOVER_ICON_WIDTH,\n textBaseline,\n textAlign,\n ellipsis:\n textOverflow === 'clip'\n ? ''\n : textOverflow === 'ellipsis'\n ? '...'\n : isValid(textOverflow)\n ? textOverflow\n : undefined,\n poptip: {\n position: 'bottom'\n // dx: (taskBarSize - TASKBAR_HOVER_ICON_WIDTH) / 4\n }\n // dx: 12 + 4,\n // dy: this._scene._gantt.barLabelStyle.fontSize / 2\n } as any);\n\n barGroup.appendChild(label);\n barGroupBox.textLabel = label;\n\n barGroupBox.labelStyle = this._scene._gantt.parsedOptions.taskBarLabelStyle;\n\n barGroupBox.updateTextPosition();\n }\n if (\n renderDefaultText &&\n taskRecord.type === 'milestone' &&\n this._scene._gantt.parsedOptions.taskBarMilestoneStyle.labelText\n ) {\n const milestoneStyle = this._scene._gantt.parsedOptions.taskBarMilestoneStyle;\n const textStyle = milestoneStyle.labelTextStyle || {};\n const pos = this.calculateMilestoneTextPosition(\n milestoneStyle.textOrient || 'right',\n milestoneStyle.width,\n textStyle.padding ?? 4\n );\n\n const textContainer = new Group({\n x,\n y,\n width: milestoneStyle.width,\n height: milestoneStyle.width,\n angle: 0,\n pickable: false\n });\n\n const milestoneLabel = createText({\n x: pos.textX,\n y: pos.textY,\n fontSize: textStyle.fontSize || 16,\n fontFamily: textStyle.fontFamily || 'Arial',\n fill: textStyle.color || '#ff0000',\n textBaseline: (textStyle.textBaseline || pos.textBaselineValue) as any,\n textAlign: textStyle.textAlign || pos.textAlignValue,\n text: this.formatMilestoneText(milestoneStyle.labelText, taskRecord),\n pickable: false\n });\n\n textContainer.appendChild(milestoneLabel);\n this.barContainer.appendChild(textContainer);\n\n barGroupBox.milestoneTextLabel = milestoneLabel;\n barGroupBox.milestoneTextContainer = textContainer;\n }\n return barGroupBox;\n }\n updateTaskBarNode(index: number, sub_task_index?: number) {\n const taskbarGroup = this.getTaskBarNodeByIndex(index, sub_task_index);\n if (taskbarGroup) {\n this.barContainer.removeChild(taskbarGroup);\n }\n const barGroup = this.initBar(index, sub_task_index);\n if (barGroup) {\n this.barContainer.insertInto(barGroup, index); //TODO\n barGroup.updateTextPosition();\n }\n }\n initHoverBarIcons() {\n const hoverBarGroup = new Group({\n x: 0,\n y: 0,\n width: 100,\n height: 100,\n clip: false, // 关闭裁剪以允许进度手柄显示在任务条外部\n pickable: false,\n cornerRadius:\n this._scene._gantt.parsedOptions.taskBarHoverStyle.cornerRadius ?? defaultTaskBarStyle.cornerRadius ?? 0,\n fill: this._scene._gantt.parsedOptions.taskBarHoverStyle.barOverlayColor,\n visibleAll: false\n });\n this.hoverBarGroup = hoverBarGroup;\n hoverBarGroup.name = 'task-bar-hover-shadow';\n // this.barContainer.appendChild(hoverBarGroup);\n // 创建左侧的icon\n if (this._scene._gantt.parsedOptions.taskBarResizable) {\n const icon = new Image({\n x: 0,\n y: 0, //this._scene._gantt.parsedOptions.rowHeight - taskbarHeight) / 2,\n width: TASKBAR_HOVER_ICON_WIDTH,\n height: 20,\n image: TASKBAR_HOVER_ICON,\n pickable: true,\n cursor: 'col-resize'\n });\n icon.name = 'task-bar-hover-shadow-left-icon';\n this.hoverBarLeftIcon = icon;\n hoverBarGroup.appendChild(icon);\n\n // 创建右侧的icon\n const rightIcon = new Image({\n x: 0,\n y: 0, //this._scene._gantt.parsedOptions.rowHeight - taskbarHeight) / 2,\n width: TASKBAR_HOVER_ICON_WIDTH,\n height: 20,\n image: TASKBAR_HOVER_ICON,\n pickable: true,\n cursor: 'col-resize'\n });\n rightIcon.name = 'task-bar-hover-shadow-right-icon';\n this.hoverBarRightIcon = rightIcon;\n hoverBarGroup.appendChild(rightIcon);\n }\n\n // 创建进度手柄\n const progressHandle = new Group({\n x: 0,\n y: 0,\n width: 12,\n height: 12,\n pickable: true,\n cursor: 'ew-resize',\n visible: false\n });\n\n // 创建三角形手柄\n const triangleHandle = new Polygon({\n points: [\n { x: 6, y: 0 }, // 顶部中心点\n { x: 0, y: 6 }, // 左下角\n { x: 12, y: 6 } // 右下角\n ],\n fill: '#0064ff',\n stroke: '#ffffff',\n lineWidth: 1,\n pickable: false\n });\n progressHandle.appendChild(triangleHandle);\n\n progressHandle.name = 'task-bar-progress-handle';\n this.hoverBarProgressHandle = progressHandle;\n hoverBarGroup.appendChild(progressHandle);\n }\n\n setX(x: number) {\n this.barContainer.setAttribute('x', x);\n }\n setY(y: number) {\n this.barContainer.setAttribute('y', y);\n }\n /** 重新创建任务条节点 */\n refresh() {\n this.width = this._scene._gantt.tableNoFrameWidth;\n this.height = this._scene._gantt.gridHeight;\n this.group.setAttributes({\n height: this.height,\n width: this.width,\n y: this._scene._gantt.getAllHeaderRowsHeight()\n });\n const x = this.barContainer.attribute.x;\n const y = this.barContainer.attribute.y;\n this.barContainer.removeAllChild();\n this.group.removeChild(this.barContainer);\n this.initBars();\n this.setX(x);\n this.setY(y);\n }\n resize() {\n this.width = this._scene._gantt.tableNoFrameWidth;\n this.height = this._scene._gantt.gridHeight;\n this.group.setAttribute('width', this.width);\n this.group.setAttribute('height', this.height);\n }\n\n showHoverBar(x: number, y: number, width: number, height: number, target?: GanttTaskBarNode) {\n const { startDate, endDate, taskRecord } = this._scene._gantt.getTaskInfoByTaskListIndex(\n target.task_index,\n target.sub_task_index\n );\n if (target && target.name === 'task-bar') {\n // this.hoverBarGroup.releatedTaskBar = target;\n target.appendChild(this.hoverBarGroup);\n }\n this.hoverBarGroup.setAttribute('x', 0);\n this.hoverBarGroup.setAttribute('y', 0);\n this.hoverBarGroup.setAttribute('width', width);\n this.hoverBarGroup.setAttribute('height', height);\n this.hoverBarGroup.setAttribute('visibleAll', true);\n const taskBarStyle = this._scene._gantt.getTaskBarStyle(target.task_index, target.sub_task_index);\n if (taskRecord.type === TaskType.MILESTONE) {\n this.hoverBarGroup.setAttribute('cornerRadius', target.attribute.cornerRadius);\n } else {\n const cornerRadius =\n this._scene._gantt.parsedOptions.taskBarHoverStyle.cornerRadius ?? taskBarStyle.cornerRadius ?? 0;\n this.hoverBarGroup.setAttribute('cornerRadius', cornerRadius);\n }\n this.hoverBarLeftIcon?.setAttribute('visible', false);\n this.hoverBarRightIcon?.setAttribute('visible', false);\n this.hoverBarProgressHandle?.setAttribute('visibleAll', false);\n\n let leftResizable = true;\n let rightResizable = true;\n let progressAdjustable = true;\n\n const progressField = this._scene._gantt.parsedOptions.progressField;\n const hasProgressField =\n progressField && taskRecord[progressField] !== undefined && taskRecord[progressField] !== null;\n\n if (!hasProgressField) {\n progressAdjustable = false;\n } else if (typeof this._scene._gantt.parsedOptions.taskBarProgressAdjustable === 'function') {\n const arg = {\n index: target.task_index,\n startDate,\n endDate,\n taskRecord,\n ganttInstance: this._scene._gantt\n };\n progressAdjustable = this._scene._gantt.parsedOptions.taskBarProgressAdjustable(arg);\n } else {\n progressAdjustable = this._scene._gantt.parsedOptions.taskBarProgressAdjustable;\n }\n\n if (taskRecord.type === TaskType.MILESTONE) {\n leftResizable = false;\n rightResizable = false;\n progressAdjustable = false;\n } else if (typeof this._scene._gantt.parsedOptions.taskBarResizable === 'function') {\n const arg = {\n index: target.task_index,\n startDate,\n endDate,\n taskRecord,\n ganttInstance: this._scene._gantt\n };\n const resizableResult = this._scene._gantt.parsedOptions.taskBarResizable(arg);\n if (Array.isArray(resizableResult)) {\n [leftResizable, rightResizable] = resizableResult;\n } else {\n leftResizable = resizableResult;\n rightResizable = resizableResult;\n }\n } else if (Array.isArray(this._scene._gantt.parsedOptions.taskBarResizable)) {\n [leftResizable, rightResizable] = this._scene._gantt.parsedOptions.taskBarResizable;\n } else {\n leftResizable = this._scene._gantt.parsedOptions.taskBarResizable;\n rightResizable = this._scene._gantt.parsedOptions.taskBarResizable;\n }\n if (leftResizable) {\n this.hoverBarLeftIcon.setAttribute('visible', true);\n }\n if (rightResizable) {\n this.hoverBarRightIcon.setAttribute('visible', true);\n }\n if (progressAdjustable) {\n this.hoverBarProgressHandle.setAttribute('visibleAll', true);\n }\n if (this.hoverBarLeftIcon) {\n this.hoverBarLeftIcon.setAttribute('x', 0);\n this.hoverBarLeftIcon.setAttribute('y', Math.ceil(height / 10));\n this.hoverBarLeftIcon.setAttribute('width', TASKBAR_HOVER_ICON_WIDTH);\n this.hoverBarLeftIcon.setAttribute('height', height - 2 * Math.ceil(height / 10));\n this.hoverBarRightIcon.setAttribute('x', width - TASKBAR_HOVER_ICON_WIDTH);\n this.hoverBarRightIcon.setAttribute('y', Math.ceil(height / 10));\n this.hoverBarRightIcon.setAttribute('width', TASKBAR_HOVER_ICON_WIDTH);\n this.hoverBarRightIcon.setAttribute('height', height - 2 * Math.ceil(height / 10));\n }\n if (this.hoverBarProgressHandle) {\n const { progress } = this._scene._gantt.getTaskInfoByTaskListIndex(target.task_index, target.sub_task_index);\n const progressX = (width * progress) / 100 - 6;\n this.hoverBarProgressHandle.setAttribute('x', progressX);\n this.hoverBarProgressHandle.setAttribute('y', height - 3); // 让三角形有一半在进度条内\n }\n }\n hideHoverBar() {\n this.hoverBarGroup.setAttribute('visibleAll', false);\n }\n\n createSelectedBorder(\n x: number,\n y: number,\n width: number,\n height: number,\n attachedToTaskBarNode: GanttTaskBarNode,\n showLinkPoint: boolean = false\n ) {\n const record = attachedToTaskBarNode.record;\n const selectedBorder = new Group({\n x,\n y,\n width,\n height,\n // lineWidth: this._scene._gantt.parsedOptions.taskBarSelectedStyle.borderLineWidth,\n pickable: false,\n // cornerRadius: attachedToTaskBarNode.attribute.cornerRadius,\n // fill: false,\n // stroke: this._scene._gantt.parsedOptions.taskBarSelectedStyle.borderColor,\n // shadowColor: this._scene._gantt.parsedOptions.taskBarSelectedStyle.shadowColor,\n // shadowOffsetX: this._scene._gantt.parsedOptions.taskBarSelectedStyle.shadowOffsetX,\n // shadowOffsetY: this._scene._gantt.parsedOptions.taskBarSelectedStyle.shadowOffsetY,\n // shadowBlur: this._scene._gantt.parsedOptions.taskBarSelectedStyle.shadowBlur,\n attachedToTaskBarNode: attachedToTaskBarNode,\n zIndex: 10000\n // angle: attachedToTaskBarNode.attribute.angle,\n // anchor: attachedToTaskBarNode.attribute.anchor\n } as any);\n selectedBorder.name = 'task-bar-select-border';\n this.barContainer.appendChild(selectedBorder);\n this.selectedBorders.push(selectedBorder);\n\n const selectRectBorder = new Group({\n x: 0,\n y: 0,\n width,\n height,\n lineWidth: this._scene._gantt.parsedOptions.taskBarSelectedStyle.borderLineWidth,\n pickable: false,\n cornerRadius: attachedToTaskBarNode.attribute.cornerRadius,\n fill: false,\n stroke: this._scene._gantt.parsedOptions.taskBarSelectedStyle.borderColor,\n shadowColor: this._scene._gantt.parsedOptions.taskBarSelectedStyle.shadowColor,\n shadowOffsetX: this._scene._gantt.parsedOptions.taskBarSelectedStyle.shadowOffsetX,\n shadowOffsetY: this._scene._gantt.parsedOptions.taskBarSelectedStyle.shadowOffsetY,\n shadowBlur: this._scene._gantt.parsedOptions.taskBarSelectedStyle.shadowBlur,\n // attachedToTaskBarNode: attachedToTaskBarNode,\n angle: attachedToTaskBarNode.attribute.angle,\n anchor: [width / 2, height / 2]\n });\n // selectRectBorder.name = 'task-bar-select-border';\n selectedBorder.appendChild(selectRectBorder);\n\n if (showLinkPoint) {\n const isMilestone = record.type === TaskType.MILESTONE;\n const linePointPadding = isMilestone ? 15 : 10;\n const linkPointContainer = new Group({\n x: -linePointPadding,\n y: 0,\n width: 10,\n height: height,\n pickable: true\n });\n const linkPoint = new Circle({\n x: 5,\n y: height / 2,\n radius: this._scene._gantt.parsedOptions.dependencyLinkLineCreatePointStyle.radius,\n fill: this._scene._gantt.parsedOptions.dependencyLinkLineCreatePointStyle.fillColor,\n stroke: this._scene._gantt.parsedOptions.dependencyLinkLineCreatePointStyle.strokeColor,\n lineWidth: this._scene._gantt.parsedOptions.dependencyLinkLineCreatePointStyle.strokeWidth,\n pickable: false\n });\n linkPointContainer.appendChild(linkPoint);\n linkPointContainer.name = 'task-bar-link-point-left';\n selectedBorder.appendChild(linkPointContainer);\n\n const linkPointContainer1 = new Group({\n x: width + (linePointPadding - 10),\n y: 0,\n width: 10,\n height: height,\n pickable: true\n });\n const linkPoint1 = new Circle({\n x: 5,\n y: height / 2,\n radius: this._scene._gantt.parsedOptions.dependencyLinkLineCreatePointStyle.radius,\n fill: this._scene._gantt.parsedOptions.dependencyLinkLineCreatePointStyle.fillColor,\n stroke: this._scene._gantt.parsedOptions.dependencyLinkLineCreatePointStyle.strokeColor,\n lineWidth: this._scene._gantt.parsedOptions.dependencyLinkLineCreatePointStyle.strokeWidth,\n pickable: false,\n pickStrokeBuffer: 10\n });\n linkPointContainer1.appendChild(linkPoint1);\n linkPointContainer1.name = 'task-bar-link-point-right';\n selectedBorder.appendChild(linkPointContainer1);\n }\n }\n removeSelectedBorder() {\n this.selectedBorders.forEach(border => {\n border.delete();\n });\n this.selectedBorders = [];\n }\n removeSecondSelectedBorder() {\n if (this.selectedBorders.length === 2) {\n const secondBorder = this.selectedBorders.pop();\n secondBorder.delete();\n }\n }\n updateCreatingDependencyLine(x1: number, y1: number, x2: number, y2: number) {\n if (this.creatingDependencyLine) {\n this.creatingDependencyLine.delete();\n this.creatingDependencyLine = undefined;\n }\n const line = new Line({\n points: [\n { x: x1, y: y1 },\n { x: x2, y: y2 }\n ],\n stroke: this._scene._gantt.parsedOptions.dependencyLinkLineCreatingStyle.lineColor,\n lineWidth: this._scene._gantt.parsedOptions.dependencyLinkLineCreatingStyle.lineWidth,\n lineDash: this._scene._gantt.parsedOptions.dependencyLinkLineCreatingStyle.lineDash,\n pickable: false\n });\n this.creatingDependencyLine = line;\n this.selectedBorders[0].appendChild(line);\n }\n\n getTaskBarNodeByIndex(index: number, sub_task_index?: number): GanttTaskBarNode {\n let c = this.barContainer.firstChild as GanttTaskBarNode;\n if (!c) {\n return null;\n }\n for (let i = 0; i < this.barContainer.childrenCount; i++) {\n if (\n c.task_index === index &&\n (!isValid(sub_task_index) || (isValid(sub_task_index) && c.sub_task_index === sub_task_index))\n ) {\n return c;\n }\n c = c._next as GanttTaskBarNode;\n }\n return null;\n }\n}\n"]}
|
|
1
|
+
{"version":3,"sources":["../src/scenegraph/task-bar.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,UAAU,EAAE,UAAU,EAAE,KAAK,EAAE,MAAM,EAAE,IAAI,EAAE,OAAO,EAAE,MAAM,6BAA6B,CAAC;AAG1G,OAAO,EAAE,mBAAmB,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAChE,OAAO,EAAE,OAAO,EAAE,MAAM,kBAAkB,CAAC;AAC3C,OAAO,EAAE,mBAAmB,EAAE,UAAU,EAAE,MAAM,iBAA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AAE,cAAuB;QAC1D,IAAI,CAAC,GAAG,IAAI,CAAC,YAAY,CAAC,UAA8B,CAAC;QACzD,IAAI,CAAC,CAAC,EAAE;YACN,OAAO,IAAI,CAAC;SACb;QACD,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,IAAI,CAAC,YAAY,CAAC,aAAa,EAAE,CAAC,EAAE,EAAE;YACxD,IACE,CAAC,CAAC,UAAU,KAAK,KAAK;gBACtB,CAAC,CAAC,OAAO,CAAC,cAAc,CAAC,IAAI,CAAC,OAAO,CAAC,cAAc,CAAC,IAAI,CAAC,CAAC,cAAc,KAAK,cAAc,CAAC,CAAC,EAC9F;gBACA,OAAO,CAAC,CAAC;aACV;YACD,CAAC,GAAG,CAAC,CAAC,KAAyB,CAAC;SACjC;QACD,OAAO,IAAI,CAAC;IACd,CAAC;CACF","file":"task-bar.js","sourcesContent":["import { Group, createText, createRect, Image, Circle, Line, Polygon } from '@visactor/vtable/es/vrender';\nimport type { Scenegraph } from './scenegraph';\n// import { Icon } from './icon';\nimport { parseStringTemplate, toBoxArray } from '../tools/util';\nimport { isValid } from '@visactor/vutils';\nimport { defaultTaskBarStyle, getTextPos } from '../gantt-helper';\nimport { GanttTaskBarNode } from './gantt-node';\nimport { TasksShowMode, TaskType } from '../ts-types';\n\nconst TASKBAR_HOVER_ICON = `<svg width=\"100\" height=\"200\" xmlns=\"http://www.w3.org/2000/svg\">\n <line x1=\"30\" y1=\"10\" x2=\"30\" y2=\"190\" stroke=\"black\" stroke-width=\"4\"/>\n <line x1=\"70\" y1=\"10\" x2=\"70\" y2=\"190\" stroke=\"black\" stroke-width=\"4\"/>\n</svg>`;\nexport const TASKBAR_HOVER_ICON_WIDTH = 10;\n\nexport class TaskBar {\n formatMilestoneText(text: string, record: any): string {\n if (!text) {\n return '';\n }\n const fieldPattern = /{([^}]+)}/g;\n const matches = text.match(fieldPattern);\n\n if (matches) {\n matches.forEach(match => {\n const fieldName = match.substring(1, match.length - 1);\n const fieldValue = record[fieldName];\n if (fieldValue !== undefined) {\n text = text.replace(match, String(fieldValue));\n }\n });\n }\n return text;\n }\n\n calculateMilestoneTextPosition(\n position: string,\n milestoneWidth: number,\n padding: number | number[] = 4\n ): {\n textX: number;\n textY: number;\n textAlignValue: CanvasTextAlign;\n textBaselineValue: CanvasTextBaseline;\n } {\n const paddingVal = typeof padding === 'number' ? padding : 4;\n let textX = 0;\n let textY = 0;\n let textAlignValue: CanvasTextAlign = 'left';\n let textBaselineValue: CanvasTextBaseline = 'middle';\n\n // 将文本位置改为以中心点为基准\n const center = milestoneWidth / 2;\n\n switch (position) {\n case 'left':\n textX = -paddingVal;\n textY = center;\n textAlignValue = 'end';\n textBaselineValue = 'middle';\n break;\n case 'right':\n textX = milestoneWidth + paddingVal;\n textY = center;\n textAlignValue = 'start';\n textBaselineValue = 'middle';\n break;\n case 'top':\n textX = center;\n textY = -paddingVal;\n textAlignValue = 'center';\n textBaselineValue = 'bottom';\n break;\n case 'bottom':\n textX = center;\n textY = milestoneWidth + paddingVal;\n textAlignValue = 'center';\n textBaselineValue = 'top';\n break;\n default:\n textX = milestoneWidth + paddingVal;\n textY = center;\n textAlignValue = 'start';\n textBaselineValue = 'middle';\n }\n\n return {\n textX,\n textY,\n textAlignValue,\n textBaselineValue\n };\n }\n group: Group;\n barContainer: Group;\n hoverBarGroup: Group;\n creatingDependencyLine: Line;\n hoverBarLeftIcon: Image;\n hoverBarRightIcon: Image;\n hoverBarProgressHandle: Group;\n _scene: Scenegraph;\n width: number;\n height: number;\n selectedBorders: Group[] = [];\n constructor(scene: Scenegraph) {\n this._scene = scene;\n // const height = Math.min(scene._gantt.tableNoFrameHeight, scene._gantt.drawHeight);\n this.width = scene._gantt.tableNoFrameWidth;\n this.height = scene._gantt.gridHeight;\n this.group = new Group({\n x: 0,\n y: scene._gantt.getAllHeaderRowsHeight(),\n width: this.width,\n height: this.height,\n pickable: false,\n clip: true\n });\n this.group.name = 'task-bar-container';\n scene.ganttGroup.addChild(this.group);\n this.initBars();\n this.initHoverBarIcons();\n }\n\n initBars() {\n this.barContainer = new Group({\n x: 0,\n y: 0,\n width: this._scene._gantt.getAllDateColsWidth(),\n height: this._scene._gantt.getAllTaskBarsHeight(),\n pickable: false,\n clip: true\n });\n this.group.appendChild(this.barContainer);\n\n for (let i = 0; i < this._scene._gantt.itemCount; i++) {\n if (\n this._scene._gantt.parsedOptions.tasksShowMode === TasksShowMode.Sub_Tasks_Inline ||\n this._scene._gantt.parsedOptions.tasksShowMode === TasksShowMode.Sub_Tasks_Separate ||\n this._scene._gantt.parsedOptions.tasksShowMode === TasksShowMode.Sub_Tasks_Arrange ||\n this._scene._gantt.parsedOptions.tasksShowMode === TasksShowMode.Sub_Tasks_Compact\n ) {\n const record = this._scene._gantt.getRecordByIndex(i);\n if (record.children?.length > 0) {\n for (let j = 0; j < record.children?.length; j++) {\n const { barGroupBox, baselineBar } = this.initBar(i, j, record.children.length);\n if (baselineBar) {\n this.barContainer.appendChild(baselineBar);\n }\n if (barGroupBox) {\n this.barContainer.appendChild(barGroupBox);\n }\n }\n } else {\n const { barGroupBox, baselineBar } = this.initBar(i);\n if (baselineBar) {\n this.barContainer.appendChild(baselineBar);\n }\n if (barGroupBox) {\n this.barContainer.appendChild(barGroupBox);\n }\n }\n continue;\n } else if (this._scene._gantt.parsedOptions.tasksShowMode === TasksShowMode.Project_Sub_Tasks_Inline) {\n const record = this._scene._gantt.getRecordByIndex(i);\n const isExpanded = record.hierarchyState === 'expand';\n // For project type records, we want to show all children in one line when collapsed\n if (record.type === TaskType.PROJECT && record.children?.length > 0 && !isExpanded) {\n const recordIndex = this._scene._gantt.getRecordIndexByTaskShowIndex(i);\n const sub_task_indexs: number[] = Array.isArray(recordIndex) ? [...recordIndex] : [recordIndex];\n\n const callInitBar = (record: any, sub_task_indexs: number[]) => {\n if (record.children?.length > 0) {\n for (let j = 0; j < record.children?.length; j++) {\n const child_record = record.children[j];\n if (child_record.type !== TaskType.PROJECT) {\n const { barGroupBox, baselineBar } = this.initBar(i, [...sub_task_indexs, j], record.children.length);\n if (baselineBar) {\n this.barContainer.appendChild(baselineBar);\n }\n if (barGroupBox) {\n this.barContainer.appendChild(barGroupBox);\n }\n } else {\n //如果是project类型的子任务,需要递归调用 只将类型不是project的子任务添加到barContainer中\n callInitBar(child_record, [...sub_task_indexs, j]);\n }\n }\n }\n };\n callInitBar(record, sub_task_indexs);\n } else {\n // For non-project tasks, use the default Tasks_Separate mode\n const { barGroupBox, baselineBar } = this.initBar(i);\n if (baselineBar) {\n this.barContainer.appendChild(baselineBar);\n }\n if (barGroupBox) {\n this.barContainer.appendChild(barGroupBox);\n }\n }\n continue;\n } else {\n const { barGroupBox, baselineBar } = this.initBar(i);\n if (baselineBar) {\n this.barContainer.appendChild(baselineBar);\n }\n if (barGroupBox) {\n this.barContainer.appendChild(barGroupBox);\n }\n }\n }\n }\n\n /**\n * @param index 任务显示的index,从0开始\n * @param childIndex 子任务的index, 当taskShowMode是sub_tasks_*模式时,会传入sub_task_index。如果是tasks_separate模式,sub_task_index传入undefined。\n * 如果模式Project_Sub_Tasks_Inline时,传入的sub_task_index是一个数组,数组的第一个元素是父任务的index,第二个元素是子任务的index,依次类推算是各层子任务的path。\n */\n initBar(index: number, childIndex?: number | number[], childrenLength?: number) {\n const taskBarCustomLayout = this._scene._gantt.parsedOptions.taskBarCustomLayout;\n const { startDate, endDate, taskDays, progress, taskRecord } = this._scene._gantt.getTaskInfoByTaskListIndex(\n index,\n childIndex\n );\n const isMilestone = taskRecord.type === TaskType.MILESTONE;\n if (\n (isMilestone && !startDate) ||\n (!isMilestone && (taskDays <= 0 || !startDate || !endDate || startDate.getTime() > endDate.getTime()))\n ) {\n return { barGroupBox: null, baselineBar: null };\n }\n let taskBarSize =\n this._scene._gantt.getXByTime(endDate.getTime() + 1) - this._scene._gantt.getXByTime(startDate.getTime());\n\n const taskBarStyle = this._scene._gantt.getTaskBarStyle(index, childIndex);\n const taskbarHeight = taskBarStyle.width;\n if (isValid(taskBarStyle.minSize)) {\n taskBarSize = Math.max(taskBarSize, taskBarStyle.minSize);\n }\n\n const oneTaskHeigth = this._scene._gantt.parsedOptions.rowHeight;\n const milestoneTaskBarHeight = this._scene._gantt.parsedOptions.taskBarMilestoneStyle.width;\n const x = this._scene._gantt.getXByTime(startDate.getTime()) - (isMilestone ? milestoneTaskBarHeight / 2 : 0);\n let y =\n this._scene._gantt.getRowsHeightByIndex(0, index - 1) +\n (this._scene._gantt.parsedOptions.tasksShowMode === TasksShowMode.Sub_Tasks_Separate\n ? ((childIndex as number) ?? 0) * oneTaskHeigth\n : this._scene._gantt.parsedOptions.tasksShowMode === TasksShowMode.Sub_Tasks_Arrange ||\n this._scene._gantt.parsedOptions.tasksShowMode === TasksShowMode.Sub_Tasks_Compact\n ? taskRecord.vtable_gantt_showIndex * oneTaskHeigth\n : 0);\n\n const baselineInfo = this._scene._gantt.getBaselineInfoByTaskListIndex(index, childIndex);\n const hasBaseline = baselineInfo.baselineStartDate && baselineInfo.baselineEndDate && baselineInfo.baselineDays > 0;\n const baselinePosition = this._scene._gantt.parsedOptions.baselinePosition;\n\n let baselineBar: any = null;\n let taskBarYOffset = 0;\n\n if (hasBaseline && !isMilestone) {\n const baselineStyle = this._scene._gantt.getBaselineStyle(index, childIndex);\n const baselineX = this._scene._gantt.getXByTime(baselineInfo.baselineStartDate.getTime());\n const baselineWidth =\n this._scene._gantt.getXByTime(baselineInfo.baselineEndDate.getTime() + 1) -\n this._scene._gantt.getXByTime(baselineInfo.baselineStartDate.getTime());\n\n let baselineY: number;\n const taskBarPaddingTop = taskBarStyle.paddingTop ?? undefined;\n const baselinePaddingTop = baselineStyle.paddingTop ?? undefined;\n\n if (baselinePosition === 'overlap') {\n if (taskBarPaddingTop !== undefined) {\n baselineY = y + taskBarPaddingTop;\n } else {\n baselineY = y + (oneTaskHeigth - baselineStyle.width) / 2;\n }\n } else if (baselinePosition === 'top') {\n const gap = 4;\n if (baselinePaddingTop !== undefined && taskBarPaddingTop !== undefined) {\n baselineY = y + baselinePaddingTop;\n taskBarYOffset = taskBarPaddingTop;\n } else if (baselinePaddingTop !== undefined) {\n baselineY = y + baselinePaddingTop;\n taskBarYOffset = baselinePaddingTop + baselineStyle.width + gap;\n } else if (taskBarPaddingTop !== undefined) {\n const totalHeight = baselineStyle.width + gap + taskbarHeight;\n const startY = (oneTaskHeigth - totalHeight) / 2;\n baselineY = y + startY;\n taskBarYOffset = taskBarPaddingTop;\n } else {\n const totalHeight = baselineStyle.width + gap + taskbarHeight;\n const startY = (oneTaskHeigth - totalHeight) / 2;\n baselineY = y + startY;\n taskBarYOffset = startY + baselineStyle.width + gap;\n }\n } else {\n const gap = 4;\n if (taskBarPaddingTop !== undefined && baselinePaddingTop !== undefined) {\n taskBarYOffset = taskBarPaddingTop;\n baselineY = y + baselinePaddingTop;\n } else if (taskBarPaddingTop !== undefined) {\n taskBarYOffset = taskBarPaddingTop;\n baselineY = y + taskBarPaddingTop + taskbarHeight + gap;\n } else if (baselinePaddingTop !== undefined) {\n const totalHeight = taskbarHeight + gap + baselineStyle.width;\n const startY = (oneTaskHeigth - totalHeight) / 2;\n taskBarYOffset = startY;\n baselineY = y + baselinePaddingTop;\n } else {\n const totalHeight = taskbarHeight + gap + baselineStyle.width;\n const startY = (oneTaskHeigth - totalHeight) / 2;\n taskBarYOffset = startY;\n baselineY = y + startY + taskbarHeight + gap;\n }\n }\n\n baselineBar = createRect({\n x: baselineX,\n y: baselineY,\n width: Math.max(baselineWidth, baselineStyle.minSize || 0),\n height: baselineStyle.width,\n fill: baselineStyle.barColor,\n cornerRadius: baselineStyle.cornerRadius,\n lineWidth: (baselineStyle.borderLineWidth ?? baselineStyle.borderWidth) * 2,\n stroke: baselineStyle.borderColor,\n pickable: false\n });\n baselineBar.name = 'baseline-bar';\n }\n\n const taskBarPaddingTop = taskBarStyle.paddingTop ?? undefined;\n if (hasBaseline && !isMilestone && baselinePosition !== 'overlap') {\n y = y + taskBarYOffset;\n } else if (taskBarPaddingTop !== undefined) {\n y = y + taskBarPaddingTop;\n } else {\n y += (oneTaskHeigth - (isMilestone ? milestoneTaskBarHeight : taskbarHeight)) / 2 + taskBarYOffset;\n }\n\n const barGroupBox = new GanttTaskBarNode({\n x,\n y,\n width: isMilestone ? milestoneTaskBarHeight : taskBarSize,\n height: isMilestone ? milestoneTaskBarHeight : taskbarHeight,\n cornerRadius: isMilestone\n ? this._scene._gantt.parsedOptions.taskBarMilestoneStyle.cornerRadius\n : taskBarStyle.cornerRadius,\n lineWidth: isMilestone\n ? this._scene._gantt.parsedOptions.taskBarMilestoneStyle.borderLineWidth * 2\n : (taskBarStyle.borderLineWidth ?? taskBarStyle.borderWidth) * 2,\n stroke: isMilestone\n ? this._scene._gantt.parsedOptions.taskBarMilestoneStyle.borderColor\n : taskBarStyle.borderColor,\n angle: isMilestone ? (45 / 180) * Math.PI : 0,\n anchor: isMilestone ? [x + milestoneTaskBarHeight / 2, y + milestoneTaskBarHeight / 2] : undefined\n });\n barGroupBox.name = 'task-bar';\n barGroupBox.task_index = index;\n barGroupBox.sub_task_index = childIndex as any;\n barGroupBox.record = taskRecord;\n\n const barGroup = new Group({\n x: 0,\n y: 0,\n width: barGroupBox.attribute.width,\n height: barGroupBox.attribute.height,\n cornerRadius: isMilestone\n ? this._scene._gantt.parsedOptions.taskBarMilestoneStyle.cornerRadius\n : taskBarStyle.cornerRadius,\n clip: this._scene._gantt.parsedOptions.taskBarClip\n });\n barGroup.name = 'task-bar-group';\n barGroupBox.appendChild(barGroup);\n barGroupBox.clipGroupBox = barGroup;\n let rootContainer;\n let renderDefaultBar = true;\n let renderDefaultText = true;\n\n if (taskBarCustomLayout) {\n let customLayoutObj;\n if (typeof taskBarCustomLayout === 'function') {\n const arg = {\n width: taskBarSize,\n height: taskbarHeight,\n index,\n startDate,\n endDate,\n taskDays,\n progress,\n taskRecord,\n ganttInstance: this._scene._gantt\n };\n customLayoutObj = taskBarCustomLayout(arg);\n } else {\n customLayoutObj = taskBarCustomLayout;\n }\n if (customLayoutObj) {\n rootContainer = customLayoutObj.rootContainer;\n renderDefaultBar = customLayoutObj.renderDefaultBar ?? false;\n renderDefaultText = customLayoutObj.renderDefaultText ?? false;\n rootContainer && (rootContainer.name = 'task-bar-custom-render');\n }\n }\n\n if (renderDefaultBar) {\n const rect = createRect({\n x: 0,\n y: 0,\n width: barGroupBox.attribute.width,\n height: barGroupBox.attribute.height,\n fill: isMilestone ? this._scene._gantt.parsedOptions.taskBarMilestoneStyle.fillColor : taskBarStyle.barColor,\n pickable: false\n });\n rect.name = 'task-bar-rect';\n barGroup.appendChild(rect);\n barGroupBox.barRect = rect;\n if (taskRecord.type !== TaskType.MILESTONE) {\n const progress_rect = createRect({\n x: 0,\n y: 0,\n width: (taskBarSize * progress) / 100,\n height: taskbarHeight,\n fill: taskBarStyle.completedBarColor,\n pickable: false\n });\n progress_rect.name = 'task-bar-progress-rect';\n barGroup.appendChild(progress_rect);\n barGroupBox.progressRect = progress_rect;\n }\n }\n\n rootContainer && barGroup.appendChild(rootContainer);\n if (renderDefaultText && taskRecord.type !== TaskType.MILESTONE) {\n const { textAlign, textBaseline, fontSize, fontFamily, textOverflow, color, padding } =\n this._scene._gantt.parsedOptions.taskBarLabelStyle;\n const position = getTextPos(toBoxArray(padding), textAlign, textBaseline, taskBarSize, taskbarHeight);\n //创建label 文字\n const label = createText({\n // visible: false,\n // pickable: false,\n x: position.x, //extAlign === 'center' ? taskBarSize / 2 : textAlign === 'left' ? 10 : taskBarSize - 10,\n y: position.y, //fontSize / 2,\n fontSize: fontSize, // 10\n fill: color,\n fontFamily: fontFamily,\n text: parseStringTemplate(this._scene._gantt.parsedOptions.taskBarLabelText as string, taskRecord),\n maxLineWidth: taskBarSize - TASKBAR_HOVER_ICON_WIDTH,\n textBaseline,\n textAlign,\n ellipsis:\n textOverflow === 'clip'\n ? ''\n : textOverflow === 'ellipsis'\n ? '...'\n : isValid(textOverflow)\n ? textOverflow\n : undefined,\n poptip: {\n position: 'bottom'\n // dx: (taskBarSize - TASKBAR_HOVER_ICON_WIDTH) / 4\n }\n // dx: 12 + 4,\n // dy: this._scene._gantt.barLabelStyle.fontSize / 2\n } as any);\n\n barGroup.appendChild(label);\n barGroupBox.textLabel = label;\n\n barGroupBox.labelStyle = this._scene._gantt.parsedOptions.taskBarLabelStyle;\n\n barGroupBox.updateTextPosition();\n }\n if (\n renderDefaultText &&\n taskRecord.type === 'milestone' &&\n this._scene._gantt.parsedOptions.taskBarMilestoneStyle.labelText\n ) {\n const milestoneStyle = this._scene._gantt.parsedOptions.taskBarMilestoneStyle;\n const textStyle = milestoneStyle.labelTextStyle || {};\n const pos = this.calculateMilestoneTextPosition(\n milestoneStyle.textOrient || 'right',\n milestoneStyle.width,\n textStyle.padding ?? 4\n );\n\n const textContainer = new Group({\n x,\n y,\n width: milestoneStyle.width,\n height: milestoneStyle.width,\n angle: 0,\n pickable: false\n });\n\n const milestoneLabel = createText({\n x: pos.textX,\n y: pos.textY,\n fontSize: textStyle.fontSize || 16,\n fontFamily: textStyle.fontFamily || 'Arial',\n fill: textStyle.color || '#ff0000',\n textBaseline: (textStyle.textBaseline || pos.textBaselineValue) as any,\n textAlign: textStyle.textAlign || pos.textAlignValue,\n text: this.formatMilestoneText(milestoneStyle.labelText, taskRecord),\n pickable: false\n });\n\n textContainer.appendChild(milestoneLabel);\n this.barContainer.appendChild(textContainer);\n\n barGroupBox.milestoneTextLabel = milestoneLabel;\n barGroupBox.milestoneTextContainer = textContainer;\n }\n return { barGroupBox, baselineBar };\n }\n updateTaskBarNode(index: number, sub_task_index?: number) {\n const taskbarGroup = this.getTaskBarNodeByIndex(index, sub_task_index);\n if (taskbarGroup) {\n this.barContainer.removeChild(taskbarGroup);\n }\n const { barGroupBox, baselineBar } = this.initBar(index, sub_task_index);\n if (barGroupBox) {\n this.barContainer.insertInto(barGroupBox, index); //TODO\n barGroupBox.updateTextPosition();\n }\n if (baselineBar) {\n this.barContainer.insertBefore(baselineBar, barGroupBox);\n }\n }\n initHoverBarIcons() {\n const hoverBarGroup = new Group({\n x: 0,\n y: 0,\n width: 100,\n height: 100,\n clip: false, // 关闭裁剪以允许进度手柄显示在任务条外部\n pickable: false,\n cornerRadius:\n this._scene._gantt.parsedOptions.taskBarHoverStyle.cornerRadius ?? defaultTaskBarStyle.cornerRadius ?? 0,\n fill: this._scene._gantt.parsedOptions.taskBarHoverStyle.barOverlayColor,\n visibleAll: false\n });\n this.hoverBarGroup = hoverBarGroup;\n hoverBarGroup.name = 'task-bar-hover-shadow';\n // this.barContainer.appendChild(hoverBarGroup);\n // 创建左侧的icon\n if (this._scene._gantt.parsedOptions.taskBarResizable) {\n const icon = new Image({\n x: 0,\n y: 0, //this._scene._gantt.parsedOptions.rowHeight - taskbarHeight) / 2,\n width: TASKBAR_HOVER_ICON_WIDTH,\n height: 20,\n image: TASKBAR_HOVER_ICON,\n pickable: true,\n cursor: 'col-resize'\n });\n icon.name = 'task-bar-hover-shadow-left-icon';\n this.hoverBarLeftIcon = icon;\n hoverBarGroup.appendChild(icon);\n\n // 创建右侧的icon\n const rightIcon = new Image({\n x: 0,\n y: 0, //this._scene._gantt.parsedOptions.rowHeight - taskbarHeight) / 2,\n width: TASKBAR_HOVER_ICON_WIDTH,\n height: 20,\n image: TASKBAR_HOVER_ICON,\n pickable: true,\n cursor: 'col-resize'\n });\n rightIcon.name = 'task-bar-hover-shadow-right-icon';\n this.hoverBarRightIcon = rightIcon;\n hoverBarGroup.appendChild(rightIcon);\n }\n\n // 创建进度手柄\n const progressHandle = new Group({\n x: 0,\n y: 0,\n width: 12,\n height: 12,\n pickable: true,\n cursor: 'ew-resize',\n visible: false\n });\n\n // 创建三角形手柄\n const triangleHandle = new Polygon({\n points: [\n { x: 6, y: 0 }, // 顶部中心点\n { x: 0, y: 6 }, // 左下角\n { x: 12, y: 6 } // 右下角\n ],\n fill: '#0064ff',\n stroke: '#ffffff',\n lineWidth: 1,\n pickable: false\n });\n progressHandle.appendChild(triangleHandle);\n\n progressHandle.name = 'task-bar-progress-handle';\n this.hoverBarProgressHandle = progressHandle;\n hoverBarGroup.appendChild(progressHandle);\n }\n\n setX(x: number) {\n this.barContainer.setAttribute('x', x);\n }\n setY(y: number) {\n this.barContainer.setAttribute('y', y);\n }\n /** 重新创建任务条节点 */\n refresh() {\n this.width = this._scene._gantt.tableNoFrameWidth;\n this.height = this._scene._gantt.gridHeight;\n this.group.setAttributes({\n height: this.height,\n width: this.width,\n y: this._scene._gantt.getAllHeaderRowsHeight()\n });\n const x = this.barContainer.attribute.x;\n const y = this.barContainer.attribute.y;\n this.barContainer.removeAllChild();\n this.group.removeChild(this.barContainer);\n this.initBars();\n this.setX(x);\n this.setY(y);\n }\n resize() {\n this.width = this._scene._gantt.tableNoFrameWidth;\n this.height = this._scene._gantt.gridHeight;\n this.group.setAttribute('width', this.width);\n this.group.setAttribute('height', this.height);\n }\n\n showHoverBar(x: number, y: number, width: number, height: number, target?: GanttTaskBarNode) {\n const { startDate, endDate, taskRecord } = this._scene._gantt.getTaskInfoByTaskListIndex(\n target.task_index,\n target.sub_task_index\n );\n if (target && target.name === 'task-bar') {\n // this.hoverBarGroup.releatedTaskBar = target;\n target.appendChild(this.hoverBarGroup);\n }\n this.hoverBarGroup.setAttribute('x', 0);\n this.hoverBarGroup.setAttribute('y', 0);\n this.hoverBarGroup.setAttribute('width', width);\n this.hoverBarGroup.setAttribute('height', height);\n this.hoverBarGroup.setAttribute('visibleAll', true);\n const taskBarStyle = this._scene._gantt.getTaskBarStyle(target.task_index, target.sub_task_index);\n if (taskRecord.type === TaskType.MILESTONE) {\n this.hoverBarGroup.setAttribute('cornerRadius', target.attribute.cornerRadius);\n } else {\n const cornerRadius =\n this._scene._gantt.parsedOptions.taskBarHoverStyle.cornerRadius ?? taskBarStyle.cornerRadius ?? 0;\n this.hoverBarGroup.setAttribute('cornerRadius', cornerRadius);\n }\n this.hoverBarLeftIcon?.setAttribute('visible', false);\n this.hoverBarRightIcon?.setAttribute('visible', false);\n this.hoverBarProgressHandle?.setAttribute('visibleAll', false);\n\n let leftResizable = true;\n let rightResizable = true;\n let progressAdjustable = true;\n\n const progressField = this._scene._gantt.parsedOptions.progressField;\n const hasProgressField =\n progressField && taskRecord[progressField] !== undefined && taskRecord[progressField] !== null;\n\n if (!hasProgressField) {\n progressAdjustable = false;\n } else if (typeof this._scene._gantt.parsedOptions.taskBarProgressAdjustable === 'function') {\n const arg = {\n index: target.task_index,\n startDate,\n endDate,\n taskRecord,\n ganttInstance: this._scene._gantt\n };\n progressAdjustable = this._scene._gantt.parsedOptions.taskBarProgressAdjustable(arg);\n } else {\n progressAdjustable = this._scene._gantt.parsedOptions.taskBarProgressAdjustable;\n }\n\n if (taskRecord.type === TaskType.MILESTONE) {\n leftResizable = false;\n rightResizable = false;\n progressAdjustable = false;\n } else if (typeof this._scene._gantt.parsedOptions.taskBarResizable === 'function') {\n const arg = {\n index: target.task_index,\n startDate,\n endDate,\n taskRecord,\n ganttInstance: this._scene._gantt\n };\n const resizableResult = this._scene._gantt.parsedOptions.taskBarResizable(arg);\n if (Array.isArray(resizableResult)) {\n [leftResizable, rightResizable] = resizableResult;\n } else {\n leftResizable = resizableResult;\n rightResizable = resizableResult;\n }\n } else if (Array.isArray(this._scene._gantt.parsedOptions.taskBarResizable)) {\n [leftResizable, rightResizable] = this._scene._gantt.parsedOptions.taskBarResizable;\n } else {\n leftResizable = this._scene._gantt.parsedOptions.taskBarResizable;\n rightResizable = this._scene._gantt.parsedOptions.taskBarResizable;\n }\n if (leftResizable) {\n this.hoverBarLeftIcon.setAttribute('visible', true);\n }\n if (rightResizable) {\n this.hoverBarRightIcon.setAttribute('visible', true);\n }\n if (progressAdjustable) {\n this.hoverBarProgressHandle.setAttribute('visibleAll', true);\n }\n if (this.hoverBarLeftIcon) {\n this.hoverBarLeftIcon.setAttribute('x', 0);\n this.hoverBarLeftIcon.setAttribute('y', Math.ceil(height / 10));\n this.hoverBarLeftIcon.setAttribute('width', TASKBAR_HOVER_ICON_WIDTH);\n this.hoverBarLeftIcon.setAttribute('height', height - 2 * Math.ceil(height / 10));\n this.hoverBarRightIcon.setAttribute('x', width - TASKBAR_HOVER_ICON_WIDTH);\n this.hoverBarRightIcon.setAttribute('y', Math.ceil(height / 10));\n this.hoverBarRightIcon.setAttribute('width', TASKBAR_HOVER_ICON_WIDTH);\n this.hoverBarRightIcon.setAttribute('height', height - 2 * Math.ceil(height / 10));\n }\n if (this.hoverBarProgressHandle) {\n const { progress } = this._scene._gantt.getTaskInfoByTaskListIndex(target.task_index, target.sub_task_index);\n const progressX = (width * progress) / 100 - 6;\n this.hoverBarProgressHandle.setAttribute('x', progressX);\n this.hoverBarProgressHandle.setAttribute('y', height - 3); // 让三角形有一半在进度条内\n }\n }\n hideHoverBar() {\n this.hoverBarGroup.setAttribute('visibleAll', false);\n }\n\n createSelectedBorder(\n x: number,\n y: number,\n width: number,\n height: number,\n attachedToTaskBarNode: GanttTaskBarNode,\n showLinkPoint: boolean = false\n ) {\n const record = attachedToTaskBarNode.record;\n const selectedBorder = new Group({\n x,\n y,\n width,\n height,\n // lineWidth: this._scene._gantt.parsedOptions.taskBarSelectedStyle.borderLineWidth,\n pickable: false,\n // cornerRadius: attachedToTaskBarNode.attribute.cornerRadius,\n // fill: false,\n // stroke: this._scene._gantt.parsedOptions.taskBarSelectedStyle.borderColor,\n // shadowColor: this._scene._gantt.parsedOptions.taskBarSelectedStyle.shadowColor,\n // shadowOffsetX: this._scene._gantt.parsedOptions.taskBarSelectedStyle.shadowOffsetX,\n // shadowOffsetY: this._scene._gantt.parsedOptions.taskBarSelectedStyle.shadowOffsetY,\n // shadowBlur: this._scene._gantt.parsedOptions.taskBarSelectedStyle.shadowBlur,\n attachedToTaskBarNode: attachedToTaskBarNode,\n zIndex: 10000\n // angle: attachedToTaskBarNode.attribute.angle,\n // anchor: attachedToTaskBarNode.attribute.anchor\n } as any);\n selectedBorder.name = 'task-bar-select-border';\n this.barContainer.appendChild(selectedBorder);\n this.selectedBorders.push(selectedBorder);\n\n const selectRectBorder = new Group({\n x: 0,\n y: 0,\n width,\n height,\n lineWidth: this._scene._gantt.parsedOptions.taskBarSelectedStyle.borderLineWidth,\n pickable: false,\n cornerRadius: attachedToTaskBarNode.attribute.cornerRadius,\n fill: false,\n stroke: this._scene._gantt.parsedOptions.taskBarSelectedStyle.borderColor,\n shadowColor: this._scene._gantt.parsedOptions.taskBarSelectedStyle.shadowColor,\n shadowOffsetX: this._scene._gantt.parsedOptions.taskBarSelectedStyle.shadowOffsetX,\n shadowOffsetY: this._scene._gantt.parsedOptions.taskBarSelectedStyle.shadowOffsetY,\n shadowBlur: this._scene._gantt.parsedOptions.taskBarSelectedStyle.shadowBlur,\n // attachedToTaskBarNode: attachedToTaskBarNode,\n angle: attachedToTaskBarNode.attribute.angle,\n anchor: [width / 2, height / 2]\n });\n // selectRectBorder.name = 'task-bar-select-border';\n selectedBorder.appendChild(selectRectBorder);\n\n if (showLinkPoint) {\n const isMilestone = record.type === TaskType.MILESTONE;\n const linePointPadding = isMilestone ? 15 : 10;\n const linkPointContainer = new Group({\n x: -linePointPadding,\n y: 0,\n width: 10,\n height: height,\n pickable: true\n });\n const linkPoint = new Circle({\n x: 5,\n y: height / 2,\n radius: this._scene._gantt.parsedOptions.dependencyLinkLineCreatePointStyle.radius,\n fill: this._scene._gantt.parsedOptions.dependencyLinkLineCreatePointStyle.fillColor,\n stroke: this._scene._gantt.parsedOptions.dependencyLinkLineCreatePointStyle.strokeColor,\n lineWidth: this._scene._gantt.parsedOptions.dependencyLinkLineCreatePointStyle.strokeWidth,\n pickable: false\n });\n linkPointContainer.appendChild(linkPoint);\n linkPointContainer.name = 'task-bar-link-point-left';\n selectedBorder.appendChild(linkPointContainer);\n\n const linkPointContainer1 = new Group({\n x: width + (linePointPadding - 10),\n y: 0,\n width: 10,\n height: height,\n pickable: true\n });\n const linkPoint1 = new Circle({\n x: 5,\n y: height / 2,\n radius: this._scene._gantt.parsedOptions.dependencyLinkLineCreatePointStyle.radius,\n fill: this._scene._gantt.parsedOptions.dependencyLinkLineCreatePointStyle.fillColor,\n stroke: this._scene._gantt.parsedOptions.dependencyLinkLineCreatePointStyle.strokeColor,\n lineWidth: this._scene._gantt.parsedOptions.dependencyLinkLineCreatePointStyle.strokeWidth,\n pickable: false,\n pickStrokeBuffer: 10\n });\n linkPointContainer1.appendChild(linkPoint1);\n linkPointContainer1.name = 'task-bar-link-point-right';\n selectedBorder.appendChild(linkPointContainer1);\n }\n }\n removeSelectedBorder() {\n this.selectedBorders.forEach(border => {\n border.delete();\n });\n this.selectedBorders = [];\n }\n removeSecondSelectedBorder() {\n if (this.selectedBorders.length === 2) {\n const secondBorder = this.selectedBorders.pop();\n secondBorder.delete();\n }\n }\n updateCreatingDependencyLine(x1: number, y1: number, x2: number, y2: number) {\n if (this.creatingDependencyLine) {\n this.creatingDependencyLine.delete();\n this.creatingDependencyLine = undefined;\n }\n const line = new Line({\n points: [\n { x: x1, y: y1 },\n { x: x2, y: y2 }\n ],\n stroke: this._scene._gantt.parsedOptions.dependencyLinkLineCreatingStyle.lineColor,\n lineWidth: this._scene._gantt.parsedOptions.dependencyLinkLineCreatingStyle.lineWidth,\n lineDash: this._scene._gantt.parsedOptions.dependencyLinkLineCreatingStyle.lineDash,\n pickable: false\n });\n this.creatingDependencyLine = line;\n this.selectedBorders[0].appendChild(line);\n }\n\n getTaskBarNodeByIndex(index: number, sub_task_index?: number): GanttTaskBarNode {\n let c = this.barContainer.firstChild as GanttTaskBarNode;\n if (!c) {\n return null;\n }\n for (let i = 0; i < this.barContainer.childrenCount; i++) {\n if (\n c.task_index === index &&\n (!isValid(sub_task_index) || (isValid(sub_task_index) && c.sub_task_index === sub_task_index))\n ) {\n return c;\n }\n c = c._next as GanttTaskBarNode;\n }\n return null;\n }\n}\n"]}
|
|
@@ -2,7 +2,7 @@ import { isValid } from "@visactor/vutils";
|
|
|
2
2
|
|
|
3
3
|
import { getTextPos } from "../gantt-helper";
|
|
4
4
|
|
|
5
|
-
import {
|
|
5
|
+
import { toBoxArray } from "../tools/util";
|
|
6
6
|
|
|
7
7
|
import { Group, Text, createLine, Image } from "@visactor/vtable/es/vrender";
|
|
8
8
|
|
|
@@ -23,7 +23,6 @@ export class TimelineHeader {
|
|
|
23
23
|
pickable: !1
|
|
24
24
|
});
|
|
25
25
|
this.group = dateHeader, dateHeader.name = "date-header-container", scene.ganttGroup.addChild(this.group);
|
|
26
|
-
const {unit: minUnit, step: step} = scene._gantt.parsedOptions.reverseSortedTimelineScales[0];
|
|
27
26
|
let y = 0;
|
|
28
27
|
for (let i = 0; i < scene._gantt.timeLineHeaderLevel; i++) {
|
|
29
28
|
const {timelineDates: timelineDates, customLayout: customLayout, visible: visible} = scene._gantt.parsedOptions.sortedTimelineScales[i];
|
|
@@ -37,7 +36,7 @@ export class TimelineHeader {
|
|
|
37
36
|
});
|
|
38
37
|
y += rowHeader.attribute.height, rowHeader.name = "row-header", dateHeader.addChild(rowHeader);
|
|
39
38
|
for (let j = 0; j < (null == timelineDates ? void 0 : timelineDates.length); j++) {
|
|
40
|
-
const {days: days, endDate: endDate, startDate: startDate, title: title, dateIndex: dateIndex, unit: unit} = timelineDates[j], x = Math.ceil(
|
|
39
|
+
const {days: days, endDate: endDate, startDate: startDate, title: title, dateIndex: dateIndex, unit: unit} = timelineDates[j], x = Math.ceil(scene._gantt.getXByTime(startDate.getTime())), width = Math.ceil(scene._gantt.getXByTime(endDate.getTime() + 1)) - x, date = new Group({
|
|
41
40
|
x: x,
|
|
42
41
|
y: 0,
|
|
43
42
|
width: width,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/scenegraph/timeline-header.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,kBAAkB,CAAC;AAC3C,OAAO,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAC7C,OAAO,EAAE,uBAAuB,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAEpE,OAAO,EAAE,KAAK,EAAE,IAA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C,CAAC;QAC3C,IAAI,CAAC,SAAS,EAAE,CAAC;IACnB,CAAC;IACD,gBAAgB,CAAC,MAAW;QAC1B,IAAI,UAAU,CAAC;QACf,MAAM,CAAC,QAAQ,CAAC,OAAO,CAAC,CAAC,KAAU,EAAE,EAAE;YACrC,IAAI,KAAK,CAAC,IAAI,KAAK,uBAAuB,EAAE;gBAC1C,KAAK,CAAC,YAAY,CAAC,SAAS,EAAE,KAAK,CAAC,CAAC;aACtC;YACD,IAAI,KAAK,CAAC,IAAI,KAAK,sBAAsB,EAAE;gBACzC,UAAU,GAAG,KAAK,CAAC,UAAU,CAAC;gBAC9B,UAAU,CAAC,YAAY,CAAC,YAAY,EAAE,IAAI,CAAC,CAAC;aAC7C;QACH,CAAC,CAAC,CAAC;QACH,OAAO,UAAU,CAAC;IACpB,CAAC;IACD,qBAAqB,CAAC,MAAW;QAC/B,IAAI,UAAU,CAAC;QACf,MAAM,CAAC,QAAQ,CAAC,OAAO,CAAC,CAAC,KAAU,EAAE,EAAE;YACrC,IAAI,KAAK,CAAC,IAAI,KAAK,uBAAuB,EAAE;gBAC1C,KAAK,CAAC,YAAY,CAAC,SAAS,EAAE,IAAI,CAAC,CAAC;aACrC;YACD,IAAI,KAAK,CAAC,IAAI,KAAK,sBAAsB,EAAE;gBACzC,UAAU,GAAG,KAAK,CAAC,UAAU,CAAC;gBAC9B,UAAU,CAAC,YAAY,CAAC,YAAY,EAAE,KAAK,CAAC,CAAC;aAC9C;QACH,CAAC,CAAC,CAAC;QACH,OAAO,UAAU,CAAC;IACpB,CAAC;CACF","file":"timeline-header.js","sourcesContent":["import { isValid } from '@visactor/vutils';\nimport { getTextPos } from '../gantt-helper';\nimport { computeCountToTimeScale, toBoxArray } from '../tools/util';\nimport type { Scenegraph } from './scenegraph';\nimport { Group, Text, createLine, Image } from '@visactor/vtable/es/vrender';\n\nconst DEFAULT_MARKLINE_CREATION_ICON = `<svg viewBox=\"0 0 1024 1024\" version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\" p-id=\"1471\" width=\"24\" height=\"24\"> <path d=\"M840.05 153.35a27.61875 27.61875 0 0 0-22.95-4.95c-56.25 13.05-218.25 39.6-289.8 2.25-115.65-60.75-241.65-31.95-299.7-13.05V95.75a27.05625 27.05625 0 0 0-27-27 27.05625 27.05625 0 0 0-27 27v834.75c0 14.85 12.15 27 27 27s27-12.15 27-27V611.9c44.1-13.95 199.35-56.25 293.85 1.8 45.9 28.35 96.75 37.8 143.55 37.8 89.1 0 164.7-34.2 169.65-36.45a27.9 27.9 0 0 0 15.75-24.75V174.5a27.5625 27.5625 0 0 0-10.35-21.15z\" fill=\"#f54319\" p-id=\"1472\"></path></svg>`;\nexport class TimelineHeader {\n group: Group;\n _scene: Scenegraph;\n constructor(scene: Scenegraph) {\n this._scene = scene;\n this.initNodes();\n }\n initNodes() {\n const { _scene: scene } = this;\n const dateHeader = new Group({\n x: 0,\n y: 0,\n width: scene._gantt.getAllDateColsWidth(), //width - 2,\n height: scene._gantt.getAllHeaderRowsHeight(),\n clip: true,\n pickable: false\n // fill: 'purple',\n // stroke: 'green',\n // lineWidth: 2\n });\n this.group = dateHeader;\n dateHeader.name = 'date-header-container';\n scene.ganttGroup.addChild(this.group);\n const { unit: minUnit, step } = scene._gantt.parsedOptions.reverseSortedTimelineScales[0];\n let y = 0;\n for (let i = 0; i < scene._gantt.timeLineHeaderLevel; i++) {\n const { timelineDates, customLayout, visible } = scene._gantt.parsedOptions.sortedTimelineScales[i];\n if (visible === false) {\n continue;\n }\n const rowHeader = new Group({\n x: 0,\n y,\n width: scene._gantt.getAllDateColsWidth(),\n height: scene._gantt.parsedOptions.timeLineHeaderRowHeights[i],\n clip: false\n });\n y += rowHeader.attribute.height;\n rowHeader.name = 'row-header';\n dateHeader.addChild(rowHeader);\n\n for (let j = 0; j < timelineDates?.length; j++) {\n const { days, endDate, startDate, title, dateIndex, unit } = timelineDates[j];\n const x = Math.ceil(\n computeCountToTimeScale(startDate, scene._gantt.parsedOptions.minDate, minUnit, step) *\n scene._gantt.parsedOptions.timelineColWidth\n );\n const right_x = Math.ceil(\n computeCountToTimeScale(endDate, scene._gantt.parsedOptions.minDate, minUnit, step, 1) *\n scene._gantt.parsedOptions.timelineColWidth\n );\n const width = right_x - x;\n const date = new Group({\n x,\n y: 0,\n width,\n height: rowHeader.attribute.height,\n clip: false,\n fill: scene._gantt.parsedOptions.timelineHeaderBackgroundColor\n });\n date.name = 'date-header-cell';\n let rootContainer;\n let renderDefaultText = true;\n\n const height = rowHeader.attribute.height;\n if (customLayout) {\n let customLayoutObj;\n if (typeof customLayout === 'function') {\n const arg = {\n width,\n height,\n index: j,\n startDate,\n endDate,\n days,\n dateIndex,\n title,\n ganttInstance: this._scene._gantt\n };\n customLayoutObj = customLayout(arg);\n } else {\n customLayoutObj = customLayout;\n }\n if (customLayoutObj) {\n // if (customLayoutObj.rootContainer) {\n // customLayoutObj.rootContainer = decodeReactDom(customLayoutObj.rootContainer);\n // }\n rootContainer = customLayoutObj.rootContainer;\n renderDefaultText = customLayoutObj.renderDefaultText ?? false;\n rootContainer.name = 'task-bar-custom-render';\n }\n rootContainer && date.appendChild(rootContainer);\n }\n if (renderDefaultText) {\n const {\n padding,\n textAlign,\n textBaseline,\n textOverflow,\n fontSize,\n fontWeight,\n color,\n strokeColor,\n textStick\n } = scene._gantt.parsedOptions.timelineHeaderStyles[i];\n\n const position = getTextPos(toBoxArray(padding), textAlign, textBaseline, width, height);\n const text = new Text({\n x: position.x,\n y: position.y,\n maxLineWidth: width,\n heightLimit: height,\n // clip: true,\n pickable: true,\n text: title.toLocaleString(),\n fontSize: fontSize,\n fontWeight: fontWeight,\n fill: color,\n stroke: strokeColor,\n lineWidth: 2,\n textAlign,\n textBaseline,\n ellipsis:\n textOverflow === 'clip'\n ? ''\n : textOverflow === 'ellipsis'\n ? '...'\n : isValid(textOverflow)\n ? textOverflow\n : undefined\n });\n (text.attribute as any).textStick = textStick;\n date.appendChild(text);\n text.name = 'date-header-cell-text';\n }\n if (\n i === scene._gantt.timeLineHeaderLevel - 1 &&\n scene._gantt.parsedOptions.markLineCreateOptions &&\n scene._gantt.parsedOptions.markLineCreateOptions.markLineCreatable\n ) {\n const markLineStyle = scene._gantt.parsedOptions.markLineCreateOptions.markLineCreationStyle || {};\n const size = markLineStyle.size || 24;\n const iconSize = markLineStyle.iconSize || 18;\n const marklineCreateIcon = markLineStyle.svg || DEFAULT_MARKLINE_CREATION_ICON;\n // 是否开启里程碑功能\n const marklineCreateGroup = new Group({\n x: width / 2 - size / 2,\n y: height / 2 - size / 2,\n width: size,\n height: size,\n visible: true\n });\n marklineCreateGroup.name = 'markline-hover-group';\n (marklineCreateGroup as any).data = timelineDates[j];\n const marklineCreateInnerGroup = new Group({\n x: 0,\n y: 0,\n width: size,\n height: size,\n cornerRadius: size / 2,\n fill: markLineStyle.fill || '#ccc',\n cursor: 'pointer',\n display: 'flex',\n justifyContent: 'center',\n alignItems: 'center',\n visibleAll: false\n });\n marklineCreateInnerGroup.name = 'markline-hover-inner-group';\n marklineCreateGroup.add(marklineCreateInnerGroup);\n const icon = new Image({\n width: iconSize,\n height: iconSize,\n image: marklineCreateIcon,\n cursor: 'pointer',\n pickable: true\n });\n icon.name = 'markline-hover-icon';\n marklineCreateInnerGroup.appendChild(icon);\n date.add(marklineCreateGroup);\n }\n rowHeader.addChild(date);\n\n if (j > 0) {\n const line = createLine({\n pickable: false,\n stroke: scene._gantt.parsedOptions.timelineHeaderVerticalLineStyle?.lineColor,\n lineWidth: scene._gantt.parsedOptions.timelineHeaderVerticalLineStyle?.lineWidth,\n lineDash: scene._gantt.parsedOptions.timelineHeaderVerticalLineStyle?.lineDash,\n points: [\n { x: scene._gantt.parsedOptions.timelineHeaderVerticalLineStyle?.lineWidth & 1 ? 0.5 : 0, y: 0 },\n {\n x: scene._gantt.parsedOptions.timelineHeaderVerticalLineStyle?.lineWidth & 1 ? 0.5 : 0,\n y: rowHeader.attribute.height\n }\n ]\n });\n date.appendChild(line);\n }\n }\n //创建表头分割线 水平分割线 TODO\n if (i > 0) {\n const line = createLine({\n pickable: false,\n stroke: scene._gantt.parsedOptions.timelineHeaderHorizontalLineStyle?.lineColor,\n lineWidth: scene._gantt.parsedOptions.timelineHeaderHorizontalLineStyle?.lineWidth,\n lineDash: scene._gantt.parsedOptions.timelineHeaderHorizontalLineStyle?.lineDash,\n points: [\n { x: 0, y: scene._gantt.parsedOptions.timelineHeaderHorizontalLineStyle?.lineWidth & 1 ? 0.5 : 0 },\n {\n x: scene._gantt.getAllDateColsWidth(),\n y: scene._gantt.parsedOptions.timelineHeaderHorizontalLineStyle?.lineWidth & 1 ? 0.5 : 0\n }\n ]\n });\n rowHeader.addChild(line);\n }\n }\n }\n setX(x: number) {\n this.group.setAttribute('x', x);\n }\n setY(y: number) {\n this.group.setAttribute('y', y);\n }\n resize() {\n this.group.setAttribute('width', this.group.attribute?.width ?? 0);\n this.group.setAttribute('height', this.group.attribute?.height ?? 0);\n }\n\n refresh() {\n this.group?.parent.removeChild(this.group);\n this.initNodes();\n }\n showMarklineIcon(target: any) {\n let innerGroup;\n target.children.forEach((child: any) => {\n if (child.name === 'date-header-cell-text') {\n child.setAttribute('visible', false);\n }\n if (child.name === 'markline-hover-group') {\n innerGroup = child.firstChild;\n innerGroup.setAttribute('visibleAll', true);\n }\n });\n return innerGroup;\n }\n hideMarklineIconHover(target: any) {\n let innerGroup;\n target.children.forEach((child: any) => {\n if (child.name === 'date-header-cell-text') {\n child.setAttribute('visible', true);\n }\n if (child.name === 'markline-hover-group') {\n innerGroup = child.firstChild;\n innerGroup.setAttribute('visibleAll', false);\n }\n });\n return innerGroup;\n }\n}\n"]}
|
|
1
|
+
{"version":3,"sources":["../src/scenegraph/timeline-header.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,kBAAkB,CAAC;AAC3C,OAAO,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAC7C,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,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,SAAS,EAAE,KAAK,CAAC,CAAC;aACtC;YACD,IAAI,KAAK,CAAC,IAAI,KAAK,sBAAsB,EAAE;gBACzC,UAAU,GAAG,KAAK,CAAC,UAAU,CAAC;gBAC9B,UAAU,CAAC,YAAY,CAAC,YAAY,EAAE,IAAI,CAAC,CAAC;aAC7C;QACH,CAAC,CAAC,CAAC;QACH,OAAO,UAAU,CAAC;IACpB,CAAC;IACD,qBAAqB,CAAC,MAAW;QAC/B,IAAI,UAAU,CAAC;QACf,MAAM,CAAC,QAAQ,CAAC,OAAO,CAAC,CAAC,KAAU,EAAE,EAAE;YACrC,IAAI,KAAK,CAAC,IAAI,KAAK,uBAAuB,EAAE;gBAC1C,KAAK,CAAC,YAAY,CAAC,SAAS,EAAE,IAAI,CAAC,CAAC;aACrC;YACD,IAAI,KAAK,CAAC,IAAI,KAAK,sBAAsB,EAAE;gBACzC,UAAU,GAAG,KAAK,CAAC,UAAU,CAAC;gBAC9B,UAAU,CAAC,YAAY,CAAC,YAAY,EAAE,KAAK,CAAC,CAAC;aAC9C;QACH,CAAC,CAAC,CAAC;QACH,OAAO,UAAU,CAAC;IACpB,CAAC;CACF","file":"timeline-header.js","sourcesContent":["import { isValid } from '@visactor/vutils';\nimport { getTextPos } from '../gantt-helper';\nimport { toBoxArray } from '../tools/util';\nimport type { Scenegraph } from './scenegraph';\nimport { Group, Text, createLine, Image } from '@visactor/vtable/es/vrender';\n\nconst DEFAULT_MARKLINE_CREATION_ICON = `<svg viewBox=\"0 0 1024 1024\" version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\" p-id=\"1471\" width=\"24\" height=\"24\"> <path d=\"M840.05 153.35a27.61875 27.61875 0 0 0-22.95-4.95c-56.25 13.05-218.25 39.6-289.8 2.25-115.65-60.75-241.65-31.95-299.7-13.05V95.75a27.05625 27.05625 0 0 0-27-27 27.05625 27.05625 0 0 0-27 27v834.75c0 14.85 12.15 27 27 27s27-12.15 27-27V611.9c44.1-13.95 199.35-56.25 293.85 1.8 45.9 28.35 96.75 37.8 143.55 37.8 89.1 0 164.7-34.2 169.65-36.45a27.9 27.9 0 0 0 15.75-24.75V174.5a27.5625 27.5625 0 0 0-10.35-21.15z\" fill=\"#f54319\" p-id=\"1472\"></path></svg>`;\nexport class TimelineHeader {\n group: Group;\n _scene: Scenegraph;\n constructor(scene: Scenegraph) {\n this._scene = scene;\n this.initNodes();\n }\n initNodes() {\n const { _scene: scene } = this;\n const dateHeader = new Group({\n x: 0,\n y: 0,\n width: scene._gantt.getAllDateColsWidth(), //width - 2,\n height: scene._gantt.getAllHeaderRowsHeight(),\n clip: true,\n pickable: false\n // fill: 'purple',\n // stroke: 'green',\n // lineWidth: 2\n });\n this.group = dateHeader;\n dateHeader.name = 'date-header-container';\n scene.ganttGroup.addChild(this.group);\n let y = 0;\n for (let i = 0; i < scene._gantt.timeLineHeaderLevel; i++) {\n const { timelineDates, customLayout, visible } = scene._gantt.parsedOptions.sortedTimelineScales[i];\n if (visible === false) {\n continue;\n }\n const rowHeader = new Group({\n x: 0,\n y,\n width: scene._gantt.getAllDateColsWidth(),\n height: scene._gantt.parsedOptions.timeLineHeaderRowHeights[i],\n clip: false\n });\n y += rowHeader.attribute.height;\n rowHeader.name = 'row-header';\n dateHeader.addChild(rowHeader);\n\n for (let j = 0; j < timelineDates?.length; j++) {\n const { days, endDate, startDate, title, dateIndex, unit } = timelineDates[j];\n const x = Math.ceil(scene._gantt.getXByTime(startDate.getTime()));\n const right_x = Math.ceil(scene._gantt.getXByTime(endDate.getTime() + 1));\n const width = right_x - x;\n const date = new Group({\n x,\n y: 0,\n width,\n height: rowHeader.attribute.height,\n clip: false,\n fill: scene._gantt.parsedOptions.timelineHeaderBackgroundColor\n });\n date.name = 'date-header-cell';\n let rootContainer;\n let renderDefaultText = true;\n\n const height = rowHeader.attribute.height;\n if (customLayout) {\n let customLayoutObj;\n if (typeof customLayout === 'function') {\n const arg = {\n width,\n height,\n index: j,\n startDate,\n endDate,\n days,\n dateIndex,\n title,\n ganttInstance: this._scene._gantt\n };\n customLayoutObj = customLayout(arg);\n } else {\n customLayoutObj = customLayout;\n }\n if (customLayoutObj) {\n // if (customLayoutObj.rootContainer) {\n // customLayoutObj.rootContainer = decodeReactDom(customLayoutObj.rootContainer);\n // }\n rootContainer = customLayoutObj.rootContainer;\n renderDefaultText = customLayoutObj.renderDefaultText ?? false;\n rootContainer.name = 'task-bar-custom-render';\n }\n rootContainer && date.appendChild(rootContainer);\n }\n if (renderDefaultText) {\n const {\n padding,\n textAlign,\n textBaseline,\n textOverflow,\n fontSize,\n fontWeight,\n color,\n strokeColor,\n textStick\n } = scene._gantt.parsedOptions.timelineHeaderStyles[i];\n\n const position = getTextPos(toBoxArray(padding), textAlign, textBaseline, width, height);\n const text = new Text({\n x: position.x,\n y: position.y,\n maxLineWidth: width,\n heightLimit: height,\n // clip: true,\n pickable: true,\n text: title.toLocaleString(),\n fontSize: fontSize,\n fontWeight: fontWeight,\n fill: color,\n stroke: strokeColor,\n lineWidth: 2,\n textAlign,\n textBaseline,\n ellipsis:\n textOverflow === 'clip'\n ? ''\n : textOverflow === 'ellipsis'\n ? '...'\n : isValid(textOverflow)\n ? textOverflow\n : undefined\n });\n (text.attribute as any).textStick = textStick;\n date.appendChild(text);\n text.name = 'date-header-cell-text';\n }\n if (\n i === scene._gantt.timeLineHeaderLevel - 1 &&\n scene._gantt.parsedOptions.markLineCreateOptions &&\n scene._gantt.parsedOptions.markLineCreateOptions.markLineCreatable\n ) {\n const markLineStyle = scene._gantt.parsedOptions.markLineCreateOptions.markLineCreationStyle || {};\n const size = markLineStyle.size || 24;\n const iconSize = markLineStyle.iconSize || 18;\n const marklineCreateIcon = markLineStyle.svg || DEFAULT_MARKLINE_CREATION_ICON;\n // 是否开启里程碑功能\n const marklineCreateGroup = new Group({\n x: width / 2 - size / 2,\n y: height / 2 - size / 2,\n width: size,\n height: size,\n visible: true\n });\n marklineCreateGroup.name = 'markline-hover-group';\n (marklineCreateGroup as any).data = timelineDates[j];\n const marklineCreateInnerGroup = new Group({\n x: 0,\n y: 0,\n width: size,\n height: size,\n cornerRadius: size / 2,\n fill: markLineStyle.fill || '#ccc',\n cursor: 'pointer',\n display: 'flex',\n justifyContent: 'center',\n alignItems: 'center',\n visibleAll: false\n });\n marklineCreateInnerGroup.name = 'markline-hover-inner-group';\n marklineCreateGroup.add(marklineCreateInnerGroup);\n const icon = new Image({\n width: iconSize,\n height: iconSize,\n image: marklineCreateIcon,\n cursor: 'pointer',\n pickable: true\n });\n icon.name = 'markline-hover-icon';\n marklineCreateInnerGroup.appendChild(icon);\n date.add(marklineCreateGroup);\n }\n rowHeader.addChild(date);\n\n if (j > 0) {\n const line = createLine({\n pickable: false,\n stroke: scene._gantt.parsedOptions.timelineHeaderVerticalLineStyle?.lineColor,\n lineWidth: scene._gantt.parsedOptions.timelineHeaderVerticalLineStyle?.lineWidth,\n lineDash: scene._gantt.parsedOptions.timelineHeaderVerticalLineStyle?.lineDash,\n points: [\n { x: scene._gantt.parsedOptions.timelineHeaderVerticalLineStyle?.lineWidth & 1 ? 0.5 : 0, y: 0 },\n {\n x: scene._gantt.parsedOptions.timelineHeaderVerticalLineStyle?.lineWidth & 1 ? 0.5 : 0,\n y: rowHeader.attribute.height\n }\n ]\n });\n date.appendChild(line);\n }\n }\n //创建表头分割线 水平分割线 TODO\n if (i > 0) {\n const line = createLine({\n pickable: false,\n stroke: scene._gantt.parsedOptions.timelineHeaderHorizontalLineStyle?.lineColor,\n lineWidth: scene._gantt.parsedOptions.timelineHeaderHorizontalLineStyle?.lineWidth,\n lineDash: scene._gantt.parsedOptions.timelineHeaderHorizontalLineStyle?.lineDash,\n points: [\n { x: 0, y: scene._gantt.parsedOptions.timelineHeaderHorizontalLineStyle?.lineWidth & 1 ? 0.5 : 0 },\n {\n x: scene._gantt.getAllDateColsWidth(),\n y: scene._gantt.parsedOptions.timelineHeaderHorizontalLineStyle?.lineWidth & 1 ? 0.5 : 0\n }\n ]\n });\n rowHeader.addChild(line);\n }\n }\n }\n setX(x: number) {\n this.group.setAttribute('x', x);\n }\n setY(y: number) {\n this.group.setAttribute('y', y);\n }\n resize() {\n this.group.setAttribute('width', this.group.attribute?.width ?? 0);\n this.group.setAttribute('height', this.group.attribute?.height ?? 0);\n }\n\n refresh() {\n this.group?.parent.removeChild(this.group);\n this.initNodes();\n }\n showMarklineIcon(target: any) {\n let innerGroup;\n target.children.forEach((child: any) => {\n if (child.name === 'date-header-cell-text') {\n child.setAttribute('visible', false);\n }\n if (child.name === 'markline-hover-group') {\n innerGroup = child.firstChild;\n innerGroup.setAttribute('visibleAll', true);\n }\n });\n return innerGroup;\n }\n hideMarklineIconHover(target: any) {\n let innerGroup;\n target.children.forEach((child: any) => {\n if (child.name === 'date-header-cell-text') {\n child.setAttribute('visible', true);\n }\n if (child.name === 'markline-hover-group') {\n innerGroup = child.firstChild;\n innerGroup.setAttribute('visibleAll', false);\n }\n });\n return innerGroup;\n }\n}\n"]}
|
|
@@ -230,7 +230,7 @@ export class StateManager {
|
|
|
230
230
|
this.moveTaskBar.deltaY = 0, this.moveTaskBar.moveTaskBarXSpeed = 0;
|
|
231
231
|
}
|
|
232
232
|
dealTaskBarMove(e) {
|
|
233
|
-
var _a, _b, _c, _d, _e, _f;
|
|
233
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
234
234
|
const gantt = this._gantt;
|
|
235
235
|
let target = this.moveTaskBar.target;
|
|
236
236
|
target.setAttribute("zIndex", 1e4);
|
|
@@ -243,31 +243,35 @@ export class StateManager {
|
|
|
243
243
|
gantt.parsedOptions._minDateTime = null === (_b = gantt.parsedOptions.minDate) || void 0 === _b ? void 0 : _b.getTime(),
|
|
244
244
|
gantt._generateTimeLineDateMap(), gantt._updateSize(), gantt.scenegraph.refreshAll(),
|
|
245
245
|
target = this.moveTaskBar.target = gantt.scenegraph.taskBar.getTaskBarNodeByIndex(this.moveTaskBar.target.task_index, this.moveTaskBar.target.sub_task_index),
|
|
246
|
-
gantt.scrollLeft = gantt.
|
|
246
|
+
gantt.scrollLeft = Math.max(0, gantt.getDateColWidth(0) - 1), gantt.eventManager.lastDragPointerXYOnWindow.x = e.x,
|
|
247
247
|
"milestone" === (null === (_c = target.record) || void 0 === _c ? void 0 : _c.type) ? moveTaskBar(target, gantt.scrollLeft - target.attribute.x, 0, this) : target.setAttribute("x", gantt.scrollLeft);
|
|
248
|
-
} else
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
this.moveTaskBar.
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
248
|
+
} else {
|
|
249
|
+
const colCount = null !== (_e = null === (_d = gantt.parsedOptions.reverseSortedTimelineScales[0].timelineDates) || void 0 === _d ? void 0 : _d.length) && void 0 !== _e ? _e : 0, avgColWidth = gantt.getAllDateColsWidth() / Math.max(1, colCount);
|
|
250
|
+
this.moveTaskBar.moveTaskBarXSpeed = -avgColWidth / 100, this.moveTaskBar.moveTaskBarXInertia.startInertia(this.moveTaskBar.moveTaskBarXSpeed, 0, 1),
|
|
251
|
+
this.moveTaskBar.moveTaskBarXInertia.setScrollHandle(((dx, dy) => {
|
|
252
|
+
this.moveTaskBar.deltaX += dx, this.moveTaskBar.deltaY += dy, moveTaskBar(target, dx, dy, this),
|
|
253
|
+
gantt.stateManager.setScrollLeft(target.attribute.x), 0 === gantt.stateManager.scrollLeft && this.moveTaskBar.moveTaskBarXInertia.endInertia();
|
|
254
|
+
}));
|
|
255
|
+
} else if (target.attribute.x + target.attribute.width >= gantt.stateManager.scrollLeft + gantt.tableNoFrameWidth && dx > 0) if (gantt.parsedOptions.moveTaskBarToExtendDateRange && gantt.stateManager.scrollLeft + gantt.tableNoFrameWidth === gantt.getAllDateColsWidth()) {
|
|
256
|
+
null === (_f = this.moveTaskBar.moveTaskBarXInertia) || void 0 === _f || _f.endInertia();
|
|
255
257
|
const timelineDates = gantt.parsedOptions.reverseSortedTimelineScales[0].timelineDates, timeDiff = timelineDates[1].startDate.getTime() - timelineDates[0].startDate.getTime(), {unit: minTimeUnit, startOfWeek: startOfWeek, step: step} = gantt.parsedOptions.reverseSortedTimelineScales[0];
|
|
256
258
|
if (gantt.parsedOptions.maxDate = getEndDateByTimeUnit(gantt.parsedOptions.minDate, new Date(timelineDates[timelineDates.length - 1].endDate.getTime() + timeDiff / 2), minTimeUnit, step),
|
|
257
|
-
gantt.parsedOptions._maxDateTime = null === (
|
|
259
|
+
gantt.parsedOptions._maxDateTime = null === (_g = gantt.parsedOptions.maxDate) || void 0 === _g ? void 0 : _g.getTime(),
|
|
258
260
|
gantt._generateTimeLineDateMap(), gantt._updateSize(), gantt.scenegraph.refreshAll(),
|
|
259
261
|
target = this.moveTaskBar.target = gantt.scenegraph.taskBar.getTaskBarNodeByIndex(this.moveTaskBar.target.task_index, this.moveTaskBar.target.sub_task_index),
|
|
260
|
-
gantt.scrollLeft += 1, gantt.eventManager.lastDragPointerXYOnWindow.x = e.x, "milestone" === (null === (
|
|
262
|
+
gantt.scrollLeft += 1, gantt.eventManager.lastDragPointerXYOnWindow.x = e.x, "milestone" === (null === (_h = target.record) || void 0 === _h ? void 0 : _h.type)) {
|
|
261
263
|
const newX = gantt.scrollLeft + gantt.tableNoFrameWidth - target.attribute.width;
|
|
262
264
|
moveTaskBar(target, newX - target.attribute.x, 0, this);
|
|
263
265
|
} else target.setAttribute("x", gantt.scrollLeft + gantt.tableNoFrameWidth - target.attribute.width);
|
|
264
|
-
} else
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
this.moveTaskBar.
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
266
|
+
} else {
|
|
267
|
+
const colCount = null !== (_k = null === (_j = gantt.parsedOptions.reverseSortedTimelineScales[0].timelineDates) || void 0 === _j ? void 0 : _j.length) && void 0 !== _k ? _k : 0, avgColWidth = gantt.getAllDateColsWidth() / Math.max(1, colCount);
|
|
268
|
+
this.moveTaskBar.moveTaskBarXSpeed = avgColWidth / 100, this.moveTaskBar.moveTaskBarXInertia.startInertia(this.moveTaskBar.moveTaskBarXSpeed, 0, 1),
|
|
269
|
+
this.moveTaskBar.moveTaskBarXInertia.setScrollHandle(((dx, dy) => {
|
|
270
|
+
this.moveTaskBar.deltaX += dx, this.moveTaskBar.deltaY += dy, moveTaskBar(target, dx, dy, this),
|
|
271
|
+
gantt.stateManager.setScrollLeft(target.attribute.x + target.attribute.width - gantt.tableNoFrameWidth),
|
|
272
|
+
gantt.stateManager.scrollLeft === gantt.getAllDateColsWidth() - gantt.tableNoFrameWidth && this.moveTaskBar.moveTaskBarXInertia.endInertia();
|
|
273
|
+
}));
|
|
274
|
+
} else this.moveTaskBar.moveTaskBarXInertia.isInertiaScrolling() ? this.moveTaskBar.moveTaskBarXInertia.endInertia() : this.moveTaskBar.moveTaskBarXSpeed = 0;
|
|
271
275
|
gantt.scenegraph.updateNextFrame();
|
|
272
276
|
}
|
|
273
277
|
startResizeTaskBar(target, x, y, startOffsetY, onIconName) {
|