diff --git a/src/color/GradientColor.js b/src/color/GradientColor.js index d3afb722..0c463905 100644 --- a/src/color/GradientColor.js +++ b/src/color/GradientColor.js @@ -57,7 +57,7 @@ var GradientColor = this.GradientColor = Color.extend({ }, setOrigin: function(origin) { - // PORT: add clone to Scriptographer + // PORT: Add clone to Scriptographer origin = Point.read(arguments).clone(); this._origin = origin; if (this._destination) @@ -76,7 +76,7 @@ var GradientColor = this.GradientColor = Color.extend({ }, setDestination: function(destination) { - // PORT: add clone to Scriptographer + // PORT: Add clone to Scriptographer destination = Point.read(arguments).clone(); this._destination = destination; this._radius = this._destination.getDistance(this._origin); @@ -94,7 +94,7 @@ var GradientColor = this.GradientColor = Color.extend({ }, setHilite: function(hilite) { - // PORT: add clone to Scriptographer + // PORT: Add clone to Scriptographer hilite = Point.read(arguments).clone(); var vector = hilite.subtract(this._origin); if (vector.getLength() > this._radius) { diff --git a/src/item/PathStyle.js b/src/item/PathStyle.js index 6242f5a9..0c56f564 100644 --- a/src/item/PathStyle.js +++ b/src/item/PathStyle.js @@ -125,7 +125,8 @@ var PathStyle = this.PathStyle = Base.extend(new function() { && style.equals(childStyle))) { // If there is another item with a different style, // the style is not defined: - // PORT: Change this in Sg (currently returns null) + // PORT: Change this in Scriptographer + // (currently returns null) return undefined; } } diff --git a/src/path/Curve.js b/src/path/Curve.js index ccff2e60..7f90e81f 100644 --- a/src/path/Curve.js +++ b/src/path/Curve.js @@ -241,7 +241,7 @@ var Curve = this.Curve = Base.extend({ && this._segment2._handleIn.isZero(); }, - // PORT: Add support for start parameter to Sg + // PORT: Add support for start parameter to Scriptographer // DOCS: document Curve#getParameter(length, start) /** * @param {Number} length @@ -328,7 +328,7 @@ var Curve = this.Curve = Base.extend({ x, y; // Handle special case at beginning / end of curve - // PORT: Change in Sg too, so 0.000000000001 won't be + // PORT: Change in Scriptographer too, so 0.000000000001 won't be // required anymore if (t == 0 || t == 1) { var point; diff --git a/src/path/Path.js b/src/path/Path.js index 214955d5..1b1aec1b 100644 --- a/src/path/Path.js +++ b/src/path/Path.js @@ -275,7 +275,7 @@ var Path = this.Path = PathItem.extend({ this._project._selectItem(this, count == 1); }, - // PORT: Add support for adding multiple segments at once to Sg + // 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 segment list of this path. @@ -293,7 +293,7 @@ var Path = this.Path = PathItem.extend({ : this._add([ Segment.read(arguments) ])[0]; }, - // PORT: Add support for adding multiple segments at once to Sg + // 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. @@ -311,17 +311,17 @@ var Path = this.Path = PathItem.extend({ : this._add([ Segment.read(arguments, 1) ], index)[0]; }, - // PORT: Add to Sg + // PORT: Add to Scriptographer addSegment: function(segment) { return this._add([ Segment.read(arguments) ])[0]; }, - // PORT: Add to Sg + // PORT: Add to Scriptographer insertSegment: function(index, segment) { return this._add([ Segment.read(arguments, 1) ], index)[0]; }, - // PORT: Add to Sg + // 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. @@ -340,7 +340,7 @@ var Path = this.Path = PathItem.extend({ return this._add(Segment.readAll(segments)); }, - // PORT: Add to Sg + // PORT: Add to Scriptographer /** * Inserts an array of segments at a given index in the path's * {@link #segments} array. @@ -355,7 +355,7 @@ var Path = this.Path = PathItem.extend({ return this._add(Segment.readAll(segments), index); }, - // PORT: Add to Sg + // PORT: Add to Scriptographer /** * Removes the segment at the specified index of the path's * {@link #segments} array. @@ -368,7 +368,7 @@ var Path = this.Path = PathItem.extend({ return segments[0] || null; }, - // PORT: Add to Sg + // PORT: Add to Scriptographer /** * Removes the segments from the specified 'from' index to the specified * 'to' index from the path's {@link #segments} array. @@ -592,7 +592,7 @@ var Path = this.Path = PathItem.extend({ }, // TODO: getLocationAt(point, precision) - // PORT: Rename functions and add new isParameter argument in Sg + // PORT: Rename functions and add new isParameter argument in Scriptographer // DOCS: document Path#getLocationAt /** * @param {Number} offset diff --git a/src/ui/Event.js b/src/ui/Event.js index f05b6242..c4f74033 100644 --- a/src/ui/Event.js +++ b/src/ui/Event.js @@ -21,7 +21,7 @@ var Event = this.Event = Base.extend({ this.event = event; }, - // PORT: Add to Sg + // PORT: Add to Scriptographer preventDefault: function() { DomEvent.preventDefault(this.event); }, diff --git a/src/ui/Key.js b/src/ui/Key.js index d206e062..909a25cf 100644 --- a/src/ui/Key.js +++ b/src/ui/Key.js @@ -14,10 +14,6 @@ * All rights reserved. */ -/** - * @namespace - * @name Key - */ var Key = this.Key = new function() { // TODO: make sure the keys are called the same as in Scriptographer // Missing: tab, cancel, clear, page-down, page-up, comma, minus, period, @@ -76,7 +72,7 @@ var Key = this.Key = new function() { // Call the onKeyDown or onKeyUp handler if present // When the handler function returns false, prevent the // default behaviour of the key event: - // PORT: Add to Sg + // PORT: Add to Scriptographer var keyEvent = new KeyEvent(down, key, character, event); if (tool[handler](keyEvent) === false) keyEvent.preventDefault(); @@ -131,25 +127,8 @@ var Key = this.Key = new function() { }); return { - /** @lends Key */ - modifiers: modifiers, - /** - * Checks whether the specified key is pressed. - * - * @example - * function onMouseDown(event) { - * if(Key.isDown('shift')) { - * console.log('The shift key is currently pressed.') - * } - * } - * - * @param {String} key One of: 'backspace', 'enter', 'shift', 'control', - * 'option', 'pause', 'caps-lock', 'escape', 'space', 'end', 'home', - * 'left', 'up', 'right', 'down', 'delete', 'command' - * @return {boolean} {@true if the key is pressed} - */ isDown: function(key) { return !!keyMap[key]; }