kopia lustrzana https://github.com/backface/turtlestitch
fix illegal char and missing bracket
rodzic
16d313c247
commit
3058111f9a
|
@ -3093,7 +3093,8 @@ StageMorph.prototype.userMenu = function () {
|
||||||
StageMorph.prototype.toggleIgnoreWarnings = function () {
|
StageMorph.prototype.toggleIgnoreWarnings = function () {
|
||||||
StageMorph.prototype.ignoreWarnings = !StageMorph.prototype.ignoreWarnings;
|
StageMorph.prototype.ignoreWarnings = !StageMorph.prototype.ignoreWarnings;
|
||||||
this.turtleShepherd.ignoreWarning = StageMorph.prototype.ignoreWarnings;
|
this.turtleShepherd.ignoreWarning = StageMorph.prototype.ignoreWarnings;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
StageMorph.prototype.reportX = function (x) {
|
StageMorph.prototype.reportX = function (x) {
|
||||||
return (x - this.center().x)
|
return (x - this.center().x)
|
||||||
|
|
|
@ -61,10 +61,11 @@ Process.prototype.origReportDistanceTo = Process.prototype.reportDistanceTo;
|
||||||
Process.prototype.reportDistanceTo = function (name) {
|
Process.prototype.reportDistanceTo = function (name) {
|
||||||
var thisObj = this.blockReceiver();
|
var thisObj = this.blockReceiver();
|
||||||
if (thisObj && this.inputOption(name) === 'mouse-pointer') {
|
if (thisObj && this.inputOption(name) === 'mouse-pointer') {
|
||||||
return new Point(thisObj.xPosition(), thisObj.yPosition())
|
return new Point(thisObj.xPosition(), thisObj.yPosition()).distanceTo(new Point(this.reportMouseX(), this.reportMouseY()));
|
||||||
.distanceTo(new Point(this.reportMouseX(), this.reportMouseY()));
|
|
||||||
} else {
|
} else {
|
||||||
return this.origReportDistanceTo(name);
|
return this.origReportDistanceTo(name);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
Process.prototype.origDoGotoObject = Process.prototype.doGotoObject;
|
Process.prototype.origDoGotoObject = Process.prototype.doGotoObject;
|
||||||
Process.prototype.doGotoObject = function (name) {
|
Process.prototype.doGotoObject = function (name) {
|
||||||
|
@ -74,8 +75,10 @@ Process.prototype.doGotoObject = function (name) {
|
||||||
if (thisObj && this.inputOption(name) === 'random position') {
|
if (thisObj && this.inputOption(name) === 'random position') {
|
||||||
stage = thisObj.parentThatIsA(StageMorph);
|
stage = thisObj.parentThatIsA(StageMorph);
|
||||||
if (stage) {
|
if (stage) {
|
||||||
thisObj.gotoXY(this.reportBasicRandom(stage.reportX(stage.left()), stage.reportX(stage.right())),
|
thisObj.gotoXY(
|
||||||
this.reportBasicRandom(stage.reportY(stage.top()), stage.reportY(stage.bottom())));
|
this.reportBasicRandom(stage.reportX(stage.left()), stage.reportX(stage.right())),
|
||||||
|
this.reportBasicRandom(stage.reportY(stage.top()), stage.reportY(stage.bottom()))
|
||||||
|
);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
this.origDoGotoObject(name);
|
this.origDoGotoObject(name);
|
||||||
|
|
Ładowanie…
Reference in New Issue