Skip to content

Commit

Permalink
fix(textAngular.resize-overlay): Catch when height or width is NaN
Browse files Browse the repository at this point in the history
Fixes #470
  • Loading branch information
SimeonC authored and SimeonC committed Jan 4, 2015
1 parent e87085e commit efcb411
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -239,8 +239,8 @@ textAngular.directive("textAngular", [
x: event.clientX,
y: event.clientY
};
if(startPosition.width === undefined) startPosition.width = _el[0].offsetWidth;
if(startPosition.height === undefined) startPosition.height = _el[0].offsetHeight;
if(startPosition.width === undefined || isNaN(startPosition.width)) startPosition.width = _el[0].offsetWidth;
if(startPosition.height === undefined || isNaN(startPosition.height)) startPosition.height = _el[0].offsetHeight;
scope.hidePopover();
var ratio = startPosition.height / startPosition.width;
var mousemove = function(event){
Expand Down

0 comments on commit efcb411

Please sign in to comment.