From afe71482758d953d819daab995bf5400029396d3 Mon Sep 17 00:00:00 2001 From: Jules Laplace Date: Tue, 30 Jun 2015 00:00:24 -0400 Subject: fix sizing issues --- js/ui/controls.js | 14 ++++---------- js/ui/selection.js | 1 - 2 files changed, 4 insertions(+), 11 deletions(-) (limited to 'js/ui') diff --git a/js/ui/controls.js b/js/ui/controls.js index b5ed6b1..f760353 100644 --- a/js/ui/controls.js +++ b/js/ui/controls.js @@ -95,19 +95,13 @@ var controls = (function(){ controls.grid = new BlurredCheckbox (grid_el) controls.grid.use = function(){ document.body.classList.toggle('grid') + letters.grid = palette.grid = canvas.grid = document.body.classList.contains("grid") + canvas.resize_rapper() + palette.resize_rapper() + letters.resize_rapper() 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 ) - } ClipboardTool = Tool.extend({ blur: function(){ diff --git a/js/ui/selection.js b/js/ui/selection.js index abd7da2..a3c3694 100644 --- a/js/ui/selection.js +++ b/js/ui/selection.js @@ -132,7 +132,6 @@ var selection = (function(){ function show () { selecting = true - controls.grid.show() } function hide () { reset() -- cgit v1.2.3-70-g09d2