package dev.bytevibe.hyperpoint;

/**
 * 添加对象命令
 */
public class AddObjectCommand implements Command {
    private PageContent pageContent;
    private DrawableObject object;

    public AddObjectCommand(PageContent pageContent, DrawableObject object) {
        this.pageContent = pageContent;
        this.object = object;
    }

    @Override
    public void execute() {
        pageContent.addObject(object);
    }

    @Override
    public void undo() {
        pageContent.removeObject(object);
    }
}

