From 5b672e1db2465154ae01a6dc15722b90672838c1 Mon Sep 17 00:00:00 2001 From: Michael Aschauer Date: Tue, 24 Jan 2017 22:39:23 +0100 Subject: [PATCH] fixing details... --- stitchcode/gui.js | 11 ++++++++++- stitchcode/lang-de.js | 4 +++- stitchcode/objects.js | 18 ++++++++++-------- 3 files changed, 23 insertions(+), 10 deletions(-) diff --git a/stitchcode/gui.js b/stitchcode/gui.js index c74283ae..50fd2f86 100644 --- a/stitchcode/gui.js +++ b/stitchcode/gui.js @@ -1642,7 +1642,6 @@ IDE_Morph.prototype.createSpriteEditor = function(){ /* CORRAL BAR */ // Single Sprite mode, no corral and no tabs in the scripting area - IDE_Morph.prototype.createCorralBar = nop; IDE_Morph.prototype.createCorral = nop; @@ -1826,3 +1825,13 @@ IDE_Morph.prototype.setLanguage = function(lang, callback) { translation.src = src; }); }; + + +StageHandleMorph.prototype.fixLayout = function () { + if (!this.target) {return; } + var ide = this.target.parentThatIsA(IDE_Morph); + this.setTop(this.target.top() + 10); + this.setRight(ide.stage.left()); + + if (ide) {ide.add(this); } // come to front +}; diff --git a/stitchcode/lang-de.js b/stitchcode/lang-de.js index cbc36b4a..a19813d4 100644 --- a/stitchcode/lang-de.js +++ b/stitchcode/lang-de.js @@ -25,7 +25,9 @@ tempDict = { 'Reset View': 'Anzeige zur\u00fccksetzen', 'Dimensions : ': - 'Gr\u00f6\u00dfe : ' + 'Gr\u00f6\u00dfe : ', + 'clear': + 'l\u00f6schen' }; // Add attributes to original SnapTranslator.dict.de diff --git a/stitchcode/objects.js b/stitchcode/objects.js index 660887d7..dedc0aea 100644 --- a/stitchcode/objects.js +++ b/stitchcode/objects.js @@ -285,14 +285,14 @@ StageMorph.prototype.initScene = function () { this.scene.grid = {}; this.scene.grid.defaultColor = 0xe0e0e0; this.scene.grid.visible = true; - this.scene.grid.interval = new Point(50, 50); + this.scene.grid.interval = new Point(5, 5); // Grid this.scene.grid.draw = function () { //var color = this.lines ? this.lines[0].material.color : this.defaultColor; - var color = 0xf0f0f0; - var color2 = 0xd0d0d0; + var color = 0xf6f6f6; + var color2 = 0xe0e0e0; if (this.lines) { this.lines.forEach(function (eachLine){ @@ -302,7 +302,7 @@ StageMorph.prototype.initScene = function () { this.lines = []; - limit = this.interval.x * 20 + limit = this.interval.x * 50; for (x = -limit / this.interval.x; x <= limit / this.interval.x; x++) { p1 = new THREE.Vector3(x * this.interval.x, -limit, 0); @@ -320,7 +320,9 @@ StageMorph.prototype.initScene = function () { this.lines.push(l); } - for (x = -limit/10 / this.interval.x; x <= limit/10 / this.interval.x *1; x++) { + limit = this.interval.x * 200; + + for (x = -limit/10 / this.interval.x; x <= limit/10 / this.interval.x; x++) { p1 = new THREE.Vector3(x * this.interval.x * 10, -limit,0); p2 = new THREE.Vector3(x * this.interval.x* 10, limit,0); l = myself.scene.addLineFromPointToPointWithColor(p1, p2, color2); @@ -328,9 +330,9 @@ StageMorph.prototype.initScene = function () { this.lines.push(l); } - for (y = -limit/10 / this.interval.y / 10; y <= limit/10 / this.interval.y / 10 ; y++) { - p1 = new THREE.Vector3(-limit, y * this.interval.y/ 10, 0); - p2 = new THREE.Vector3(limit, y * this.interval.y/ 10, 0); + for (y = -limit/10 / this.interval.y; y <= limit/10 / this.interval.y ; y++) { + p1 = new THREE.Vector3(-limit, y * this.interval.y * 10, 0); + p2 = new THREE.Vector3(limit, y * this.interval.y * 10, 0); l = myself.scene.addLineFromPointToPointWithColor(p1, p2, color2); l.visible = this.visible; this.lines.push(l);