From d59669dab8a1a2f953546a88d80b8e78a43e4150 Mon Sep 17 00:00:00 2001 From: Pierre Merlin Date: Wed, 26 Jun 2019 12:48:30 +0200 Subject: [PATCH 1/2] Rm reserved keyword char Should fix #5778 --- src/shapes/text.class.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/shapes/text.class.js b/src/shapes/text.class.js index 016215ce30d..0b512ee98c4 100644 --- a/src/shapes/text.class.js +++ b/src/shapes/text.class.js @@ -683,8 +683,8 @@ * @param {Number} char the character number * @return {Number} fontSize of the character */ - getHeightOfChar: function(line, char) { - return this.getValueOfPropertyAt(line, char, 'fontSize'); + getHeightOfChar: function(line, _char) { + return this.getValueOfPropertyAt(line, _char, 'fontSize'); }, /** From b5781ced712425db86c1e44ec95db78a0bda3212 Mon Sep 17 00:00:00 2001 From: Andrea Bogazzi Date: Sat, 29 Jun 2019 12:23:53 +0200 Subject: [PATCH 2/2] Update text.class.js --- src/shapes/text.class.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/shapes/text.class.js b/src/shapes/text.class.js index 0b512ee98c4..233fd15538d 100644 --- a/src/shapes/text.class.js +++ b/src/shapes/text.class.js @@ -633,7 +633,7 @@ * possibly overridden to accommodate different measure logic or * to hook some external lib for character measurement * @private - * @param {String} char to be measured + * @param {String} _char, char to be measured * @param {Object} charStyle style of char to be measured * @param {String} [previousChar] previous char * @param {Object} [prevCharStyle] style of previous char @@ -679,8 +679,8 @@ /** * Computes height of character at given position - * @param {Number} line the line number - * @param {Number} char the character number + * @param {Number} line the line index number + * @param {Number} _char the character index number * @return {Number} fontSize of the character */ getHeightOfChar: function(line, _char) {