Skip to content

Commit

Permalink
Fix getting first textPr for custT
Browse files Browse the repository at this point in the history
  • Loading branch information
Coolcooo committed Sep 17, 2024
1 parent 180cfe6 commit 17e8c46
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions common/Drawings/Format/Shape.js
Original file line number Diff line number Diff line change
Expand Up @@ -4305,7 +4305,7 @@
if (content) {
const item = content.Content[paragraphIndex];
if (item) {
return item.Get_FirstTextPr().FontSize;
return item.Get_FirstTextPr2().FontSize;
}
}
}
Expand Down Expand Up @@ -4343,7 +4343,7 @@
const deltaDepth = startDepth !== undefined ? node.depth - startDepth + 1 : 0;
for (let j = 0; j < pointContent.Content.length; j += 1) {
const oItem = oContent.Content[paragraphIndex];
const fontSize = oItem.Get_FirstTextPr().FontSize;
const fontSize = oItem.Get_FirstTextPr2().FontSize;
if (startDepth !== undefined) {
const indent = getSmartArtParagraphIndent(fontSize);
oItem.Set_Spacing({After: fontSize * bulletSpacingScale}, false);
Expand Down
6 changes: 3 additions & 3 deletions common/SmartArts/SmartArtTree.js
Original file line number Diff line number Diff line change
Expand Up @@ -6211,6 +6211,9 @@ function HierarchyAlgorithm() {
this.applyTextMargins(editorShape);
this.applyHorizontalAlignment(editorShape);
this.applyVerticalAlignment(editorShape);
if (!editorShape.isCanFitFontSize()) {
editorShape.applyCustTSettings();
}
}
};
TextAlgorithm.prototype.getTextRotate = function () {
Expand Down Expand Up @@ -6347,9 +6350,6 @@ function HierarchyAlgorithm() {
}

editorShape.setPaddings(paddings, {bNotCopyToPoints: true});
if (!editorShape.isCanFitFontSize()) {
editorShape.applyCustTSettings();
}
};
function isParentWithChildren(nodes) {
if (nodes.length) {
Expand Down

0 comments on commit 17e8c46

Please sign in to comment.