|
|
|
@ -1,5 +1,5 @@
|
|
|
|
import { IElement, ImageDisplay, INavigateInfo } from '../..'
|
|
|
|
import { IElement, ImageDisplay, INavigateInfo } from '../..'
|
|
|
|
import { EditorMode, PageMode } from '../../dataset/enum/Editor'
|
|
|
|
import { EditorMode, PageMode, PaperDirection } from '../../dataset/enum/Editor'
|
|
|
|
import { RowFlex } from '../../dataset/enum/Row'
|
|
|
|
import { RowFlex } from '../../dataset/enum/Row'
|
|
|
|
import { IDrawImagePayload, IPainterOptions } from '../../interface/Draw'
|
|
|
|
import { IDrawImagePayload, IPainterOptions } from '../../interface/Draw'
|
|
|
|
import { IEditorResult } from '../../interface/Editor'
|
|
|
|
import { IEditorResult } from '../../interface/Editor'
|
|
|
|
@ -74,6 +74,7 @@ export class Command {
|
|
|
|
private static pageScaleMinus: CommandAdapt['pageScaleMinus']
|
|
|
|
private static pageScaleMinus: CommandAdapt['pageScaleMinus']
|
|
|
|
private static pageScaleAdd: CommandAdapt['pageScaleAdd']
|
|
|
|
private static pageScaleAdd: CommandAdapt['pageScaleAdd']
|
|
|
|
private static paperSize: CommandAdapt['paperSize']
|
|
|
|
private static paperSize: CommandAdapt['paperSize']
|
|
|
|
|
|
|
|
private static paperDirection: CommandAdapt['paperDirection']
|
|
|
|
private static getPaperMargin: CommandAdapt['getPaperMargin']
|
|
|
|
private static getPaperMargin: CommandAdapt['getPaperMargin']
|
|
|
|
private static setPaperMargin: CommandAdapt['setPaperMargin']
|
|
|
|
private static setPaperMargin: CommandAdapt['setPaperMargin']
|
|
|
|
private static insertElementList: CommandAdapt['insertElementList']
|
|
|
|
private static insertElementList: CommandAdapt['insertElementList']
|
|
|
|
@ -146,6 +147,7 @@ export class Command {
|
|
|
|
Command.pageScaleMinus = adapt.pageScaleMinus.bind(adapt)
|
|
|
|
Command.pageScaleMinus = adapt.pageScaleMinus.bind(adapt)
|
|
|
|
Command.pageScaleAdd = adapt.pageScaleAdd.bind(adapt)
|
|
|
|
Command.pageScaleAdd = adapt.pageScaleAdd.bind(adapt)
|
|
|
|
Command.paperSize = adapt.paperSize.bind(adapt)
|
|
|
|
Command.paperSize = adapt.paperSize.bind(adapt)
|
|
|
|
|
|
|
|
Command.paperDirection = adapt.paperDirection.bind(adapt)
|
|
|
|
Command.getPaperMargin = adapt.getPaperMargin.bind(adapt)
|
|
|
|
Command.getPaperMargin = adapt.getPaperMargin.bind(adapt)
|
|
|
|
Command.setPaperMargin = adapt.setPaperMargin.bind(adapt)
|
|
|
|
Command.setPaperMargin = adapt.setPaperMargin.bind(adapt)
|
|
|
|
Command.insertElementList = adapt.insertElementList.bind(adapt)
|
|
|
|
Command.insertElementList = adapt.insertElementList.bind(adapt)
|
|
|
|
@ -397,7 +399,7 @@ export class Command {
|
|
|
|
return Command.getRangeText()
|
|
|
|
return Command.getRangeText()
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// 页面模式、页面缩放、纸张大小、页边距
|
|
|
|
// 页面模式、页面缩放、纸张大小、纸张方向、页边距
|
|
|
|
public executePageMode(payload: PageMode) {
|
|
|
|
public executePageMode(payload: PageMode) {
|
|
|
|
return Command.pageMode(payload)
|
|
|
|
return Command.pageMode(payload)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
@ -418,6 +420,10 @@ export class Command {
|
|
|
|
return Command.paperSize(width, height)
|
|
|
|
return Command.paperSize(width, height)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
public executePaperDirection(payload: PaperDirection) {
|
|
|
|
|
|
|
|
return Command.paperDirection(payload)
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
public getPaperMargin() {
|
|
|
|
public getPaperMargin() {
|
|
|
|
return Command.getPaperMargin()
|
|
|
|
return Command.getPaperMargin()
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|