From 8f093f6dd7329bc40c4b1e22638b0a9a200e9410 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=BCrg=20Lehni?= Date: Tue, 25 Dec 2012 16:07:48 +0100 Subject: [PATCH] Remove all PORT comments, since we won't port back features to Scriptographer. --- src/color/GradientColor.js | 3 --- src/core/Callback.js | 1 - src/item/Item.js | 6 ++---- src/path/Curve.js | 4 ---- src/path/Path.js | 10 ---------- src/style/Style.js | 2 -- src/ui/Event.js | 1 - src/ui/View.js | 2 -- 8 files changed, 2 insertions(+), 27 deletions(-) diff --git a/src/color/GradientColor.js b/src/color/GradientColor.js index 76400b85..b1d9a216 100644 --- a/src/color/GradientColor.js +++ b/src/color/GradientColor.js @@ -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) { diff --git a/src/core/Callback.js b/src/core/Callback.js index 107553fe..d5ac1425 100644 --- a/src/core/Callback.js +++ b/src/core/Callback.js @@ -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); diff --git a/src/item/Item.js b/src/item/Item.js index bc027a39..fbd23029 100644 --- a/src/item/Item.js +++ b/src/item/Item.js @@ -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); diff --git a/src/path/Curve.js b/src/path/Curve.js index 29ea4b66..6f9546ef 100644 --- a/src/path/Curve.js +++ b/src/path/Curve.js @@ -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; diff --git a/src/path/Path.js b/src/path/Path.js index a95f5bfa..9fdb762f 100644 --- a/src/path/Path.js +++ b/src/path/Path.js @@ -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), diff --git a/src/style/Style.js b/src/style/Style.js index 9469cc54..47462280 100644 --- a/src/style/Style.js +++ b/src/style/Style.js @@ -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; } } diff --git a/src/ui/Event.js b/src/ui/Event.js index ff80713b..68becea7 100644 --- a/src/ui/Event.js +++ b/src/ui/Event.js @@ -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); diff --git a/src/ui/View.js b/src/ui/View.js index 48990b52..f5126c90 100644 --- a/src/ui/View.js +++ b/src/ui/View.js @@ -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);