Skip to content

Commit

Permalink
Merge branch 'Blackskyliner-patch-1'
Browse files Browse the repository at this point in the history
  • Loading branch information
nyroDev committed Oct 17, 2014
2 parents f827079 + e8a743f commit 18403ea
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions js/jquery.nyroModal.js
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,8 @@ jQuery(function($, undefined) {
h: undefined, // height
minW: undefined, // minimum Width
minH: undefined, // minimum height
maxW: undefined, // maximum width
maxH: undefined, // maximum height
wMargin: undefined, // Horizontal margin
hMargin: undefined // Vertical margin
},
Expand Down Expand Up @@ -186,6 +188,12 @@ jQuery(function($, undefined) {
size: function() {
var maxHeight = this.getInternal().fullSize.viewH - this.sizes.hMargin,
maxWidth = this.getInternal().fullSize.viewW - this.sizes.wMargin;

if (typeof this.sizes.maxH !== 'undefined' && this.sizes.maxH < maxHeight)
maxHeight = this.sizes.maxH;
if (typeof this.sizes.maxW !== 'undefined' && this.sizes.maxW < maxWidth)
maxWidth = this.sizes.maxW;

if (this.sizes.minW && this.sizes.minW > this.sizes.w)
this.sizes.w = this.sizes.minW;
if (this.sizes.minH && this.sizes.minH > this.sizes.h)
Expand Down

0 comments on commit 18403ea

Please sign in to comment.