-
Notifications
You must be signed in to change notification settings - Fork 262
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
3f4f668
commit d2f983a
Showing
7 changed files
with
51 additions
and
52 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
var AddMoveLine = function (startX, startY, endX, endY) { | ||
if (!this.moveToTask.hasOwnProperty('nextlines')) { | ||
this.moveToTask.nextlines = []; | ||
} | ||
this.moveToTask.nextlines.push( | ||
[startX, startY, endX, endY] | ||
); | ||
return this; | ||
}; | ||
|
||
export default AddMoveLine; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
var MoveAloneLine = function (startX, startY, endX, endY) { | ||
if (startX !== undefined) { | ||
this.parent.x = startX; | ||
} | ||
if (startY !== undefined) { | ||
this.parent.y = startY; | ||
} | ||
this.moveToTask.moveTo(endX, endY); | ||
return this; | ||
}; | ||
|
||
export default MoveAloneLine; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
import MoveAloneLine from './MoveAloneLine.js'; | ||
|
||
var MoveNextLine = function () { | ||
var nextlines = this.moveToTask.nextlines; | ||
if (!nextlines) { | ||
return false; | ||
} | ||
if (nextlines.length === 0) { | ||
return false; | ||
} | ||
// has next line | ||
MoveAloneLine.apply(this, nextlines[0]); | ||
nextlines.length = 0; | ||
return true; | ||
} | ||
|
||
export default MoveNextLine; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
import MoveToTask from '../../../behaviors/moveto/MoveTo.js'; | ||
export default MoveToTask; |