graphic-pixi/lib/operation/JlOperation.d.ts

43 lines
873 B
TypeScript
Raw Permalink Normal View History

2023-12-12 17:31:07 +08:00
import { IGraphicApp } from '../app/JlGraphicApp';
import { JlGraphic } from '../core/JlGraphic';
/**
*
*/
export declare abstract class JlOperation {
type: string;
app: IGraphicApp;
obj?: any;
data?: any;
description?: string;
constructor(app: IGraphicApp, type: string);
undo1(): void;
redo1(): void;
abstract undo(): JlGraphic[] | void;
abstract redo(): JlGraphic[] | void;
}
/**
*
*/
export declare class OperationRecord {
undoStack: JlOperation[];
redoStack: JlOperation[];
private maxLen;
constructor(maxLen?: number);
get hasUndo(): boolean;
get hasRedo(): boolean;
setMaxLen(v: number): void;
/**
*
* @param op
*/
record(op: JlOperation): void;
/**
*
*/
undo(): void;
/**
*
*/
redo(): void;
}