mirror of
https://github.com/scratchfoundation/paper.js.git
synced 2025-01-07 13:22:07 -05:00
Remove debug logging for Segment / Curve insertion, deletion and splitting.
This commit is contained in:
parent
f09bc84a12
commit
a5bfa9e5d3
1 changed files with 0 additions and 50 deletions
|
@ -278,10 +278,6 @@ var Path = this.Path = PathItem.extend(/** @lends Path# */{
|
||||||
*/
|
*/
|
||||||
_add: function(segs, index) {
|
_add: function(segs, index) {
|
||||||
// Local short-cuts:
|
// Local short-cuts:
|
||||||
/*#*/ if (options.debug) {
|
|
||||||
var beforeSegments = this._segments.length,
|
|
||||||
beforeCurves = this._curves && this._curves.length;
|
|
||||||
/*#*/ }
|
|
||||||
var segments = this._segments,
|
var segments = this._segments,
|
||||||
curves = this._curves,
|
curves = this._curves,
|
||||||
amount = segs.length,
|
amount = segs.length,
|
||||||
|
@ -337,25 +333,6 @@ var Path = this.Path = PathItem.extend(/** @lends Path# */{
|
||||||
curves.splice(i, 0, Base.create(Curve));
|
curves.splice(i, 0, Base.create(Curve));
|
||||||
// Adjust segments for the curves before and after the removed ones
|
// Adjust segments for the curves before and after the removed ones
|
||||||
this._adjustCurves(from, to);
|
this._adjustCurves(from, to);
|
||||||
/*#*/ if (options.debug) {
|
|
||||||
var count = this._getCurveCount();
|
|
||||||
console.log('add',
|
|
||||||
'id', this._id,
|
|
||||||
'from', from,
|
|
||||||
'to', to,
|
|
||||||
'amount', amount,
|
|
||||||
'start', start,
|
|
||||||
'BEFORE:',
|
|
||||||
'segments', beforeSegments,
|
|
||||||
'curves', beforeCurves,
|
|
||||||
'AFTER:',
|
|
||||||
'segments', segments.length,
|
|
||||||
'curves', this._curves.length,
|
|
||||||
count != this._curves.length ? '(SHOULD BE ' + count + ')' : '',
|
|
||||||
'segs', segs.length,
|
|
||||||
'segs._curves', segs._curves && segs._curves.length
|
|
||||||
);
|
|
||||||
/*#*/ }
|
|
||||||
}
|
}
|
||||||
this._changed(/*#=*/ Change.GEOMETRY);
|
this._changed(/*#=*/ Change.GEOMETRY);
|
||||||
return segs;
|
return segs;
|
||||||
|
@ -599,10 +576,6 @@ var Path = this.Path = PathItem.extend(/** @lends Path# */{
|
||||||
removeSegments: function(from, to/*, includeCurves */) {
|
removeSegments: function(from, to/*, includeCurves */) {
|
||||||
from = from || 0;
|
from = from || 0;
|
||||||
to = Base.pick(to, this._segments.length);
|
to = Base.pick(to, this._segments.length);
|
||||||
/*#*/ if (options.debug) {
|
|
||||||
var beforeSegments = this._segments.length,
|
|
||||||
beforeCurves = this._curves && this._curves.length;
|
|
||||||
/*#*/ }
|
|
||||||
var segments = this._segments,
|
var segments = this._segments,
|
||||||
curves = this._curves,
|
curves = this._curves,
|
||||||
count = segments.length, // segment count before removal
|
count = segments.length, // segment count before removal
|
||||||
|
@ -630,22 +603,6 @@ var Path = this.Path = PathItem.extend(/** @lends Path# */{
|
||||||
// than segments.
|
// than segments.
|
||||||
var index = to == count + (this._closed ? 1 : 0) ? from - 1 : from,
|
var index = to == count + (this._closed ? 1 : 0) ? from - 1 : from,
|
||||||
curves = curves.splice(index, amount);
|
curves = curves.splice(index, amount);
|
||||||
/*#*/ if (options.debug) {
|
|
||||||
console.log('remove',
|
|
||||||
'id', this._id,
|
|
||||||
'from', from,
|
|
||||||
'to', to,
|
|
||||||
'amount', amount,
|
|
||||||
'index', index,
|
|
||||||
'BEFORE:',
|
|
||||||
'segments', beforeSegments,
|
|
||||||
'curves', beforeCurves,
|
|
||||||
'AFTER:',
|
|
||||||
'segments', segments.length,
|
|
||||||
'curves', this._curves.length,
|
|
||||||
'curves removed', curves.length
|
|
||||||
);
|
|
||||||
/*#*/ }
|
|
||||||
// Return the removed curves as well, if we're asked to include
|
// Return the removed curves as well, if we're asked to include
|
||||||
// them, but exclude the first curve, since that's shared with the
|
// them, but exclude the first curve, since that's shared with the
|
||||||
// previous segment and does not connect the returned segments.
|
// previous segment and does not connect the returned segments.
|
||||||
|
@ -866,13 +823,6 @@ var Path = this.Path = PathItem.extend(/** @lends Path# */{
|
||||||
|
|
||||||
// DOCS: split(index, parameter) / split(offset) / split(location)
|
// DOCS: split(index, parameter) / split(offset) / split(location)
|
||||||
split: function(index, parameter) {
|
split: function(index, parameter) {
|
||||||
/*#*/ if (options.debug) {
|
|
||||||
console.log('split',
|
|
||||||
'id:', this._id,
|
|
||||||
'index:', index,
|
|
||||||
'param:', parameter
|
|
||||||
);
|
|
||||||
/*#*/ }
|
|
||||||
if (parameter === null)
|
if (parameter === null)
|
||||||
return;
|
return;
|
||||||
if (arguments.length == 1) {
|
if (arguments.length == 1) {
|
||||||
|
|
Loading…
Reference in a new issue