app/assets/lookbook/js/components/inspector.js in lookbook-0.5.0.beta.2 vs app/assets/lookbook/js/components/inspector.js in lookbook-0.5.0
- old
+ new
@@ -30,18 +30,26 @@
return this.width > 800;
},
get drawerHidden() {
return this.$store.inspector.drawer.hidden;
},
- isActivePanel(panel) {
- return this.$store.inspector.drawer.active == panel;
+ get maxDrawerHeight() {
+ return Math.round(this.height * 0.7);
},
- switchPanel(panel) {
- this.$store.inspector.drawer.active = panel;
+ get maxDrawerWidth() {
+ return Math.round(this.width * 0.7);
},
- toggleView() {
- this.$store.inspector.preview.view =
- this.view === "html" ? "preview" : "html";
+ isActiveDrawerPanel(panel) {
+ return this.$store.inspector.drawer.panel === panel;
+ },
+ switchDrawerPanel(panel) {
+ this.$store.inspector.drawer.panel = panel;
+ },
+ isActivePreviewPanel(panel) {
+ return this.$store.inspector.preview.panel === panel;
+ },
+ switchPreviewPanel(panel) {
+ this.$store.inspector.preview.panel = panel;
},
toggleOrientation() {
this.$store.inspector.drawer.orientation =
this.orientation === "horizontal" ? "vertical" : "horizontal";
},