Remove all PORT comments, since we won't port back features to Scriptographer.

This commit is contained in:
Jürg Lehni 2012-12-25 16:07:48 +01:00
parent b54bdadaff
commit 8f093f6dd7
8 changed files with 2 additions and 27 deletions

View file

@ -133,7 +133,6 @@ var GradientColor = this.GradientColor = Color.extend(/** @lends GradientColor#
},
setOrigin: function(origin) {
// PORT: Add origin cloning to Scriptographer
origin = Point.read(arguments, 0, 0, true); // clone
this._origin = origin;
if (this._destination)
@ -174,7 +173,6 @@ var GradientColor = this.GradientColor = Color.extend(/** @lends GradientColor#
},
setDestination: function(destination) {
// PORT: Add destination cloning to Scriptographer
destination = Point.read(arguments, 0, 0, true); // clone
this._destination = destination;
this._radius = this._destination.getDistance(this._origin);
@ -213,7 +211,6 @@ var GradientColor = this.GradientColor = Color.extend(/** @lends GradientColor#
},
setHilite: function(hilite) {
// PORT: Add hilite cloning to Scriptographer
hilite = Point.read(arguments, 0, 0, true); // clone
var vector = hilite.subtract(this._origin);
if (vector.getLength() > this._radius) {

View file

@ -76,7 +76,6 @@ var Callback = {
Base.each(handlers, function(func) {
// When the handler function returns false, prevent the default
// behaviour of the event by calling stop() on it
// PORT: Add to Sg
if (func.apply(this, args) === false && event && event.stop)
event.stop();
}, this);

View file

@ -1868,8 +1868,6 @@ var Item = this.Item = Base.extend(Callback, /** @lends Item# */{
// storing the actual location / transformation state.
if ((this.applyMatrix || arguments[1])
&& this._applyMatrix(this._matrix))
// TODO: This needs a _changed notification, but the GEOMETRY
// actually doesn't change! What to do?
this._matrix.setIdentity();
// We always need to call _changed since we're caching bounds on all
// items, including Group.
@ -1896,12 +1894,12 @@ var Item = this.Item = Base.extend(Callback, /** @lends Item# */{
// Transform position as well.
this._position = matrix._transformPoint(position, position);
}
// PORT: Return 'this' in all chainable commands
return this;
},
_applyMatrix: function(matrix) {
// Pass on the transformation to the children, and apply it there too:
// Pass on the transformation to the children, and apply it there too,
// by passing true for the 2nd hidden parameter.
if (this._children) {
for (var i = 0, l = this._children.length; i < l; i++)
this._children[i].transform(matrix, true);

View file

@ -262,8 +262,6 @@ var Curve = this.Curve = Base.extend(/** @lends Curve# */{
&& this._segment2._handleIn.isZero();
},
// PORT: Add support for start parameter to Sg
// PORT: Rename #getParameter(length) -> #getParameterAt(offset)
// DOCS: Document #getParameter(length, start)
/**
* @param {Number} offset
@ -410,8 +408,6 @@ var Curve = this.Curve = Base.extend(/** @lends Curve# */{
x, y;
// Handle special case at beginning / end of curve
// PORT: Change in Sg too, so 0.000000000001 won't be
// required anymore
if (type == 0 && (t == 0 || t == 1)) {
x = t == 0 ? p1x : p2x;
y = t == 0 ? p1y : p2y;

View file

@ -329,7 +329,6 @@ var Path = this.Path = PathItem.extend(/** @lends Path# */{
return segs;
},
// PORT: Add support for adding multiple segments at once to Scriptographer
// DOCS: find a way to document the variable segment parameters of Path#add
/**
* Adds one or more segments to the end of the {@link #segments} array of
@ -402,7 +401,6 @@ var Path = this.Path = PathItem.extend(/** @lends Path# */{
: this._add([ Segment.read(arguments) ])[0];
},
// PORT: Add support for adding multiple segments at once to Scriptographer
/**
* Inserts one or more segments at a given index in the list of this path's
* segments.
@ -447,17 +445,14 @@ var Path = this.Path = PathItem.extend(/** @lends Path# */{
: this._add([ Segment.read(arguments, 1) ], index)[0];
},
// PORT: Add to Scriptographer
addSegment: function(segment) {
return this._add([ Segment.read(arguments) ])[0];
},
// PORT: Add to Scriptographer
insertSegment: function(index, segment) {
return this._add([ Segment.read(arguments, 1) ], index)[0];
},
// PORT: Add to Scriptographer
/**
* Adds an array of segments (or types that can be converted to segments)
* to the end of the {@link #segments} array.
@ -501,7 +496,6 @@ var Path = this.Path = PathItem.extend(/** @lends Path# */{
return this._add(Segment.readAll(segments));
},
// PORT: Add to Scriptographer
/**
* Inserts an array of segments at a given index in the path's
* {@link #segments} array.
@ -516,7 +510,6 @@ var Path = this.Path = PathItem.extend(/** @lends Path# */{
return this._add(Segment.readAll(segments), index);
},
// PORT: Add to Scriptographer
/**
* Removes the segment at the specified index of the path's
* {@link #segments} array.
@ -543,7 +536,6 @@ var Path = this.Path = PathItem.extend(/** @lends Path# */{
return segments[0] || null;
},
// PORT: Add to Scriptographer
/**
* Removes all segments from the path's {@link #segments} array.
*
@ -1007,7 +999,6 @@ var Path = this.Path = PathItem.extend(/** @lends Path# */{
return null;
},
// PORT: Rename functions and add new isParameter argument in Scriptographer
// DOCS: document Path#getLocationAt
/**
* {@grouptitle Positions on Paths and Curves}
@ -1749,7 +1740,6 @@ var Path = this.Path = PathItem.extend(/** @lends Path# */{
this.quadraticCurveTo(handle, _to);
},
// PORT: New implementation back to Scriptographer
arcTo: function(to, clockwise /* | through, to */) {
// Get the start point:
var current = getCurrentSegment(this),

View file

@ -117,8 +117,6 @@ var Style = Item.extend({
} else if (!Base.equals(style, childStyle)) {
// If there is another item with a different
// style, the style is not defined:
// PORT: Change this in Scriptographer
// (currently returns null)
return undefined;
}
}

View file

@ -23,7 +23,6 @@ var Event = this.Event = Base.extend(/** @lends Event# */{
this.event = event;
},
// PORT: Add to Scriptographer
preventDefault: function() {
this._prevented = true;
DomEvent.preventDefault(this.event);

View file

@ -599,8 +599,6 @@ var View = this.View = Base.extend(Callback, /** @lends View# */{
if ((curPoint = point || curPoint)
&& tool._onHandleEvent('mousedrag', curPoint, event))
DomEvent.stop(event);
// PORT: If there is only an onMouseMove handler, also call it when
// the user is dragging:
} else if ((!dragging || onlyMove)
&& tool._onHandleEvent('mousemove', point, event)) {
DomEvent.stop(event);