summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--blocks.js42
-rw-r--r--cloud.js3
-rw-r--r--gui.js10
-rwxr-xr-xhistory.txt12
-rw-r--r--lang-cs.js6
-rw-r--r--lang-de.js4
-rw-r--r--lang-eo.js4
-rw-r--r--lang-es.js6
-rw-r--r--lang-fr.js4
-rw-r--r--lang-it.js6
-rwxr-xr-xlang-ja.js4
-rwxr-xr-xlang-ja_HIRA.js4
-rw-r--r--lang-ko.js4
-rwxr-xr-xlang-pt.js6
-rw-r--r--lang-ru.js4
-rw-r--r--lang-si.js4
-rw-r--r--lang-zh.js4
17 files changed, 89 insertions, 38 deletions
diff --git a/blocks.js b/blocks.js
index 061e176..3e9e16c 100644
--- a/blocks.js
+++ b/blocks.js
@@ -153,7 +153,7 @@ DialogBoxMorph, BlockInputFragmentMorph, PrototypeHatBlockMorph*/
// Global stuff ////////////////////////////////////////////////////////
-modules.blocks = '2013-April-05';
+modules.blocks = '2013-April-17';
var SyntaxElementMorph;
var BlockMorph;
@@ -4285,6 +4285,11 @@ ScriptsMorph.prototype.userMenu = function () {
}
menu.addItem('clean up', 'cleanUp', 'arrange scripts\nvertically');
menu.addItem('add comment', 'addComment');
+ menu.addItem(
+ 'scripts pic...',
+ 'exportScriptsPicture',
+ 'open a new window\nwith a picture of all scripts'
+ );
if (ide) {
menu.addLine();
menu.addItem(
@@ -4343,6 +4348,29 @@ ScriptsMorph.prototype.cleanUp = function () {
this.adjustBounds();
};
+ScriptsMorph.prototype.exportScriptsPicture = function () {
+ var boundingBox, pic, ctx;
+ if (this.children.length === 0) {return; }
+ boundingBox = this.children[0].fullBounds();
+ this.children.forEach(function (child) {
+ if (child.isVisible) {
+ boundingBox = boundingBox.merge(child.fullBounds());
+ }
+ });
+ pic = newCanvas(boundingBox.extent());
+ ctx = pic.getContext('2d');
+ this.children.forEach(function (child) {
+ var pos = child.position();
+ if (child.isVisible) {
+ ctx.drawImage(
+ child.fullImageClassic(),
+ pos.x - boundingBox.origin.x,
+ pos.y - boundingBox.origin.y
+ );
+ }
+ });
+ window.open(pic.toDataURL());
+};
ScriptsMorph.prototype.addComment = function () {
new CommentMorph().pickUp(this.world());
@@ -7707,13 +7735,20 @@ MultiArgMorph.prototype.drawNew = function () {
// MultiArgMorph arity control:
MultiArgMorph.prototype.addInput = function (contents) {
- var newPart = this.labelPart(this.slotSpec),
+ var i, name,
+ newPart = this.labelPart(this.slotSpec),
idx = this.children.length - 1;
// newPart.alpha = this.alpha ? 1 : (1 - this.alpha) / 2;
if (contents) {
newPart.setContents(contents);
} else if (this.elementSpec === '%scriptVars') {
- newPart.setContents('abcdefghijklmnopqrstuvwxyz'[idx - 1] || 'foo');
+ name = '';
+ i = idx;
+ while (i > 0) {
+ name = String.fromCharCode(97 + (i - 1) % 26) + name;
+ i = Math.floor((i - 1) / 26);
+ }
+ newPart.setContents(name);
} else if (contains(['%parms', '%ringparms'], this.elementSpec)) {
newPart.setContents('#' + idx);
}
@@ -9057,6 +9092,7 @@ CommentMorph.prototype.align = function (topBlock, ignoreLayer) {
CommentMorph.prototype.startFollowing = function (topBlock) {
var myself = this;
this.align(topBlock);
+ this.world().add(this);
this.addShadow();
this.stickyOffset = this.position().subtract(this.block.position());
this.step = function () {
diff --git a/cloud.js b/cloud.js
index ccd9345..fab69ad 100644
--- a/cloud.js
+++ b/cloud.js
@@ -29,7 +29,7 @@
/*global modules, IDE_Morph, SnapSerializer, hex_sha512, alert, nop*/
-modules.cloud = '2013-April-08';
+modules.cloud = '2013-April-17';
// Global stuff
@@ -38,6 +38,7 @@ var Cloud;
var SnapCloud = new Cloud(
'https://snapcloud.miosoft.com/miocon/app/login?_app=SnapCloud'
//'192.168.2.108:8087/miocon/app/login?_app=SnapCloud'
+ //'192.168.186.167:8087/miocon/app/login?_app=SnapCloud'
// 'localhost/miocon/app/login?_app=SnapCloud'
);
diff --git a/gui.js b/gui.js
index d4320f2..592ddc5 100644
--- a/gui.js
+++ b/gui.js
@@ -68,7 +68,7 @@ sb, CommentMorph, CommandBlockMorph*/
// Global stuff ////////////////////////////////////////////////////////
-modules.gui = '2013-April-12';
+modules.gui = '2013-April-17';
// Declarations
@@ -1130,7 +1130,7 @@ IDE_Morph.prototype.createCorralBar = function () {
button.labelColor = new Color(255, 255, 255);
button.contrast = this.buttonContrast;
button.drawNew();
- button.hint = 'add a new Sprite';
+ button.hint = 'add a new sprite';
button.fixLayout();
button.setCenter(this.corralBar.center());
button.setLeft(this.corralBar.left() + padding);
@@ -1914,7 +1914,7 @@ IDE_Morph.prototype.projectMenu = function () {
shiftClicked = (world.currentKey === 16);
menu = new MenuMorph(this);
- menu.addItem('Project Notes...', 'editProjectNotes');
+ menu.addItem('Project notes...', 'editProjectNotes');
menu.addLine();
menu.addItem(
'New',
@@ -3343,8 +3343,10 @@ IDE_Morph.prototype.setCloudURL = function () {
'Snap!Cloud' :
'https://snapcloud.miosoft.com/miocon/app/' +
'login?_app=SnapCloud',
- 'local network dev' :
+ 'local network lab' :
'192.168.2.108:8087/miocon/app/login?_app=SnapCloud',
+ 'local network office' :
+ '192.168.186.167:8087/miocon/app/login?_app=SnapCloud',
'localhost dev' :
'localhost/miocon/app/login?_app=SnapCloud'
}
diff --git a/history.txt b/history.txt
index 3654307..96b945c 100755
--- a/history.txt
+++ b/history.txt
@@ -1623,3 +1623,15 @@ ______
* Lists: fix for typecasting bug in CONTAINS
* BYOB: Tooltips for custom block templates (sitting in the palette): mousing over a custom block in the palette pops up its definition hat comment in a comment-colored speech bubble
* GUI: Sharing/Unsharing/Deleting now available in all version of the project dialog
+
+130415
+------
+* Blocks: place sticky comments on World layer on dragging their anchor block
+
+130416
+------
+* Cloud, GUI: additional dev settings
+
+130417
+------
+* Blocks: "scripts pic" option in the ScriptsMorph's userMenu lets you export a picture of all scripts (including comments) \ No newline at end of file
diff --git a/lang-cs.js b/lang-cs.js
index 7995417..6bd9697 100644
--- a/lang-cs.js
+++ b/lang-cs.js
@@ -243,8 +243,8 @@ SnapTranslator.dict.cs = {
'jen vlevo/vpravo',
// new sprite button:
- 'add a new Sprite':
- 'přidat nový Sprite',
+ 'add a new sprite':
+ 'přidat nový sprite',
// tab help
'costumes tab help':
@@ -618,7 +618,7 @@ SnapTranslator.dict.cs = {
'Referenční příručka',
// project menu
- 'Project Notes...':
+ 'Project notes...':
'Poznámky k projektu...',
'New':
'Nový',
diff --git a/lang-de.js b/lang-de.js
index b5eb86f..89c0ecb 100644
--- a/lang-de.js
+++ b/lang-de.js
@@ -243,7 +243,7 @@ SnapTranslator.dict.de = {
'kann sich nur nach\nlinks/rechts drehen',
// new sprite button:
- 'add a new Sprite':
+ 'add a new sprite':
'ein neues Objekt\nhinzuf\u00fcgen',
// tab help
@@ -621,7 +621,7 @@ SnapTranslator.dict.de = {
'erm\u00f6glicht Morphic Funktionen',
// project menu
- 'Project Notes...':
+ 'Project notes...':
'Projektanmerkungen...',
'New':
'Neu',
diff --git a/lang-eo.js b/lang-eo.js
index 453ff01..c8d07d1 100644
--- a/lang-eo.js
+++ b/lang-eo.js
@@ -248,7 +248,7 @@ SnapTranslator.dict.eo = {
'nur maldekstren/dekstren',
// new sprite button:
- 'add a new Sprite':
+ 'add a new sprite':
'aldoni novan objekton',
// tab help
@@ -592,7 +592,7 @@ SnapTranslator.dict.eo = {
'ŝalti Morphic\nkuntekstajn menuojn\nkaj kontrolilojn, \nne la afablajn!',
// project menu
- 'Project Notes...':
+ 'Project notes...':
'Projektonotoj...',
'New':
'Nova',
diff --git a/lang-es.js b/lang-es.js
index 893148a..fec4cfe 100644
--- a/lang-es.js
+++ b/lang-es.js
@@ -243,8 +243,8 @@ SnapTranslator.dict.es = {
's\u00F3lo mirar izquierda/derecha',
// new sprite button:
- 'add a new Sprite':
- 'Agregar un nuevo objeto',
+ 'add a new sprite':
+ 'agregar un nuevo objeto',
// tab help
'costumes tab help':
@@ -605,7 +605,7 @@ SnapTranslator.dict.es = {
'habilitar men\u0075s \nM\u00F3rficos contextuales\n e inspectores,\n\u00A1no f\u0061ciles de utilizar! ',
// project menu
- 'Project Notes...':
+ 'Project notes...':
'Notas del proyecto...',
'New':
'Nuevo',
diff --git a/lang-fr.js b/lang-fr.js
index 15eebb8..d554965 100644
--- a/lang-fr.js
+++ b/lang-fr.js
@@ -243,7 +243,7 @@ SnapTranslator.dict.fr = {
'le lutin reste en position horizontale \nsoit vers la gauche soit vers la droite ',
// new sprite button:
- 'add a new Sprite':
+ 'add a new sprite':
'ajouter un nouveau lutin',
// tab help
@@ -602,7 +602,7 @@ SnapTranslator.dict.fr = {
'activer la fonction morphic',
// project menu
- 'Project Notes...':
+ 'Project notes...':
'Notes du projet...',
'New':
'Nouveau',
diff --git a/lang-it.js b/lang-it.js
index 5b0b1b8..c86a7cc 100644
--- a/lang-it.js
+++ b/lang-it.js
@@ -243,8 +243,8 @@ SnapTranslator.dict.it = {
'voltati solo a destra/sinistra',
// new sprite button:
- 'add a new Sprite':
- 'aggiungi un nuovo Sprite',
+ 'add a new sprite':
+ 'aggiungi un nuovo sprite',
// tab help
'costumes tab help':
@@ -618,7 +618,7 @@ SnapTranslator.dict.it = {
'Abilita i menu contestuali\ndi Morphic e l\'inspector,\n non user-friendly',
// project menu
- 'Project Notes...':
+ 'Project notes...':
'Note di Progetto...',
'New':
'Nuovo',
diff --git a/lang-ja.js b/lang-ja.js
index 06af972..56e1f3b 100755
--- a/lang-ja.js
+++ b/lang-ja.js
@@ -243,7 +243,7 @@ SnapTranslator.dict.ja = {
'左右に反転するだけ',
// new sprite button:
- 'add a new Sprite':
+ 'add a new sprite':
'新しいスプライトを追加する',
// tab help
@@ -616,7 +616,7 @@ SnapTranslator.dict.ja = {
'ユーザーフレンドリーではない\nモーフィックコンテクストメニューと\nインスペクターを有効にする',
// project menu
- 'Project Notes...':
+ 'Project notes...':
'プロジェクトのメモ...',
'New':
'新規',
diff --git a/lang-ja_HIRA.js b/lang-ja_HIRA.js
index 0bf8596..d42ecfb 100755
--- a/lang-ja_HIRA.js
+++ b/lang-ja_HIRA.js
@@ -243,7 +243,7 @@ SnapTranslator.dict.ja_HIRA = {
'さゆうにはんてんするだけ',
// new sprite button:
- 'add a new Sprite':
+ 'add a new sprite':
'あたらしいスプライトをついかする',
// tab help
@@ -616,7 +616,7 @@ SnapTranslator.dict.ja_HIRA = {
'ユーザーフレンドリーではない\nモーフィックコンテクストメニューと\nインスペクターをゆうこうにする',
// project menu
- 'Project Notes...':
+ 'Project notes...':
'プロジェクトのメモ...',
'New':
'しんき',
diff --git a/lang-ko.js b/lang-ko.js
index 1c0f747..955d30b 100644
--- a/lang-ko.js
+++ b/lang-ko.js
@@ -243,7 +243,7 @@ SnapTranslator.dict.ko = {
'왼쪽에서 오른쪽으로만',
// new sprite button:
- 'add a new Sprite':
+ 'add a new sprite':
'새로운 스프라이트 추가',
// tab help
@@ -602,7 +602,7 @@ SnapTranslator.dict.ko = {
'모픽 컨텍스트 메뉴와 인스펙터를 사용할 수 있으나, 사용자 친화적이지 않습니다!',
// project menu
- 'Project Notes...':
+ 'Project notes...':
'프로젝트 메모...',
'New':
'새로 만들기',
diff --git a/lang-pt.js b/lang-pt.js
index 47e47a0..b964a7c 100755
--- a/lang-pt.js
+++ b/lang-pt.js
@@ -243,8 +243,8 @@ SnapTranslator.dict.pt = {
'olha apenas para a esquerda ou para a direita',
// botão de criação de novo actor:
- 'add a new Sprite':
- 'adicionar um novo Actor',
+ 'add a new sprite':
+ 'adicionar um novo actor',
// ajuda nos tabuladores
'costumes tab help':
@@ -623,7 +623,7 @@ SnapTranslator.dict.pt = {
'Activar menus de contexto\ne inspectores não\namigáveis do Morphic!',
// menu de projecto
- 'Project Notes...':
+ 'Project notes...':
'Notas deste projecto…',
'New':
'Criar um novo projecto',
diff --git a/lang-ru.js b/lang-ru.js
index f3ad6a2..fc334b6 100644
--- a/lang-ru.js
+++ b/lang-ru.js
@@ -239,7 +239,7 @@ SnapTranslator.dict.ru = {
'вращаемый только слева направо',
// new sprite button:
- 'add a new Sprite':
+ 'add a new sprite':
'Добавить новый Образ',
// tab help
@@ -599,7 +599,7 @@ SnapTranslator.dict.ru = {
'включить Morphic\nконтекст меню',
// project menu
- 'Project Notes...':
+ 'Project notes...':
'Проектные Записки...',
'New':
'Новый проект',
diff --git a/lang-si.js b/lang-si.js
index dbe290a..d5fa36f 100644
--- a/lang-si.js
+++ b/lang-si.js
@@ -245,7 +245,7 @@ SnapTranslator.dict.si = {
'lahko obrnemo le levo/desno',
// new sprite button:
- 'add a new Sprite':
+ 'add a new sprite':
'dodaj nov objekt',
// tab help
@@ -594,7 +594,7 @@ SnapTranslator.dict.si = {
'omogo\u010Di Morphic menuje in in\u0161pektorje, \ni uporabniku prijazno',
// project menu
- 'Project Notes...':
+ 'Project notes...':
'Opis projekta...',
'New':
'Nov',
diff --git a/lang-zh.js b/lang-zh.js
index 9e2a8a8..b4d75b8 100644
--- a/lang-zh.js
+++ b/lang-zh.js
@@ -244,7 +244,7 @@ SnapTranslator.dict.zh = {
'只能水平翻转',
// new sprite button:
- 'add a new Sprite':
+ 'add a new sprite':
'新建角色',
// tab help
@@ -620,7 +620,7 @@ SnapTranslator.dict.zh = {
// project menu
- 'Project Notes...':
+ 'Project notes...':
'项目说明...',
'New':
'新建',