From 5db42a9889019bc16d2ffd62e77ea7113e159922 Mon Sep 17 00:00:00 2001 From: Kunal Marwaha Date: Tue, 24 Jun 2014 21:36:54 -0700 Subject: fixed scrolling --- gui.js | 3 +++ 1 file changed, 3 insertions(+) (limited to 'gui.js') diff --git a/gui.js b/gui.js index d12453b..7a4d964 100644 --- a/gui.js +++ b/gui.js @@ -1390,6 +1390,9 @@ IDE_Morph.prototype.fixLayout = function (situation) { // categories this.categories.setLeft(this.logo.left()); this.categories.setTop(this.logo.bottom()); + } else { + this.palette.scrollX(-1); + this.palette.scrollY(-5); } // palette -- cgit v1.3.1 From ed5eccccaef4d703f05576f09584bc3cf652d33d Mon Sep 17 00:00:00 2001 From: Kunal Marwaha Date: Wed, 25 Jun 2014 04:15:58 -0700 Subject: reason for scroll issue: only non-cached palettes needed to be scrolled --- gui.js | 9 ++++----- objects.js | 5 +++++ 2 files changed, 9 insertions(+), 5 deletions(-) (limited to 'gui.js') diff --git a/gui.js b/gui.js index 7a4d964..689709f 100644 --- a/gui.js +++ b/gui.js @@ -889,8 +889,6 @@ IDE_Morph.prototype.createPalette = function (forSearching) { this.palette.setWidth(this.logo.width()); this.add(this.palette); - this.palette.scrollX(this.palette.padding); - this.palette.scrollY(this.palette.padding); return this.palette; }; @@ -1390,9 +1388,6 @@ IDE_Morph.prototype.fixLayout = function (situation) { // categories this.categories.setLeft(this.logo.left()); this.categories.setTop(this.logo.bottom()); - } else { - this.palette.scrollX(-1); - this.palette.scrollY(-5); } // palette @@ -1401,6 +1396,10 @@ IDE_Morph.prototype.fixLayout = function (situation) { this.palette.setHeight(this.bottom() - this.palette.top()); if (situation !== 'refreshPalette') { + // palette + this.palette.scrollX(padding); + this.palette.scrollY(padding); + // stage if (this.isAppMode) { this.stage.setScale(Math.floor(Math.min( diff --git a/objects.js b/objects.js index 89bc815..3140211 100644 --- a/objects.js +++ b/objects.js @@ -2270,6 +2270,11 @@ SpriteMorph.prototype.freshPalette = function (category) { } }); + //layout + + palette.scrollX(palette.padding); + palette.scrollY(palette.padding); + Morph.prototype.trackChanges = oldFlag; return palette; }; -- cgit v1.3.1 From 89c0dfd79064a03a93378033b5c9adb50504b83f Mon Sep 17 00:00:00 2001 From: Kunal Marwaha Date: Wed, 25 Jun 2014 04:30:17 -0700 Subject: actually no cached image needs to scroll --- gui.js | 4 ---- 1 file changed, 4 deletions(-) (limited to 'gui.js') diff --git a/gui.js b/gui.js index 689709f..83aa666 100644 --- a/gui.js +++ b/gui.js @@ -1396,10 +1396,6 @@ IDE_Morph.prototype.fixLayout = function (situation) { this.palette.setHeight(this.bottom() - this.palette.top()); if (situation !== 'refreshPalette') { - // palette - this.palette.scrollX(padding); - this.palette.scrollY(padding); - // stage if (this.isAppMode) { this.stage.setScale(Math.floor(Math.min( -- cgit v1.3.1