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
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
30 commits
Select commit Hold shift + click to select a range
8154f68
Initial commit for plugins (non-working)
anselmh Feb 3, 2014
cc81022
Add html5video plugin
anselmh Feb 4, 2014
d9ecacd
Add resizing (WIP) to modal (imgs)
anselmh Feb 10, 2014
f2f8379
Add markup
anselmh Feb 10, 2014
12484f6
Match resize MQ to CSS Mobile MQ
anselmh Mar 24, 2014
25e8980
Fix resizing function to work with AMD, etc.
anselmh Apr 15, 2014
0611f50
More refactoring of the resize plugin code
anselmh Apr 15, 2014
5963805
Major refactor of the resize function (WIP)
anselmh Apr 16, 2014
f03d801
More work on resizing module.
anselmh Apr 17, 2014
5a81fe5
Fix up resizing when window smaller than img
anselmh Apr 17, 2014
10c3701
Merge branch 'plugins' of github.com:drublic/css-modal into plugins
drublic Apr 22, 2014
c9c89ef
More fixes on resizing, add more demo content.
anselmh Apr 23, 2014
d5ed671
Force centered position and left property
anselmh Apr 23, 2014
8f98c8b
This fixes several RWD bugs in resizing
anselmh Apr 23, 2014
1764e46
Fix up resizing edge cases with diff. img formats.
anselmh Apr 23, 2014
c008968
Add new scss partial for resizing plugin.
anselmh Apr 23, 2014
7f984c9
Add dynamic Stylesheet func for close btn position
anselmh Apr 23, 2014
99f9e8a
Clean up branch.
anselmh Apr 23, 2014
6d25cf4
Merge branch 'master' into plugin-resize
drublic Apr 24, 2014
594bb89
Update code for modal resize with fixes
drublic Apr 24, 2014
c268552
Use better functions for style injection and window.matchMedia
drublic Apr 24, 2014
86e5f0d
Update centering and resize of modal - WIP
drublic Apr 24, 2014
ad3a101
Include image scaling for modal
drublic Apr 28, 2014
abe28fe
Move image file into img folder
drublic May 1, 2014
c669006
Only add resize effect to modals with data attr
drublic May 1, 2014
71e309e
Merge branch 'master' into plugin-resize
drublic May 19, 2014
aa4921c
Update styling for close button and resize image
drublic May 19, 2014
2e0522e
Incorporate resizing for smaller screens
drublic May 20, 2014
a3656c5
Update node module grunt-contrib-jasmine
drublic May 20, 2014
15ff54c
Update min node version to v0.10.0 when working with Travis
drublic May 20, 2014
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Match resize MQ to CSS Mobile MQ
  • Loading branch information
anselmh committed Mar 24, 2014
commit 12484f616f515f615643b89562f25abf7a01dd8b
1 change: 1 addition & 0 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -205,6 +205,7 @@ <h2 id="label-zoomout">A zoomed out modal</h2>
</div>

<script src="modal.js"></script><!-- JS for Modal -->
<script src="plugins/resizemodal.js"></script><!-- JS for Modal -->
<script src="plugins/html5video-playback.js"></script>
</body>
</html>
4 changes: 2 additions & 2 deletions plugins/resizemodal.js
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@

var resizeModal = function (e) {
// Only apply dynamic resize if modal is not in mobile view
if (window.matchMedia('(max-width: 43em)').matches) {
if (window.matchMedia('(max-width: 30em)').matches) {
return;
}

Expand Down Expand Up @@ -106,7 +106,7 @@
};

// Function to call the resizing throttled
var resizeModalThrottled = throttle(resizeModal, 500);
var resizeModalThrottled = throttle(resizeModal, 5);

CSSModal.on('cssmodal:show', document, function (event) {
fixCloseBtn();
Expand Down