Skip to content

Commit

Permalink
feature/valAxResizing (#95)
Browse files Browse the repository at this point in the history
In this branch all related to recalculation of horizontal axes logic is moved to CLabelsParameters.
RecalculateLabels now new function that is responsible for recalculation of new labels, grid and labels positions

Co-authored-by: GoshaZotov <[email protected]>
Reviewed-on: https://git.onlyoffice.com/ONLYOFFICE/sdkjs/pulls/95
Co-authored-by: ansaraidarbek <[email protected]>
Co-committed-by: ansaraidarbek <[email protected]>
  • Loading branch information
ansaraidarbek and GoshaZotov committed Jan 13, 2025
1 parent e9d0c57 commit 233792d
Show file tree
Hide file tree
Showing 2 changed files with 299 additions and 62 deletions.
16 changes: 16 additions & 0 deletions common/Drawings/Format/ChartFormat.js
Original file line number Diff line number Diff line change
Expand Up @@ -2438,6 +2438,22 @@
CDLbl.prototype.notAllowedWithoutId = function() {
return false;
};

// function to get label content width without accessing inner fields of CDLbl
CDLbl.prototype.getContentWidth = function() {
if (!this.tx || !this.tx.rich || !this.getContentWidth) {
return 0;
}
return this.tx.rich.getContentWidth();
};

// function to get label max content width without accessing inner fields of CDLbl
CDLbl.prototype.getMaxContentWidth = function(maxWidth, bLeft) {
if (!this.tx || !this.tx.rich || !this.getMaxContentWidth) {
return 0;
}
return this.tx.rich.getMaxContentWidth(maxWidth, bLeft);
};
CDLbl.prototype.Check_AutoFit = function() {
return true;
};
Expand Down
Loading

0 comments on commit 233792d

Please sign in to comment.