-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
a80ae88
commit 3709e36
Showing
13 changed files
with
490 additions
and
331 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
import { AbstractMutationNodeEvent } from './AbstractMutationNodeEvent'; | ||
import { ICustomEvent } from '@/app/shared/event'; | ||
|
||
export class AppendNodeEvent extends AbstractMutationNodeEvent implements ICustomEvent { | ||
type = 'append:node'; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
import { ICustomEvent } from '@/app/shared/event'; | ||
import { AbstractMutationNodeEvent } from './AbstractMutationNodeEvent'; | ||
|
||
export class CloneNodeEvent extends AbstractMutationNodeEvent implements ICustomEvent { | ||
type = 'clone:node'; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
import { ITreeNode, TreeNode } from '../../models'; | ||
import { IEngineContext } from '../../types'; | ||
import { ICustomEvent } from '@/app/shared/event'; | ||
|
||
export interface IFromNodeEventData { | ||
//事件发生的数据源 | ||
source: ITreeNode; | ||
//事件发生的目标对象 | ||
target: TreeNode; | ||
} | ||
|
||
export class FromNodeEvent implements ICustomEvent { | ||
type = 'from:node'; | ||
data: IFromNodeEventData; | ||
context: IEngineContext; | ||
constructor(data: IFromNodeEventData) { | ||
this.data = data; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
import { AbstractMutationNodeEvent } from './AbstractMutationNodeEvent'; | ||
import { ICustomEvent } from '@/app/shared/event'; | ||
|
||
export class InsertAfterEvent extends AbstractMutationNodeEvent implements ICustomEvent { | ||
type = 'insert:after'; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
import { ICustomEvent } from '@/app/shared/event'; | ||
import { AbstractMutationNodeEvent } from './AbstractMutationNodeEvent'; | ||
|
||
export class InsertBeforeEvent extends AbstractMutationNodeEvent implements ICustomEvent { | ||
type = 'insert:before'; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
import { ICustomEvent } from '@/app/shared/event'; | ||
import { AbstractMutationNodeEvent } from './AbstractMutationNodeEvent'; | ||
|
||
export class InsertChildrenEvent extends AbstractMutationNodeEvent implements ICustomEvent { | ||
type = 'insert:children'; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
import { ICustomEvent } from '@/app/shared/event'; | ||
import { AbstractMutationNodeEvent } from './AbstractMutationNodeEvent'; | ||
|
||
export class PrependNodeEvent extends AbstractMutationNodeEvent implements ICustomEvent { | ||
type = 'prepend:node'; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
import { ICustomEvent } from '@/app/shared/event'; | ||
import { AbstractMutationNodeEvent } from './AbstractMutationNodeEvent'; | ||
|
||
export class RemoveNodeEvent extends AbstractMutationNodeEvent implements ICustomEvent { | ||
type = 'remove:node'; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
import { ICustomEvent } from '@/app/shared/event'; | ||
import { AbstractMutationNodeEvent } from './AbstractMutationNodeEvent'; | ||
|
||
export class UpdateChildrenEvent extends AbstractMutationNodeEvent implements ICustomEvent { | ||
type = 'update:children'; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
import { AbstractMutationNodeEvent } from './AbstractMutationNodeEvent'; | ||
import { ICustomEvent } from '@/app/shared/event'; | ||
|
||
export class UpdateNodePropsEvent extends AbstractMutationNodeEvent implements ICustomEvent { | ||
type = 'update:node:props'; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
import { AbstractMutationNodeEvent } from './AbstractMutationNodeEvent'; | ||
import { ICustomEvent } from '@/app/shared/event'; | ||
|
||
export class WrapNodeEvent extends AbstractMutationNodeEvent implements ICustomEvent { | ||
type = 'wrap:node'; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,12 @@ | ||
export * from './DragNodeEvent'; | ||
export * from './UpdateNodePropsEvent'; | ||
export * from './PrependNodeEvent'; | ||
export * from './AppendNodeEvent'; | ||
export * from './WrapNodeEvent'; | ||
export * from './InsertAfterEvent'; | ||
export * from './InsertBeforeEvent'; | ||
export * from './InsertChildrenEvent'; | ||
export * from './UpdateChildrenEvent'; | ||
export * from './RemoveNodeEvent'; | ||
export * from './CloneNodeEvent'; | ||
export * from './FromNodeEvent'; |
Oops, something went wrong.