@talrace/ngx-noder 19.0.59 → 19.0.60
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -8185,8 +8185,8 @@ class DisplayData extends EventEmitting {
|
|
|
8185
8185
|
paragraphSettings.calculateDistanceFromTop(pageHeight, this.pagesSpace, pageVerticalData.marginTop, prevFormatsData);
|
|
8186
8186
|
}
|
|
8187
8187
|
this.pagesFormat.forEach((x, i) => {
|
|
8188
|
-
const
|
|
8189
|
-
x.updateData(
|
|
8188
|
+
const paragraphs = this.getPageFormatParagraphs(i);
|
|
8189
|
+
x.updateData(this.getPhysicalHeight(paragraphs));
|
|
8190
8190
|
});
|
|
8191
8191
|
this.allPagesHeight = 0;
|
|
8192
8192
|
this.pagesFormat.forEach((x, i) => {
|
|
@@ -8207,7 +8207,7 @@ class DisplayData extends EventEmitting {
|
|
|
8207
8207
|
});
|
|
8208
8208
|
}
|
|
8209
8209
|
getAllParagraphsHeight() {
|
|
8210
|
-
return this.
|
|
8210
|
+
return this.getPhysicalHeight(this.paragraphs);
|
|
8211
8211
|
}
|
|
8212
8212
|
destroy() {
|
|
8213
8213
|
this.removeAllListeners('pagesCountChanged');
|
|
@@ -8646,6 +8646,15 @@ class DisplayData extends EventEmitting {
|
|
|
8646
8646
|
paragraph.paragraphSettings.startInsertIndex = paragraph.startIndex;
|
|
8647
8647
|
}
|
|
8648
8648
|
}
|
|
8649
|
+
getPhysicalHeight(paragraphs) {
|
|
8650
|
+
const bounds = paragraphs
|
|
8651
|
+
.flatMap(x => x.paragraphSettings?.textLinesInfo || [])
|
|
8652
|
+
.reduce((acc, line) => ({
|
|
8653
|
+
cursorY: acc.cursorY + line.offsetBefore + line.height + line.offsetAfter + (line.endPageOffset || 0),
|
|
8654
|
+
maxBottom: Math.max(acc.maxBottom, acc.cursorY + line.offsetBefore + line.height)
|
|
8655
|
+
}), { cursorY: 0, maxBottom: 0 });
|
|
8656
|
+
return Math.max(bounds.cursorY, bounds.maxBottom);
|
|
8657
|
+
}
|
|
8649
8658
|
}
|
|
8650
8659
|
|
|
8651
8660
|
class NoderEdgeComponent extends DestroyComponent {
|
|
@@ -16910,7 +16919,7 @@ class Editor {
|
|
|
16910
16919
|
const beforeTable = ContentHelper.documentIndexToParagraphIndex(this.session.displayData.paragraphs, insertIndex);
|
|
16911
16920
|
this.selection.placeCursor(beforeTable);
|
|
16912
16921
|
this.history.pushRemoveTableRows(insertIndex, startIndex, endIndex);
|
|
16913
|
-
this.commandsService.createCommand(SaveCommandsHelper.getRemoveTableRowsCommand(startIndex, endIndex,
|
|
16922
|
+
this.commandsService.createCommand(SaveCommandsHelper.getRemoveTableRowsCommand(insertIndex, startIndex, endIndex, this.targets));
|
|
16914
16923
|
this.session.removeTableRows(insertIndex, startIndex, endIndex);
|
|
16915
16924
|
this.changedTableSize(insertIndex, sessionId);
|
|
16916
16925
|
this.onContentChange();
|
|
@@ -16920,7 +16929,7 @@ class Editor {
|
|
|
16920
16929
|
const beforeTable = ContentHelper.documentIndexToParagraphIndex(this.session.displayData.paragraphs, insertIndex);
|
|
16921
16930
|
this.selection.placeCursor(beforeTable);
|
|
16922
16931
|
this.history.pushRemoveTableColumns(insertIndex, startIndex, endIndex);
|
|
16923
|
-
this.commandsService.createCommand(SaveCommandsHelper.getRemoveTableColumnsCommand(startIndex, endIndex,
|
|
16932
|
+
this.commandsService.createCommand(SaveCommandsHelper.getRemoveTableColumnsCommand(insertIndex, startIndex, endIndex, this.targets));
|
|
16924
16933
|
this.session.removeTableColumns(insertIndex, startIndex, endIndex);
|
|
16925
16934
|
this.changedTableSize(insertIndex, sessionId);
|
|
16926
16935
|
this.onContentChange();
|