Opened 12 years ago
Closed 11 years ago
#22011 closed defect (bug) (fixed)
Janky behavior with imageEdit.scaleChanged() in inline image editor
Reported by: | DrewAPicture | Owned by: | nacin |
---|---|---|---|
Milestone: | 3.5 | Priority: | normal |
Severity: | normal | Version: | 3.4.2 |
Component: | Media | Keywords: | dev-feedback has-patch |
Focuses: | Cc: |
Description
As noted in ticket:21391:39, there's some janky behavior when tabbing between the width and height scaling values in the inline image editor. Tabbing between values appears to increment the values down 1 unit at a time. Short screencast to illustrate: http://screencast.com/t/tPiq9KlYVzzj
My best guess is something with the imageEdit
logic in image-edit.js. Javascript is not my forte.
I reproduced in FF15 on trunk and @ocean90 in Chrome on 3.4.2.
Attachments (1)
Change History (9)
#3
@
12 years ago
You know... I bet it's a problem with rounding. Looks like it's probably floor-ing, which will keep ticking numbers down if it doesn't divide evenly. Just tried it on a square image and it didn't do that, but can reproduce on others. Not sure about a punt - does feel kind of buggy.
#6
@
11 years ago
this.intval()
removes the fractional part, which leads to unwanted decrementing.
Math.round()
gives more accurate results and doesn't trigger unwanted incrementing in my testing.
The scaling ratio works, there's just some weirdness with moving between the values. I propose we look at this in the next cycle.