From: yasushiito Date: Thu, 25 Jul 2013 02:49:08 +0000 (+0900) Subject: t#31759:fix half helper X-Git-Url: http://git.osdn.net/view?p=pettanr%2Fpettanr.git;a=commitdiff_plain;h=2d53cd1c76cec60aa6a0312afbe5f53084a5ed9d t#31759:fix half helper --- diff --git a/app/assets/javascripts/panels.js.coffee b/app/assets/javascripts/panels.js.coffee index 472e4382..4009bd18 100644 --- a/app/assets/javascripts/panels.js.coffee +++ b/app/assets/javascripts/panels.js.coffee @@ -409,7 +409,7 @@ $ -> d = $(@).parent() trace = element_tag_id(d) f = $(trace + 'width') - w = f.val() / 2 + w = Math.floor(f.val() / 2) f.val(w) $(trace + 'img').width(Math.abs(w)) $(trace + 'img').parent().width(Math.abs(w)) @@ -440,7 +440,7 @@ $ -> d = $(@).parent() trace = element_tag_id(d) f = $(trace + 'height') - h = f.val() / 2 + h = Math.floor(f.val() / 2) f.val(h) $(trace + 'img').height(Math.abs(h)) $(trace + 'img').parent().height(Math.abs(h))