feat:add get editor image interface

This commit is contained in:
黄云飞
2022-03-23 16:12:18 +08:00
parent c49b7b5978
commit 564d10a8d2
2 changed files with 10 additions and 0 deletions
+6
View File
@@ -54,6 +54,7 @@ export class Command {
private static search: Function
private static replace: Function
private static print: Function
private static getImage: Function
private static pageScaleRecovery: Function
private static pageScaleMinus: Function
private static pageScaleAdd: Function
@@ -106,6 +107,7 @@ export class Command {
Command.search = adapt.search.bind(adapt)
Command.replace = adapt.replace.bind(adapt)
Command.print = adapt.print.bind(adapt)
Command.getImage = adapt.getImage.bind(adapt)
Command.pageScaleRecovery = adapt.pageScaleRecovery.bind(adapt)
Command.pageScaleMinus = adapt.pageScaleMinus.bind(adapt)
Command.pageScaleAdd = adapt.pageScaleAdd.bind(adapt)
@@ -300,6 +302,10 @@ export class Command {
return Command.print()
}
public getImage(): string[] {
return Command.getImage()
}
// 页面缩放
public executePageScaleRecovery() {
return Command.pageScaleRecovery()
+4
View File
@@ -1202,6 +1202,10 @@ export class CommandAdapt {
}
}
public getImage(): string[] {
return this.draw.getDataURL()
}
public pageScaleRecovery() {
const { scale } = this.options
if (scale !== 1) {