mirror of
https://github.com/zombieFox/nightTab.git
synced 2024-11-22 16:13:20 +01:00
improve layout resize observer
This commit is contained in:
parent
233ea96808
commit
f1435d55c0
@ -56,13 +56,9 @@ layout.area = {
|
||||
|
||||
});
|
||||
|
||||
set({
|
||||
object: state.get.current(),
|
||||
path: 'layout.breakpoint',
|
||||
value: breakpoint
|
||||
});
|
||||
state.get.current().layout.breakpoint = breakpoint;
|
||||
|
||||
layout.breakpoint.bind();
|
||||
layout.breakpoint.render();
|
||||
|
||||
});
|
||||
|
||||
@ -143,7 +139,7 @@ layout.bookmark = {
|
||||
};
|
||||
|
||||
layout.breakpoint = {
|
||||
bind: () => {
|
||||
render: () => {
|
||||
|
||||
const html = document.querySelector('html');
|
||||
|
||||
@ -221,7 +217,6 @@ layout.init = () => {
|
||||
'layout.overscroll'
|
||||
]);
|
||||
layout.area.render();
|
||||
layout.breakpoint.bind();
|
||||
layout.title.render();
|
||||
};
|
||||
|
||||
|
@ -538,6 +538,8 @@ update.mod['7.0.0'] = function(data) {
|
||||
|
||||
});
|
||||
|
||||
data.state.layout.breakpoint = data.state.bookmark.breakpoint;
|
||||
|
||||
delete data.state.bookmark.area;
|
||||
|
||||
delete data.state.bookmark.item;
|
||||
|
Loading…
Reference in New Issue
Block a user