|
@@ -313,6 +313,11 @@ export class ContentContainer {
|
|
|
this._selectedFrameIndex = index
|
|
|
}
|
|
|
|
|
|
+ removeEditor (index) {
|
|
|
+ this.frameEditorList.splice(index, 1)
|
|
|
+ this.frameEditorList.forEach((editor, i) => editor.editAreaIndex = i)
|
|
|
+ }
|
|
|
+
|
|
|
handleKeyDown (e) {
|
|
|
const selectedEditor = this.frameEditorList[this._selectedFrameIndex]
|
|
|
if (!selectedEditor || selectedEditor.state !== 1) return
|
|
@@ -369,7 +374,7 @@ export class ContentContainer {
|
|
|
const editor = this.frameEditorList.find(item => item.editAreaPtr === editAreaPtr)
|
|
|
if (editor) {
|
|
|
editor.updateCanvasAfterUndoRedo()
|
|
|
- editor.type === 'text' && editCharPlace && editor.updateCursorLine(editCharPlace)
|
|
|
+ editor.type === 'text' && (editCharPlace.CharIndex !== -1 || editCharPlace.LineIndex !== -1 || editCharPlace.RunIndex !== -1 || editCharPlace.SectionIndex !== -1 ) && editor.updateCursorLine(editCharPlace)
|
|
|
return
|
|
|
}
|
|
|
|