diff options
| author | timb <opuscule@gmail.com> | 2015-06-10 03:05:41 -0400 |
|---|---|---|
| committer | timb <opuscule@gmail.com> | 2015-06-10 03:05:41 -0400 |
| commit | 1b1109b59a8e4d64aab2f8494e9df051a2028044 (patch) | |
| tree | e226f211336b5dfd6ee9b0cb274670aa10c6650c /js/ui/controls.js | |
| parent | 6097bace72ae70049c0d1c051cc2b60102935cc3 (diff) | |
reposition selection if grid control is toggled
Diffstat (limited to 'js/ui/controls.js')
| -rw-r--r-- | js/ui/controls.js | 5 |
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 +})() |
