summaryrefslogtreecommitdiff
path: root/gui.js
diff options
context:
space:
mode:
authorjmoenig <jens@moenig.org>2014-02-13 12:04:13 +0100
committerjmoenig <jens@moenig.org>2014-02-13 12:04:13 +0100
commit2411ca3ebdb0764494f92024cd4737c53d5d8267 (patch)
treecd45e2854de30af43a5956a4eef8e5fe0f0823fd /gui.js
parent505859533586e697442b349a545aa0307784c9f4 (diff)
downloadsnap-2411ca3ebdb0764494f92024cd4737c53d5d8267.tar.gz
snap-2411ca3ebdb0764494f92024cd4737c53d5d8267.zip
Fixed #322, #324
Diffstat (limited to 'gui.js')
-rw-r--r--gui.js13
1 files changed, 11 insertions, 2 deletions
diff --git a/gui.js b/gui.js
index cd9a62b..2445aa3 100644
--- a/gui.js
+++ b/gui.js
@@ -1447,7 +1447,8 @@ IDE_Morph.prototype.setProjectName = function (string) {
// IDE_Morph resizing
IDE_Morph.prototype.setExtent = function (point) {
- var minExt,
+ var padding = new Point(430, 110),
+ minExt,
ext;
// determine the minimum dimensions making sense for the current mode
@@ -1463,7 +1464,12 @@ IDE_Morph.prototype.setExtent = function (point) {
}
*/
minExt = this.isSmallStage ?
+ padding.add(StageMorph.prototype.dimensions.divideBy(2))
+ : padding.add(StageMorph.prototype.dimensions);
+/*
+ minExt = this.isSmallStage ?
new Point(700, 350) : new Point(910, 490);
+*/
}
ext = point.max(minExt);
IDE_Morph.uber.setExtent.call(this, ext);
@@ -3529,6 +3535,7 @@ IDE_Morph.prototype.setStageHeight = function (num) {
IDE_Morph.prototype.setStageExtent = function (aPoint) {
var myself = this,
+ world = this.world(),
ext = aPoint.max(new Point(480, 180));
function zoom() {
@@ -3546,13 +3553,14 @@ IDE_Morph.prototype.setStageExtent = function (aPoint) {
myself.stage.setExtent(StageMorph.prototype.dimensions);
myself.stage.clearPenTrails();
myself.fixLayout();
+ this.setExtent(world.extent());
};
}
this.stageRatio = 1;
this.isSmallStage = false;
this.controlBar.stageSizeButton.refresh();
- this.setExtent(this.world().extent());
+ this.setExtent(world.extent());
if (this.isAnimating) {
zoom();
} else {
@@ -3560,6 +3568,7 @@ IDE_Morph.prototype.setStageExtent = function (aPoint) {
this.stage.setExtent(StageMorph.prototype.dimensions);
this.stage.clearPenTrails();
this.fixLayout();
+ this.setExtent(world.extent());
}
};