U4-4479 - Cropper preview in backoffice is a bit off from the actual crop

Created by Sebastiaan Janssen 19 Mar 2014, 16:01:00 Updated by Per Ploug 02 Apr 2014, 22:46:11

Relates to: U4-4514

Relates to: U4-4376

I'm also having a bit of trouble where the preview doesn't update correctly when moving the blue dot, but it's okay in FF so I'll attribute that to my Chrome Dev channel.

11 Attachments

Download cropper.mp4

Comments

Per Ploug 19 Mar 2014, 17:25:51

Could you check with the very latest builds? I did some minor adjustments on this, and it seems to work with my test images, first shot from backoffice, second from how it renders on website


Sebastiaan Janssen 19 Mar 2014, 17:32:49

Sure thing, did you push though? Last update was Revert "Merge" :)


Per Ploug 19 Mar 2014, 17:46:15

yeah it was done before that commit


Sebastiaan Janssen 19 Mar 2014, 17:49:59

Okay, I was on that commit. So I don't know where you tried to fix it, but it didn't help...


Per Ploug 19 Mar 2014, 17:54:46

send me image file and the crop sizes and I'll try to replicate, seems like you are seeing other behaivior then I am, could it be a difference in ImageProcessor versions?


Per Ploug 19 Mar 2014, 18:15:56

Or you could try with this file here, remember to clear any crops done before, since that will be based on a previous image (working on clearing that correctly)


Sebastiaan Janssen 19 Mar 2014, 19:00:00

Aah, maybe it only happens when the zoom level is changed? It worked just using the blue dot, it work by dragging around in the preview but when zooming and dragging then stuff like this happens.


Sebastiaan Janssen 19 Mar 2014, 19:00:44

I've updated the NuGet in Umbraco.Web.UI as well so you get the correct version when you build.


Sebastiaan Janssen 19 Mar 2014, 19:06:34

Not necessarily need to zoom. I'm going to do it again in FF, Chrome might be screwing it up.


Sebastiaan Janssen 19 Mar 2014, 19:15:50

Also a problem in FF, just using the blue dot seems okay every time, going in and customizing doesn't work so well unfortunately. I'll try to downgrade IP and see if that's the problem.


Sebastiaan Janssen 19 Mar 2014, 19:33:38

Hmmm, nope it keeps doing either nothing (I've zoomed, moved, then published) or the wrong thing. I'll record a video. When I open the preview to adjust and zoom, am I then required to click the X before hitting publish?


Per Ploug 19 Mar 2014, 19:51:46

nope, it should update the preview instantly


Sebastiaan Janssen 19 Mar 2014, 20:07:16

See video, my mileage varies a lot.


Sebastiaan Janssen 19 Mar 2014, 20:08:59

Ps. I didn't get around to downgrading IP yet.


Per Ploug 19 Mar 2014, 20:11:49

odd, I dont see that behaivior at all - what size is the crop you are using?


Sebastiaan Janssen 19 Mar 2014, 20:37:35

Weirdness! It's 500x150


Sebastiaan Janssen 19 Mar 2014, 20:44:31

See if this works on your machine? Open folder in webmatrix. Backoffice user/pass: test@test.com / test https://dl.dropboxusercontent.com/u/3006713/WebApplication27.zip


Arjan Pot 20 Mar 2014, 12:43:12

ImageProcessor had an update yesterday to parse numbers in InvariantCulture. I had an issue with that and the image cropper in 7.1.0 beta; it did not crop at all. Your issue looks a bit different though you may benefit from the latest ImageProcessor. Beware that it removes your config/imageprocessor files when installing with Nuget!

Looking forward for the 7.1 release!


Sebastiaan Janssen 20 Mar 2014, 12:58:25

@arjanpot Thanks Arjan, I'm completely up-to-date! :)


Per Ploug 20 Mar 2014, 14:26:26

God dammit, the site I got from you sebastiaan also works just fine :( tried in IE, Firefox, Chrome (last 2 on both osx and win vm) why the hell doesnt this replicate on my machine


Sebastiaan Janssen 20 Mar 2014, 14:43:19

Must be the curse of the Thinkpad as Morten has the same probs.. super weird that's can't be reproduced!


Per Ploug 20 Mar 2014, 15:37:21

Think Niels mentioned he had some issue as well, so will see if I can get it reproduced from him


Jeavon Leopold 25 Mar 2014, 19:51:28

I might have a clue (or a different issue), if I use a large image 3264 x 1099 (not sure if that's relevant) and have a crop of 270 x 151, if I zoom right out so that the crop should be full width I get the following coordinates 0.0000000000000002105311809660,0,-0.0000000000000004210623619319,0.25432098765432087 Due to the minus value of x2 which is impossible, ImageProcessor throws a YSOD.
However, question is how did I get a minus value in x2.....? Using Chrome 33 on Windows 8.1


Sebastiaan Janssen 02 Apr 2014, 15:23:38

It seems the zoom cropper misbehaves most when nearing the edges, and the erratic behavior seems amplified with the latest changes to prevent negative values (which is now indeed not possible any more).

I've attached some images: 001: 25px seem cut off, but don't be fooled, it's a transparent 25px at the top. 002: Seems okay (horizontally even seems correct, vertically it's obviously shifterd up), but.. 003: There's a few px of transparent border at the bottom 004: what the..

When using the zoom cropper I also have to go somewhere else and reload the node in order to change the crop every time. So just changing it from within the zoom cropper > save & publish only works once, changing and publishing again: nada. Using the X and then going back in and changing it: no go. So I just refresh the page and go back into the zoom cropper, that helps.

I've included the original image. The crop is set to 271 by 400 if that makes a difference.


Priority: Normal

Type: Bug

State: Fixed

Assignee: Per Ploug

Difficulty: Normal

Category:

Backwards Compatible: True

Fix Submitted:

Affected versions: 7.1.0

Due in version: 7.1.0

Sprint:

Story Points:

Cycle: