improve layout resize observer

This commit is contained in:
zombieFox 2021-08-22 07:45:09 +01:00
parent 233ea96808
commit f1435d55c0
2 changed files with 5 additions and 8 deletions

View File

@ -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();
};

View File

@ -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;