mirror of
https://github.com/scratchfoundation/paper.js.git
synced 2025-01-19 14:10:14 -05:00
Small fix in Segment#linear.
This commit is contained in:
parent
42ab9bbda7
commit
a9618b50f8
2 changed files with 4 additions and 2 deletions
|
@ -565,7 +565,7 @@ statics: {
|
|||
p7x = u * p4x + t * p5x, p7y = u * p4y + t * p5y,
|
||||
// Interpolate from 2 points to 1 point
|
||||
p8x = u * p6x + t * p7x, p8y = u * p6y + t * p7y;
|
||||
// We now have all the values we need to build the subcurves:
|
||||
// We now have all the values we need to build the sub-curves:
|
||||
return [
|
||||
[p1x, p1y, p3x, p3y, p6x, p6y, p8x, p8y], // left
|
||||
[p8x, p8y, p7x, p7y, p5x, p5y, p2x, p2y] // right
|
||||
|
|
|
@ -235,7 +235,7 @@ var Segment = Base.extend(/** @lends Segment# */{
|
|||
* Specifies whether the segment has no handles defined, meaning it connects
|
||||
* two straight lines.
|
||||
*
|
||||
* @type Point
|
||||
* @type Boolean
|
||||
* @bean
|
||||
*/
|
||||
isLinear: function() {
|
||||
|
@ -246,6 +246,8 @@ var Segment = Base.extend(/** @lends Segment# */{
|
|||
if (linear) {
|
||||
this._handleIn.set(0, 0);
|
||||
this._handleOut.set(0, 0);
|
||||
} else {
|
||||
// TODO: smooth() ?
|
||||
}
|
||||
},
|
||||
|
||||
|
|
Loading…
Reference in a new issue