mirror of
https://github.com/scratchfoundation/scratch-paint.git
synced 2024-12-22 21:42:30 -05:00
fix lint
This commit is contained in:
parent
cf19fc556f
commit
c228a191cb
1 changed files with 5 additions and 5 deletions
|
@ -59,18 +59,18 @@ class LineMode extends React.Component {
|
||||||
|
|
||||||
const lineMode = this;
|
const lineMode = this;
|
||||||
this.tool.onMouseDown = function (event) {
|
this.tool.onMouseDown = function (event) {
|
||||||
if (event.event.button > 0) return; // only first mouse button
|
if (event.event.button > 0) return; // only first mouse button
|
||||||
lineMode.onMouseDown(event);
|
lineMode.onMouseDown(event);
|
||||||
};
|
};
|
||||||
this.tool.onMouseMove = function (event) {
|
this.tool.onMouseMove = function (event) {
|
||||||
lineMode.onMouseMove(event);
|
lineMode.onMouseMove(event);
|
||||||
};
|
};
|
||||||
this.tool.onMouseDrag = function (event) {
|
this.tool.onMouseDrag = function (event) {
|
||||||
if (event.event.button > 0) return; // only first mouse button
|
if (event.event.button > 0) return; // only first mouse button
|
||||||
lineMode.onMouseDrag(event);
|
lineMode.onMouseDrag(event);
|
||||||
};
|
};
|
||||||
this.tool.onMouseUp = function (event) {
|
this.tool.onMouseUp = function (event) {
|
||||||
if (event.event.button > 0) return; // only first mouse button
|
if (event.event.button > 0) return; // only first mouse button
|
||||||
lineMode.onMouseUp(event);
|
lineMode.onMouseUp(event);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -187,8 +187,8 @@ class LineMode extends React.Component {
|
||||||
// TODO don't erase the line if both ends are snapped to different points
|
// TODO don't erase the line if both ends are snapped to different points
|
||||||
return;
|
return;
|
||||||
} else if (
|
} else if (
|
||||||
this.path.lastSegment.point.getDistance(this.path.segments[this.path.segments.length - 2].point, true) <
|
this.path.lastSegment.point.getDistance(this.path.segments[this.path.segments.length - 2].point, true) <
|
||||||
this.toleranceSquared()) {
|
this.toleranceSquared()) {
|
||||||
this.path.removeSegment(this.path.segments.length - 1);
|
this.path.removeSegment(this.path.segments.length - 1);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue