Skip to content

Commit

Permalink
Canvas grid enabled state modified into context to avoid spurious dea…
Browse files Browse the repository at this point in the history
…ctivation upon widget addition/removal.

Signed-off-by: Gautier Taravella <tarag@mailbox.org>
  • Loading branch information
tarag committed Sep 24, 2021
1 parent 157dacc commit 80850c0
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
"
icon-f7="square_on_square" />
<f7-menu-item
@click="grid.enable = !grid.enable"
@click="toggleGrid()"
:icon-f7="grid.enable ? 'circle_grid_3x3_fill' : 'scircle_grid_3x3'"
style="margin-left: auto" />
<f7-menu-item
Expand Down Expand Up @@ -229,6 +229,9 @@ export default {
}
})
},
toggleGrid () {
this.context.component.config.gridEnable = this.grid.enable = !this.grid.enable
},
canvasLayoutStyle: function () {
if (this.config.scale && !this.context.editmode) {
this.style.scale = parent.innerWidth / this.screenWidth
Expand Down

0 comments on commit 80850c0

Please sign in to comment.