Skip to content
This repository has been archived by the owner on Aug 5, 2020. It is now read-only.

Commit

Permalink
Merge in master
Browse files Browse the repository at this point in the history
  • Loading branch information
Marlow Payne committed Sep 23, 2015
2 parents be19e18 + 0c65fbc commit fa5e31e
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 10 deletions.
4 changes: 2 additions & 2 deletions build/magnifik.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

14 changes: 6 additions & 8 deletions src/magnifik.js
Expand Up @@ -211,14 +211,12 @@ Mobify.UI.Magnifik = (function() {
, bigHeight = thumbWidth * imgAspect
, thus = this;

this.$thumb.one('load', function() {
thus.$canvas.prop('scrollLeft', Math.max(0, Math.min(bigWidth - smallWidth,
bigWidth * leftRatio - smallWidth / 2)));
thus.$canvas.prop('scrollTop', Math.max(0, Math.min(bigHeight - smallHeight,
bigHeight * topRatio - smallHeight / 2)));

thus.$element.trigger('magnifik:open');
})
thus.$canvas.prop('scrollLeft', Math.max(0, Math.min(bigWidth - smallWidth,
bigWidth * leftRatio - smallWidth / 2)));
thus.$canvas.prop('scrollTop', Math.max(0, Math.min(bigHeight - smallHeight,
bigHeight * topRatio - smallHeight / 2)));

thus.$element.trigger('magnifik:open');
};

Magnifik.prototype.bindClose = function(op) {
Expand Down

0 comments on commit fa5e31e

Please sign in to comment.