|
@@ -32,11 +32,11 @@ export class ContentContainer {
|
|
|
})
|
|
|
this.editPagePtr = editPagePtr
|
|
|
|
|
|
- await this.messageHandler.sendWithPromise('SetFontCallBackForEditPage', {
|
|
|
- editPagePtr: this.editPagePtr,
|
|
|
- fontFile: this.pageViewer.fontFile,
|
|
|
- fontName: 'DroidSansFallbackFull'
|
|
|
- })
|
|
|
+ // await this.messageHandler.sendWithPromise('SetFontCallBackForEditPage', {
|
|
|
+ // editPagePtr: this.editPagePtr,
|
|
|
+ // fontFile: this.pageViewer.fontFile,
|
|
|
+ // fontName: 'DroidSansFallbackFull'
|
|
|
+ // })
|
|
|
}
|
|
|
|
|
|
async render () {
|
|
@@ -129,15 +129,7 @@ export class ContentContainer {
|
|
|
|
|
|
hide () {
|
|
|
this.contentContainer.style.display = 'none'
|
|
|
-
|
|
|
- if (this.textManager) {
|
|
|
- this.textManager.tool = ''
|
|
|
- this.textManager.reset()
|
|
|
- }
|
|
|
- if (this.imageManager) {
|
|
|
- this.imageManager.tool = ''
|
|
|
- this.imageManager.reset()
|
|
|
- }
|
|
|
+ this.resetTools()
|
|
|
}
|
|
|
|
|
|
cancel () {
|
|
@@ -151,14 +143,7 @@ export class ContentContainer {
|
|
|
this.contentContainer?.remove()
|
|
|
this.contentContainer = null
|
|
|
|
|
|
- if (this.textManager) {
|
|
|
- this.textManager.tool = ''
|
|
|
- this.textManager.reset()
|
|
|
- }
|
|
|
- if (this.imageManager) {
|
|
|
- this.imageManager.tool = ''
|
|
|
- this.imageManager.reset()
|
|
|
- }
|
|
|
+ this.resetTools()
|
|
|
|
|
|
this.destroyed = true
|
|
|
|
|
@@ -305,4 +290,15 @@ export class ContentContainer {
|
|
|
removeEditor (index) {
|
|
|
this.frameEditorList.splice(index, 1)
|
|
|
}
|
|
|
+
|
|
|
+ resetTools () {
|
|
|
+ if (this.textManager) {
|
|
|
+ this.textManager.tool = ''
|
|
|
+ this.textManager.reset()
|
|
|
+ }
|
|
|
+ if (this.imageManager) {
|
|
|
+ this.imageManager.tool = ''
|
|
|
+ this.imageManager.reset()
|
|
|
+ }
|
|
|
+ }
|
|
|
}
|