Skip to content

Conversation

@doochik
Copy link

@doochik doochik commented Mar 30, 2016

Resize event recalcs image dimensions in wrong way (see example https://jsfiddle.net/doochik/1mdhtbav/).
In this case we should stop processing resize event if fotorama is hidden.
As a workaround for this bug we can use position:abosulte;left:-9990px;top:-9999px instead of display: none to hide fotorama.

if (!data) return this;

// don't process resize for hidden elements
if ($wrap.is(':hidden')) return this;
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A lot of "if".
It can be added here

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ok, i've fixed it

Resize event recalcs image dimensions in wrong way (see example https://jsfiddle.net/doochik/1mdhtbav/).
In this case we should stop processing resize event if fotorama is hidden.
As a workaround for this bug we can use `position:abosulte;left:-9990px;top:-9999px` instead of `display: none` to hide fotorama.
@doochik doochik force-pushed the fix-hidden-fotorama-resize branch from 430f068 to 2d72f8f Compare March 31, 2016 19:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant