File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -5,6 +5,7 @@ var MiniMasonry = function(conf) {
55 this . _count = null ;
66 this . _width = 0 ;
77 this . _removeListener = null ;
8+ this . _savedGutterX = null ;
89
910 this . _resizeTimeout = null ,
1011
@@ -33,7 +34,7 @@ MiniMasonry.prototype.init = function(conf) {
3334 }
3435 }
3536 if ( this . conf . gutterX == null || this . conf . gutterY == null ) {
36- this . conf . gutterX = this . conf . gutterY = this . conf . gutter ;
37+ this . _savedGutterX = this . conf . gutterX = this . conf . gutterY = this . conf . gutter ;
3738 }
3839
3940 this . _container = typeof this . conf . container == 'object' && this . conf . container . nodeName ?
@@ -69,11 +70,11 @@ MiniMasonry.prototype.reset = function() {
6970 this . conf . gutterX = this . conf . ultimateGutter ;
7071 // As gutters are reduced, two column may fit, forcing to 1
7172 this . _count = 1 ;
72- }
73-
74- if ( this . _width < ( this . conf . baseWidth + ( 2 * this . conf . gutterX ) ) ) {
73+ } else if ( this . _width < ( this . conf . baseWidth + ( 2 * this . conf . gutterX ) ) ) {
7574 // Remove gutter when screen is to low
7675 this . conf . gutterX = 0 ;
76+ } else {
77+ this . conf . gutterX = this . _savedGutterX
7778 }
7879} ;
7980
You can’t perform that action at this time.
0 commit comments