Fixed layout resize
This commit is contained in:
parent
8c02d1e221
commit
167f3f50bc
@ -34,7 +34,7 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { mapGetters, mapMutations } from 'vuex';
|
import { mapGetters, mapActions } from 'vuex';
|
||||||
import NavigationBar from './NavigationBar';
|
import NavigationBar from './NavigationBar';
|
||||||
import ButtonBar from './ButtonBar';
|
import ButtonBar from './ButtonBar';
|
||||||
import StatusBar from './StatusBar';
|
import StatusBar from './StatusBar';
|
||||||
@ -67,7 +67,7 @@ export default {
|
|||||||
},
|
},
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
...mapMutations('layout', [
|
...mapActions('layout', [
|
||||||
'updateBodySize',
|
'updateBodySize',
|
||||||
]),
|
]),
|
||||||
saveSelection: () => editorSvc.saveSelection(true),
|
saveSelection: () => editorSvc.saveSelection(true),
|
||||||
|
@ -145,4 +145,12 @@ export default {
|
|||||||
return computeStyles(state, localSettings, rootGetters);
|
return computeStyles(state, localSettings, rootGetters);
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
actions: {
|
||||||
|
updateBodySize({ commit, dispatch, rootGetters }) {
|
||||||
|
commit('updateBodySize');
|
||||||
|
// Make sure both explorer and side bar are not open if body width is small
|
||||||
|
const localSettings = rootGetters['data/localSettings'];
|
||||||
|
dispatch('data/toggleExplorer', localSettings.showExplorer, { root: true });
|
||||||
|
},
|
||||||
|
},
|
||||||
};
|
};
|
||||||
|
Loading…
Reference in New Issue
Block a user