summaryrefslogtreecommitdiff
path: root/js/ui/controls.js
diff options
context:
space:
mode:
Diffstat (limited to 'js/ui/controls.js')
-rw-r--r--js/ui/controls.js5
1 files changed, 4 insertions, 1 deletions
diff --git a/js/ui/controls.js b/js/ui/controls.js
index 4a576e5..0665747 100644
--- a/js/ui/controls.js
+++ b/js/ui/controls.js
@@ -106,14 +106,17 @@ var controls = (function(){
controls.grid = new BlurredCheckbox (grid_el)
controls.grid.use = function(){
document.body.classList.toggle('grid')
+ if (!selection.hidden) selection.reposition()
this.update( document.body.classList.contains("grid") )
}
controls.grid.show = function(){
document.body.classList.add('grid')
+ if (!selection.hidden) selection.reposition()
this.update( true )
}
controls.grid.hide = function(){
document.body.classList.remove('grid')
+ if (!selection.hidden) selection.reposition()
this.update( false )
}
@@ -258,4 +261,4 @@ var controls = (function(){
}
return controls
-})() \ No newline at end of file
+})()