fix removed commands

pull/68/head
Michael Aschauer 2018-10-31 23:16:38 +01:00
rodzic ec5ec2205f
commit effdb04440
2 zmienionych plików z 16 dodań i 12 usunięć

Wyświetl plik

@ -57,15 +57,15 @@ SymbolMorph.prototype.drawSymbolZoomToFit = function (canvas, color) {
ctx.strokeStyle = color.toString(); ctx.strokeStyle = color.toString();
ctx.lineWidth = 1.5; ctx.lineWidth = 1.5;
ctx.moveTo(0, 0); ctx.moveTo(0, 0);
ctx.lineTo(w, 0); ctx.lineTo(w, 0);
ctx.stroke(); ctx.stroke();
ctx.moveTo(0, 0); ctx.moveTo(0, 0);
ctx.lineTo(0, w); ctx.lineTo(0, w);
ctx.stroke(); ctx.stroke();
ctx.moveTo(0, h); ctx.moveTo(0, h);
ctx.lineTo(0, h - w); ctx.lineTo(0, h - w);
ctx.stroke(); ctx.stroke();
@ -79,13 +79,13 @@ SymbolMorph.prototype.drawSymbolZoomToFit = function (canvas, color) {
ctx.moveTo(h, 0); ctx.moveTo(h, 0);
ctx.lineTo(h, w); ctx.lineTo(h, w);
ctx.stroke(); ctx.stroke();
ctx.moveTo(h, h); ctx.moveTo(h, h);
ctx.lineTo(h - w, h); ctx.lineTo(h - w, h);
ctx.stroke(); ctx.stroke();
ctx.moveTo(h, h); ctx.moveTo(h, h);
ctx.lineTo(h, h - w); ctx.lineTo(h, h - w);
ctx.stroke(); ctx.stroke();
return canvas; return canvas;
}; };

Wyświetl plik

@ -2008,16 +2008,17 @@ SpriteMorph.prototype.initBlocks = function () {
{ {
type: 'command', type: 'command',
spec: 'zoom to fit', spec: 'zoom to fit',
category: 'sensing' category: 'other'
}; };
this.blocks.reportPi = { this.blocks.reportPi = {
type: 'reporter', type: 'reporter',
category: 'operators', category: 'operators',
spec: 'PI', spec: 'PI',
}; };
}; };
SpriteMorph.prototype.initBlocks();
// SpriteMorph block templates // SpriteMorph block templates
@ -2248,6 +2249,9 @@ SpriteMorph.prototype.blockTemplates = function (category) {
blocks.push(block('tieStitch')); blocks.push(block('tieStitch'));
blocks.push('-'); blocks.push('-');
} else if (cat === 'other') {
blocks.push(block('zoomToFit'));
} else if (cat === 'colors') { } else if (cat === 'colors') {
blocks.push(block('setColor')); blocks.push(block('setColor'));
blocks.push('-'); blocks.push('-');
@ -2360,7 +2364,7 @@ SpriteMorph.prototype.blockTemplates = function (category) {
blocks.push('-'); blocks.push('-');
blocks.push(block('reportDate')); blocks.push(block('reportDate'));
blocks.push('-'); blocks.push('-');
blocks.push(block('zoomToFit'));
// for debugging: /////////////// // for debugging: ///////////////