kopia lustrzana https://github.com/backface/turtlestitch
Correct the distance to mouse-pointer block.
Correct the distance to mouse-pointer block.pull/97/head
rodzic
ce9dc47f4f
commit
6b6e56bba4
|
@ -55,3 +55,14 @@ Process.prototype.reportPi = function (min, max) {
|
|||
Process.prototype.reportProxiedURL = function (url) {
|
||||
return this.reportURL(this.proxy + '/' + url);
|
||||
};
|
||||
|
||||
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()));
|
||||
} else {
|
||||
return this.origReportDistanceTo(name);
|
||||
}
|
||||
};
|
||||
|
|
Ładowanie…
Reference in New Issue