Skip to content

Commit aed5a23

Browse files
author
Alain Dumesny
committed
doc changes
1 parent ae50644 commit aed5a23

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
lines changed

doc/CHANGES.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,11 +29,11 @@ Change log
2929

3030
## v0.6.1-dev (upcoming changes)
3131

32-
- TBD
32+
- fix oneColumnMode to only restore if we auto went to it as window sizes up [#1125](https://github.com/gridstack/gridstack.js/pull/1125)
3333

3434
## v0.6.1 (2020-02-02)
3535

36-
- one column mode (<768px by default) now simply calls `setColumn(1)` and remembers prev columns (so we can restore). This gives
36+
- fix [#37](https://github.com/gridstack/gridstack.js/issues/37) oneColumnMode (<768px by default) now simply calls `setColumn(1)` and remembers prev columns (so we can restore). This gives
3737
us full resize/re-order of items capabilities rather than a locked CSS only layout (see prev rev changes). [#1120](https://github.com/gridstack/gridstack.js/pull/1120)
3838
- fixed responsive.html demo [#1121](https://github.com/gridstack/gridstack.js/pull/1121)
3939

src/gridstack.js

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -666,7 +666,7 @@
666666

667667
var GridStack = function(el, opts) {
668668
var self = this;
669-
var oneColumnAutoMode, _prevColumn, isAutoCellHeight;
669+
var oneColumnMode, _prevColumn, isAutoCellHeight;
670670

671671
opts = opts || {};
672672

@@ -826,16 +826,16 @@
826826
if (self.opts.staticGrid) { return; }
827827

828828
if (!self.opts.disableOneColumnMode && (window.innerWidth || document.documentElement.clientWidth || document.body.clientWidth) <= self.opts.minWidth) {
829-
if (self.oneColumnAutoMode) { return; }
829+
if (self.oneColumnMode) { return; }
830830

831831
self.container.addClass(self.opts.oneColumnModeClass); // TODO: legacy do people still depend on style being there ?
832-
self.oneColumnAutoMode = true;
832+
self.oneColumnMode = true;
833833
self.setColumn(1);
834834
} else {
835-
if (!self.oneColumnAutoMode) { return; }
835+
if (!self.oneColumnMode) { return; }
836836

837837
self.container.removeClass(self.opts.oneColumnModeClass);
838-
self.oneColumnAutoMode = false;
838+
self.oneColumnMode = false;
839839
self.setColumn(self._prevColumn);
840840
}
841841
};

0 commit comments

Comments
 (0)