Skip to content

Commit

Permalink
fix(textAngular): Fix image resize broken for chrome
Browse files Browse the repository at this point in the history
Add 'px' to image element when resizing
  • Loading branch information
nickknissen committed Jul 28, 2015
1 parent 0bb9765 commit 86072d4
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -276,8 +276,8 @@ textAngular.directive("textAngular", [
pos.y = ratio > newRatio ? pos.x * ratio : pos.y;
}
var el = angular.element(_el);
el.css('height', Math.round(Math.max(0, pos.y)));
el.css('width', Math.round(Math.max(0, pos.x)));
el.css('height', Math.round(Math.max(0, pos.y) + 'px'));
el.css('width', Math.round(Math.max(0, pos.x) + 'px'));

// reflow the popover tooltip
scope.reflowResizeOverlay(_el);
Expand Down Expand Up @@ -914,7 +914,7 @@ textAngular.service('textAngularManager', ['taToolExecuteAction', 'taTools', 'ta
}
event.preventDefault();
return false;
}
}
});
}
};
Expand Down

0 comments on commit 86072d4

Please sign in to comment.