feat: add set active zone api

This commit is contained in:
Hufe921
2023-11-29 20:07:05 +08:00
parent 1455a2afb2
commit 6b30e3ca9d
4 changed files with 27 additions and 0 deletions
+2
View File
@@ -85,6 +85,7 @@ export class Command {
public executeSetGroup: CommandAdapt['setGroup']
public executeDeleteGroup: CommandAdapt['deleteGroup']
public executeLocationGroup: CommandAdapt['locationGroup']
public executeSetZone: CommandAdapt['setZone']
public executeSetControlValue: CommandAdapt['setControlValue']
public executeSetControlExtension: CommandAdapt['setControlExtension']
public getCatalog: CommandAdapt['getCatalog']
@@ -198,6 +199,7 @@ export class Command {
this.executeSetGroup = adapt.setGroup.bind(adapt)
this.executeDeleteGroup = adapt.deleteGroup.bind(adapt)
this.executeLocationGroup = adapt.locationGroup.bind(adapt)
this.executeSetZone = adapt.setZone.bind(adapt)
// 获取
this.getImage = adapt.getImage.bind(adapt)
this.getOptions = adapt.getOptions.bind(adapt)
+5
View File
@@ -6,6 +6,7 @@ import { ControlComponent, ImageDisplay } from '../../dataset/enum/Control'
import {
EditorContext,
EditorMode,
EditorZone,
PageMode,
PaperDirection
} from '../../dataset/enum/Editor'
@@ -2174,6 +2175,10 @@ export class CommandAdapt {
})
}
public setZone(zone: EditorZone) {
this.draw.getZone().setZone(zone)
}
public getControlValue(
payload: IGetControlValueOption
): IGetControlValueResult | null {