-
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.
Merge pull request #360 from RAIRLab/270-undo-redo-buttons
Undo and Redo Shortcuts!
- Loading branch information
Showing
30 changed files
with
642 additions
and
548 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
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
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,38 @@ | ||
/** | ||
* @file Contains the DrawModeNode class, which defines a step taken in Draw Mode. | ||
* Also contains the DrawModeMove enum. | ||
* | ||
* @author Ryan R | ||
*/ | ||
|
||
import {AEGTree} from "../AEG/AEGTree"; | ||
|
||
export enum DrawModeMove { | ||
CLEAR, | ||
DRAW_ATOM, | ||
DRAW_CUT, | ||
MOVE_SINGLE, | ||
MOVE_MULTI, | ||
COPY_SINGLE, | ||
COPY_MULTI, | ||
DELETE_SINGLE, | ||
DELETE_MULTI, | ||
RESIZE, | ||
COPY_GRAPH, | ||
} | ||
|
||
export class DrawModeNode { | ||
public tree: AEGTree; | ||
public appliedMove: DrawModeMove; | ||
|
||
/** | ||
* Sets tree to the incoming AEGTree and appliedMove to the incoming DrawModeMove. | ||
* | ||
* @param tree Incoming AEGTree. Defaults to a default AEGTree construction. | ||
* @param appliedMove Incoming DrawModeMove. Defaults to CLEAR. | ||
*/ | ||
public constructor(tree?: AEGTree, appliedMove?: DrawModeMove) { | ||
this.tree = new AEGTree(tree?.sheet) ?? new AEGTree(); | ||
this.appliedMove = appliedMove ?? DrawModeMove.CLEAR; | ||
} | ||
} |
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
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
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
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
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
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
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
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
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
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
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
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
Oops, something went wrong.