Skip to content

Commit

Permalink
fix: specify type Text.measureSize
Browse files Browse the repository at this point in the history
  • Loading branch information
kyechan99 committed Jul 18, 2024
1 parent 7b99aa9 commit ffc58d2
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/shapes/Text.ts
Original file line number Diff line number Diff line change
Expand Up @@ -392,13 +392,13 @@ export class Text extends Shape<TextConfig> {
* That method can't handle multiline text.
* @method
* @name Konva.Text#measureSize
* @param {String} [text] text to measure
* @returns {Object} { width , height} of measured text
* @param {String} text text to measure
* @returns {Object} { width , height } of measured text
*/
measureSize(text) {
measureSize(text: string) {
var _context = getDummyContext(),
fontSize = this.fontSize(),
metrics;
metrics: TextMetrics;

_context.save();
_context.font = this._getContextFont();
Expand Down

0 comments on commit ffc58d2

Please sign in to comment.