Skip to content
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

Initial draft of plugin to resize/center images in a modal #108

Merged
merged 30 commits into from
May 20, 2014

Conversation

drublic
Copy link
Owner

@drublic drublic commented Apr 28, 2014

This is an initial draft to publish a plugin to resize stuff in the modal.
Currently we still need:

  • check if we really want to include third party stuff like polyfills
  • implement an option to use the resize/center on a specific modal
  • test cross devices and browser
  • test edge cases
  • add a specific test-case
  • document the plugin

anselmh and others added 23 commits February 3, 2014 23:44
This still needs more improvement but
finally we’re getting closer to get this beast
working in browsers.

Still open:
- Better code quality
- margin-left / right pos of pseudo close element
until it breaks into mobile view when
resizing dynamically.
This includes a fix for portrait, landscape modes,
maxHeight|maxWidths of images and with the mobile
reset.

It also removes the throttle function which shouldn’t
be part of this plugin at all.
This prevents the modal from being laggy transitioned
on resize.
This sets the proper position for our close button
regardless of the modal size and button size.
Moving files to plugins folder,
remove non-targeted files out of branch.
@anselmh
Copy link
Contributor

anselmh commented Apr 30, 2014

should be 100% or centered or smaller modal size:
screen shot 2014-04-30 at 10 09 50
same:
screen shot 2014-04-30 at 10 10 27
very same:
screen shot 2014-04-30 at 10 10 34
img should be centered in mobile view, looks not ideal right now.
screen shot 2014-04-30 at 10 10 41

@anselmh
Copy link
Contributor

anselmh commented Apr 30, 2014

check if we really want to include third party stuff like polyfills

I do see this is a problem because it bloats up the other code. Can we modularize the whole thing and split it up again in two files, the plugin itself and a polyfill file?

@anselmh
Copy link
Contributor

anselmh commented Apr 30, 2014

test cross devices and browser

  • Currently, IE8 fails completely for me do show a modal
  • IE9 kind of works but fails on portrait image calculating the height (probably 'on load' only?!), also cannot apply the close pseudo-element position
  • IE10 fails also calculating the proper height (probably 'on load' only?!)
  • IE11 fails also calculating the proper height (probably 'on load' only?!)

You need to set data-cssmodal-resize on the modal in order to get it
resized. This is the case since you most likely don't want every modal
to be centered or resize.
@drublic drublic merged commit 15ff54c into master May 20, 2014
@drublic drublic deleted the plugin-resize branch May 20, 2014 08:55
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.

None yet

2 participants