tweaked a bunch of comments

pull/95/head
jmoenig 2020-04-17 16:07:10 +02:00
rodzic a6170a30cd
commit 314a0414b7
1 zmienionych plików z 7 dodań i 4 usunięć

Wyświetl plik

@ -3635,7 +3635,11 @@ Morph.prototype.removeShadow = function () {
Morph.prototype.penTrails = function () { Morph.prototype.penTrails = function () {
// answer my pen trails canvas. default is to answer my image // answer my pen trails canvas. default is to answer my image
return this.getImage(); // +++ review this // NOTE: clients calling this also want to make sure the
// obtained canvas will be around at the next display cycle,
// so they might also wish to set the receiver's "isCachingImage"
// property to "true".
return this.getImage();
}; };
// Morph updating: // Morph updating:
@ -5463,7 +5467,6 @@ CursorMorph.prototype.processKeyDown = function (event) {
} }
if (keyName === 'Tab' || keyName === 'U+0009') { if (keyName === 'Tab' || keyName === 'U+0009') {
// +++ to do: refactor to use a CASE statement here
if (shift) { if (shift) {
this.target.backTab(this.target); this.target.backTab(this.target);
} else { } else {
@ -5480,13 +5483,13 @@ CursorMorph.prototype.processKeyDown = function (event) {
if (keyName === 'ArrowDown') { if (keyName === 'ArrowDown') {
dest = this.target.downFrom(this.slot); dest = this.target.downFrom(this.slot);
this.textarea.setSelectionRange(dest, dest); this.textarea.setSelectionRange(dest, dest);
// +++ to do: allow holding shift to select // to do: allow holding shift to select
event.preventDefault(); event.preventDefault();
} }
if (keyName === 'ArrowUp') { if (keyName === 'ArrowUp') {
dest = this.target.upFrom(this.slot); dest = this.target.upFrom(this.slot);
this.textarea.setSelectionRange(dest, dest); this.textarea.setSelectionRange(dest, dest);
// +++ to do: allow holding shift to select // to do: allow holding shift to select
event.preventDefault(); event.preventDefault();
} }
this.target.escalateEvent('reactToKeystroke', event); this.target.escalateEvent('reactToKeystroke', event);