From d44309cd50a6899b083e6169c8fc16e156973dd7 Mon Sep 17 00:00:00 2001 From: Sanj Date: Tue, 6 Mar 2012 17:54:25 +0530 Subject: [PATCH] put call to top and left in callback to resize --- edgware/static/js/editor.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/edgware/static/js/editor.js b/edgware/static/js/editor.js index 323b1fb..2208663 100644 --- a/edgware/static/js/editor.js +++ b/edgware/static/js/editor.js @@ -833,8 +833,8 @@ ImageBox.prototype.addEventHandlers = function() { var left = parseInt($(this).position().left).toString(); var height = $(this).height().toString(); var width = $(this).width().toString(); - that.resize({'height': height, 'width': width}); - that.setCSS({'top': top, 'left': left}); + that.resize({'height': height, 'width': width, 'top': top, 'left': left}); + //that.setCSS({'top': top, 'left': left}); } }); } @@ -886,6 +886,7 @@ ImageBox.prototype.resize = function(dimensions) { if (response.status == 1) { var path = $.trim(response.path); that.jq.find('.edgeImage').attr("src", path); + that.setCSS({'top': top, 'left': left}); // REVISION_NO = response.rev_id; return true; } else {