import { BoardManager } from './boardManager' ; import { Operation } from "./Operation" ; import { AnimationToolBar } from "./AnimationToolBar" ; /**
 * add a specific action (draw a line, erase, etc.) at time t
 */ export class OperationMoveAction extends Operation { constructor ( private actionIndex , private insertIndex ) { super ( ) ; } undo ( ) { BoardManager . timeline . moveAction ( this . insertIndex , this . actionIndex ) ; AnimationToolBar . update ( ) ; } redo ( ) { if ( this . actionIndex < this . insertIndex ) BoardManager . timeline . moveAction ( this . actionIndex , this . insertIndex -- ) ; else BoardManager . timeline . moveAction ( this . actionIndex , this . insertIndex ) ; AnimationToolBar . update ( ) ; } }