New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Set style options of croppedImage before onload #499

Closed
wants to merge 1 commit into
base: master
from

Conversation

Projects
None yet
2 participants
@erich-9

erich-9 commented Feb 6, 2016

The current implementation of Graphics.Element.croppedImage loads the image from its source. Only afterwards, when the onload event is triggered, the style options are set.

In this commit, I set the options not depending on the image's natural size as early as possible (namely, marginLeft and marginTop).

This reduces unpleasant flickering, at least as long as the image is not scaled. Compare with #456.

@evancz

This comment has been minimized.

Show comment
Hide comment
@evancz

evancz May 11, 2016

Member

Sorry for the slow reply. It has been busy times. All the Graphics.* modules have moved to evancz/elm-graphics so it makes sense to retarget stuff like this.

Member

evancz commented May 11, 2016

Sorry for the slow reply. It has been busy times. All the Graphics.* modules have moved to evancz/elm-graphics so it makes sense to retarget stuff like this.

@evancz evancz closed this May 11, 2016

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment