Skip to main content

Search and Top Navigation

#3092 closed bug (fixed)

Opened July 11, 2008 04:55AM UTC

Closed August 08, 2008 02:16AM UTC

Image cropper demo errors (patch included)

Reported by: andyfowler Owned by: eduardo
Priority: minor Milestone:
Component: [meta] ui.themeroller Version: 1.5.1
Keywords: resizable, imagecropper, cropper Cc:
Blocked by: Blocking:
Description

When using the code provided in the Image Cropper demo, under certain conditions, it can cause errors in the callback functions that are provided. This can happen if the cropper is placed out of bounds, or under other odd circumstances.

The problem is in the code that inverts the values and adjusts the background of the resizable. If a value is already negative, it causes a double negative, and is not parsed.

Fix: replace all instances of

this.style.backgroundPosition = '-' + (self.position.left) + 'px -' + (self.position.top) + 'px';

with

this.style.backgroundPosition = (self.position.left * -1) + 'px ' + (self.position.top * -1) + 'px';

Seems like a more logical way to invert a value, and won't result in a double negative.

Attachments (0)
Change History (3)

Changed August 08, 2008 01:26AM UTC by Cloudream comment:1

Without mention, this issue seems already has been fixed.

Changed August 08, 2008 01:33AM UTC by Cloudream comment:2

Sorry for last reply, it's for #3040.

This issus has fixed in [508].

Changed August 08, 2008 02:16AM UTC by Cloudream comment:3

component: ui.resizableui.meta (website, demos)
resolution: → fixed
status: newclosed