diff options
author | Chi Cheng <cloudream@gmail.com> | 2008-08-07 18:39:16 +0000 |
---|---|---|
committer | Chi Cheng <cloudream@gmail.com> | 2008-08-07 18:39:16 +0000 |
commit | 820013815270912508d88cafac1e47e7eeb3fdfd (patch) | |
tree | a704ef05f3613a9ac4432995a9e826c4bb6527c2 /demos | |
parent | 00f817251a1a7c7b61f2bae1d0b3b76501481aa8 (diff) | |
download | jquery-ui-820013815270912508d88cafac1e47e7eeb3fdfd.tar.gz jquery-ui-820013815270912508d88cafac1e47e7eeb3fdfd.zip |
Image cropper demo: fixs #3092
Diffstat (limited to 'demos')
-rw-r--r-- | demos/real-world/image-cropper/index.html | 22 |
1 files changed, 9 insertions, 13 deletions
diff --git a/demos/real-world/image-cropper/index.html b/demos/real-world/image-cropper/index.html index 3fff4f5ea..f532f887f 100644 --- a/demos/real-world/image-cropper/index.html +++ b/demos/real-world/image-cropper/index.html @@ -128,21 +128,19 @@ resize: function(e, ui) { var self = $(this).data("resizable"); - this.style.backgroundPosition = '-' + (self.position.left) + 'px -' + (self.position.top) + 'px'; + this.style.backgroundPosition = '-' + (self.position.left) + 'px -' + (self.position.top) + 'px'; - $("#log-top").html(self.position.top+"px"); + $("#log-top").html(self.position.top+"px"); + $("#log-left").html(self.position.left+"px"); - $("#log-left").html(self.position.left+"px"); - - $("#log-height").html(self.size.height+"px"); - - $("#log-width").html(self.size.width+"px"); + $("#log-height").html(self.size.height+"px"); + $("#log-width").html(self.size.width+"px"); }, stop: function(e, ui) { var self = $(this).data("resizable"); - this.style.backgroundPosition = '-' + (self.position.left) + 'px -' + (self.position.top) + 'px'; + this.style.backgroundPosition = (self.position.left * -1) + 'px ' + (self.position.top * -1) + 'px'; } }) @@ -154,12 +152,10 @@ drag: function(e, ui) { var self = $(this).data("draggable"); - this.style.backgroundPosition = '-' + (self.position.left) + 'px -' + (self.position.top) + 'px'; - - $("#log-top").html(self.position.top+"px"); - - $("#log-left").html(self.position.left+"px"); + this.style.backgroundPosition = (self.position.left * -1) + 'px ' + (self.position.top * -1) + 'px'; + $("#log-top").html(self.position.top+"px"); + $("#log-left").html(self.position.left+"px"); } }); |