From ab87fd5ecafd1628601499932142d5fd4b0af2a1 Mon Sep 17 00:00:00 2001 From: "Paper.js Bot" Date: Thu, 17 Mar 2016 12:39:07 +0000 Subject: [PATCH] Prebuilt module for commit 00b2102b6df1529b4e7e9011dd4c66b55c2db787 --- dist/docs/assets/js/paper.js | 47 ++++++++++++++++++---------------- dist/docs/classes/Point.html | 16 ------------ dist/docs/classes/Segment.html | 2 +- dist/paper-core.js | 47 ++++++++++++++++++---------------- dist/paper-core.min.js | 16 ++++++------ dist/paper-full.js | 47 ++++++++++++++++++---------------- dist/paper-full.min.js | 18 ++++++------- 7 files changed, 93 insertions(+), 100 deletions(-) diff --git a/dist/docs/assets/js/paper.js b/dist/docs/assets/js/paper.js index 12d6de79..10c9c2c2 100644 --- a/dist/docs/assets/js/paper.js +++ b/dist/docs/assets/js/paper.js @@ -9,7 +9,7 @@ * * All rights reserved. * - * Date: Thu Mar 17 13:09:02 2016 +0100 + * Date: Thu Mar 17 13:36:02 2016 +0100 * *** * @@ -3631,7 +3631,7 @@ new function() { } var checkSelf = !(options.guides && !this._guide - || options.selected && !this.isSelected(true) + || options.selected && !this.isSelected() || options.type && options.type !== Base.hyphenate(this._class) || options.class && !(this instanceof options.class)), callback = options.match, @@ -5464,24 +5464,19 @@ var Segment = Base.extend({ } }, - _getSelection: function(point) { - return !point ? 7 - : point === this._point ? 1 - : point === this._handleIn ? 2 - : point === this._handleOut ? 4 - : 0; - }, - - isSelected: function(_point) { - return !!(this._selection & this._getSelection(_point)); - }, - - setSelected: function(selected, _point) { - var selection = this._selection, - flag = this._getSelection(_point); + changeSelection: function(flag, selected) { + var selection = this._selection; this.setSelection(selected ? selection | flag : selection & ~flag); }, + isSelected: function() { + return !!(this._selection & 7); + }, + + setSelected: function(selected) { + this.changeSelection(7, selected); + }, + getIndex: function() { return this._index !== undefined ? this._index : null; }, @@ -5748,12 +5743,20 @@ var SegmentPoint = Point.extend({ return Numerical.isZero(this._x) && Numerical.isZero(this._y); }, - setSelected: function(selected) { - this._owner.setSelected(selected, this); + isSelected: function() { + return !!(this._owner._selection & this._getSelection()); }, - isSelected: function() { - return this._owner.isSelected(this); + setSelected: function(selected) { + this._owner.changeSelection(this._getSelection(), selected); + }, + + _getSelection: function() { + var owner = this._owner; + return this === owner._point ? 1 + : this === owner._handleIn ? 2 + : this === owner._handleOut ? 4 + : 0; } }); @@ -7874,7 +7877,7 @@ var Path = PathItem.extend({ isFullySelected: function() { var length = this._segments.length; - return this.isSelected(true) && length > 0 && this._segmentSelection + return this.isSelected() && length > 0 && this._segmentSelection === length * 7; }, diff --git a/dist/docs/classes/Point.html b/dist/docs/classes/Point.html index 33cebf7f..941c4342 100644 --- a/dist/docs/classes/Point.html +++ b/dist/docs/classes/Point.html @@ -913,22 +913,6 @@ console.log(point.quadrant); // 4 diff --git a/dist/docs/classes/Segment.html b/dist/docs/classes/Segment.html index 13f31352..5ede1cde 100644 --- a/dist/docs/classes/Segment.html +++ b/dist/docs/classes/Segment.html @@ -261,7 +261,7 @@ var path = new Path({