Skip to content

Commit a84f6df

Browse files
author
Nick Nissen
committedJul 8, 2015
fix(textAngular): Use CSS instead of html attributes to resize image.
Fix image size generated with popover buttons and resize handle. Because mixing popover size buttons and resize handle can create some funky image sizes because of width and height html attributes is mixed with CSS width and height.
1 parent 56e90a9 commit a84f6df

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed
 

‎src/main.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -269,8 +269,8 @@ textAngular.directive("textAngular", [
269269
pos.y = ratio > newRatio ? pos.x * ratio : pos.y;
270270
}
271271
var el = angular.element(_el);
272-
el.attr('height', Math.max(0, pos.y));
273-
el.attr('width', Math.max(0, pos.x));
272+
el.css('height', Math.round(Math.max(0, pos.y)));
273+
el.css('width', Math.round(Math.max(0, pos.x)));
274274

275275
// reflow the popover tooltip
276276
scope.reflowResizeOverlay(_el);

0 commit comments

Comments
 (0)