We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 879a2bb commit beb932eCopy full SHA for beb932e
src/octotree.js
@@ -75,7 +75,7 @@ $(document).ready(() => {
75
76
$sidebar
77
.width(parseInt(store.get(STORE.WIDTH)))
78
- .resize(layoutChanged)
+ .resize(() => layoutChanged(true))
79
.appendTo($('body'))
80
81
adapter.init($sidebar)
@@ -173,10 +173,12 @@ $(document).ready(() => {
173
}
174
175
176
- function layoutChanged() {
+ function layoutChanged(save = false) {
177
const width = $sidebar.outerWidth()
178
adapter.updateLayout(isTogglerVisible(), isSidebarVisible(), width)
179
- store.set(STORE.WIDTH, width)
+ if (save === true) {
180
+ store.set(STORE.WIDTH, width)
181
+ }
182
183
184
function isSidebarVisible() {
0 commit comments