Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(gantt): support gantt table body dragStarted dragEnded function(#INFR-7138) #350

Merged
merged 6 commits into from
Apr 3, 2023

Conversation

xinglu01
Copy link
Contributor

@xinglu01 xinglu01 commented Apr 3, 2023

No description provided.

@@ -12,6 +12,10 @@ export class NgxGanttTableComponent {

@Output() dragDropped = new EventEmitter<GanttTableDragDroppedEvent>();

@Output() dragStarted = new EventEmitter<GanttItemInternal>();
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Event 不能直接用 GanttItemInternal,未来没法扩展了,需要跟其他的 Event 一样 定义一个 GanttTableDragStartedEvent 和 GanttTableDragEndedEvent

interface GanttTableDragStartedEvent {
    source: GanttItem; 
    sourceParent: GanttItem;
}

sourceParent: GanttItem<T>;
}

export class GanttTableDragEndedEvent<T = unknown> {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

GanttTableDragEndedEvent 的属性应该跟 Started 一样 只有 source 和 parent, 只有 Dropped 的时候才会有 target,比如刚拖起来就放下,这种都不会触发Dropped的,但是会触发 Ended

@xinglu01 xinglu01 merged commit 2fece74 into v15.1.0-next Apr 3, 2023
@xinglu01 xinglu01 deleted the xl/INFR-7138 branch April 3, 2023 06:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants