Merge pull request #2066 from gatof81/master
ie11 fix getBoundingClientRect() error
This commit is contained in:
commit
f80dea7915
1 changed files with 6 additions and 1 deletions
|
|
@ -128,7 +128,12 @@ var FontMetrics = exports.FontMetrics = function(parentEl, interval) {
|
|||
|
||||
this.$measureSizes = function() {
|
||||
if (CHAR_COUNT === 1) {
|
||||
var rect = this.$measureNode.getBoundingClientRect();
|
||||
var rect = null;
|
||||
try {
|
||||
rect = this.$measureNode.getBoundingClientRect();
|
||||
} catch(e) {
|
||||
rect = {width: 0, height:0 };
|
||||
};
|
||||
var size = {
|
||||
height: rect.height,
|
||||
width: rect.width
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue