feat:add get editor image interface
This commit is contained in:
@@ -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()
|
||||
|
||||
@@ -1202,6 +1202,10 @@ export class CommandAdapt {
|
||||
}
|
||||
}
|
||||
|
||||
public getImage(): string[] {
|
||||
return this.draw.getDataURL()
|
||||
}
|
||||
|
||||
public pageScaleRecovery() {
|
||||
const { scale } = this.options
|
||||
if (scale !== 1) {
|
||||
|
||||
Reference in New Issue
Block a user