@talrace/ngx-noder 19.0.48 → 19.0.49
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.
|
@@ -5529,7 +5529,7 @@ class TargetOperationsHelper {
|
|
|
5529
5529
|
static getContents(document, targets) {
|
|
5530
5530
|
let result = document;
|
|
5531
5531
|
for (const target of targets) {
|
|
5532
|
-
result = this.getTargetContents(
|
|
5532
|
+
result = this.getTargetContents(result, target, document);
|
|
5533
5533
|
}
|
|
5534
5534
|
return result;
|
|
5535
5535
|
}
|
|
@@ -6876,17 +6876,11 @@ class DisplayTokenHelper {
|
|
|
6876
6876
|
});
|
|
6877
6877
|
}
|
|
6878
6878
|
static getSymbolToken(symbol, fontString, index) {
|
|
6879
|
-
|
|
6879
|
+
return new DisplayToken({
|
|
6880
6880
|
...FontMetrics.measureCharSize(symbol, fontString),
|
|
6881
6881
|
displayValue: this.getSymbolDisplayValue(symbol),
|
|
6882
6882
|
index
|
|
6883
6883
|
});
|
|
6884
|
-
if (result.isSpace) {
|
|
6885
|
-
result.ascent = 0;
|
|
6886
|
-
result.descent = 0;
|
|
6887
|
-
result.height = 0;
|
|
6888
|
-
}
|
|
6889
|
-
return result;
|
|
6890
6884
|
}
|
|
6891
6885
|
static getComponentTokens(component, fontString, index) {
|
|
6892
6886
|
if (component.instance instanceof ExternalComponent && component.instance.isText) {
|
|
@@ -7083,6 +7077,7 @@ class LineInfoHelper {
|
|
|
7083
7077
|
let maxAscent = 0;
|
|
7084
7078
|
let maxDescent = 0;
|
|
7085
7079
|
let i = 0;
|
|
7080
|
+
const length = tokens[tokens.length - 1].isParagraph && tokens.length > 1 ? tokens.length - 1 : tokens.length;
|
|
7086
7081
|
do {
|
|
7087
7082
|
if (maxAscent < tokens[i].ascent) {
|
|
7088
7083
|
maxAscent = tokens[i].ascent;
|
|
@@ -7092,10 +7087,7 @@ class LineInfoHelper {
|
|
|
7092
7087
|
}
|
|
7093
7088
|
line.width += tokens[i].width;
|
|
7094
7089
|
i++;
|
|
7095
|
-
} while (i <
|
|
7096
|
-
if (tokens.length > 1 && tokens[tokens.length - 1].isParagraph) {
|
|
7097
|
-
line.width -= tokens[tokens.length - 1].width;
|
|
7098
|
-
}
|
|
7090
|
+
} while (i < length);
|
|
7099
7091
|
line.height = maxAscent + maxDescent;
|
|
7100
7092
|
line.ascent = maxAscent;
|
|
7101
7093
|
if (line.height === 0) {
|
|
@@ -13351,7 +13343,7 @@ class RenderingHelper {
|
|
|
13351
13343
|
this.renderText(fragment, textStyle, textBeforeElement, wordSpacing);
|
|
13352
13344
|
renderedIndexes += textBeforeElement.length;
|
|
13353
13345
|
if (component.instance instanceof ExternalComponent && component.instance.isText) {
|
|
13354
|
-
const rendered = this.renderExternalText(fragment, textStyle, wordSpacing, component.instance, line, renderedTokensInLine, paragraphStartIndex);
|
|
13346
|
+
const rendered = this.renderExternalText(fragment, textStyle, wordSpacing, component.instance, line, renderedTokensInLine + renderedIndexes + additionalTokens, paragraphStartIndex);
|
|
13355
13347
|
renderedIndexes += rendered.renderedIndexes;
|
|
13356
13348
|
additionalTokens += rendered.additionalTokens;
|
|
13357
13349
|
}
|