fix illegal char and missing bracket

pull/100/head
Michael 2021-08-28 13:04:28 +02:00
rodzic 16d313c247
commit 3058111f9a
2 zmienionych plików z 9 dodań i 5 usunięć

Wyświetl plik

@ -3093,7 +3093,8 @@ StageMorph.prototype.userMenu = function () {
StageMorph.prototype.toggleIgnoreWarnings = function () {
StageMorph.prototype.ignoreWarnings = !StageMorph.prototype.ignoreWarnings;
this.turtleShepherd.ignoreWarning = StageMorph.prototype.ignoreWarnings;
}
};
StageMorph.prototype.reportX = function (x) {
return (x - this.center().x)

Wyświetl plik

@ -61,10 +61,11 @@ Process.prototype.origReportDistanceTo = Process.prototype.reportDistanceTo;
Process.prototype.reportDistanceTo = function (name) {
var thisObj = this.blockReceiver();
if (thisObj && this.inputOption(name) === 'mouse-pointer') {
return new Point(thisObj.xPosition(), thisObj.yPosition())
.distanceTo(new Point(this.reportMouseX(), this.reportMouseY()));
return new Point(thisObj.xPosition(), thisObj.yPosition()).distanceTo(new Point(this.reportMouseX(), this.reportMouseY()));
} else {
return this.origReportDistanceTo(name);
}
}
Process.prototype.origDoGotoObject = Process.prototype.doGotoObject;
Process.prototype.doGotoObject = function (name) {
@ -74,8 +75,10 @@ Process.prototype.doGotoObject = function (name) {
if (thisObj && this.inputOption(name) === 'random position') {
stage = thisObj.parentThatIsA(StageMorph);
if (stage) {
thisObj.gotoXY(this.reportBasicRandom(stage.reportX(stage.left()), stage.reportX(stage.right())),
this.reportBasicRandom(stage.reportY(stage.top()), stage.reportY(stage.bottom())));
thisObj.gotoXY(
this.reportBasicRandom(stage.reportX(stage.left()), stage.reportX(stage.right())),
this.reportBasicRandom(stage.reportY(stage.top()), stage.reportY(stage.bottom()))
);
}
} else {
this.origDoGotoObject(name);