From 3226147e000d7167438e7e0b4ffc2d3a47a8ef81 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=BCrg=20Lehni?= Date: Fri, 17 Jun 2011 18:42:29 +0100 Subject: [PATCH] Use a version of Bootstrap that always produces beans and remove all beans: true instructions. --- lib/bootstrap.js | 4 ++-- src/basic/Matrix.js | 4 +--- src/basic/Point.js | 4 ---- src/basic/Rectangle.js | 8 ++------ src/basic/Size.js | 2 -- src/color/Color.js | 2 -- src/color/Gradient.js | 2 -- src/color/GradientColor.js | 2 -- src/color/GradientStop.js | 2 -- src/item/Group.js | 2 -- src/item/Item.js | 2 -- src/item/PathStyle.js | 4 +--- src/item/PlacedSymbol.js | 2 -- src/item/Raster.js | 2 -- src/path/Curve.js | 2 -- src/path/CurveLocation.js | 2 -- src/path/Path.js | 4 ---- src/path/Segment.js | 2 -- src/path/SegmentPoint.js | 2 -- src/project/Project.js | 2 -- src/project/Symbol.js | 2 -- src/text/PointText.js | 2 -- src/text/TextItem.js | 2 -- src/tool/Tool.js | 2 -- src/tool/ToolEvent.js | 2 -- src/ui/Event.js | 2 -- src/ui/KeyEvent.js | 2 -- src/ui/View.js | 2 -- 28 files changed, 6 insertions(+), 66 deletions(-) diff --git a/lib/bootstrap.js b/lib/bootstrap.js index 627afb3f..c689f6b2 100644 --- a/lib/bootstrap.js +++ b/lib/bootstrap.js @@ -14,7 +14,7 @@ var Base = new function() { // Bootstrap scope // Fix __proto__ for browsers where it is not implemented (IE and Opera). var fix = !this.__proto__, - hidden = /^(statics|generics|preserve|enumerable|beans|prototype|__proto__|toString|valueOf)$/, + hidden = /^(statics|generics|preserve|enumerable|prototype|__proto__|toString|valueOf)$/, proto = Object.prototype, /** * Private function that checks if an object contains a given property. @@ -182,7 +182,7 @@ var Base = new function() { // Bootstrap scope } // Iterate through all definitions in src now and call field() for each. if (src) { - beans = src.beans && []; + beans = []; for (var name in src) if (has.call(src, name) && !hidden.test(name)) field(name, null, true, generics); diff --git a/src/basic/Matrix.js b/src/basic/Matrix.js index abb0cd74..d959fd7c 100644 --- a/src/basic/Matrix.js +++ b/src/basic/Matrix.js @@ -22,8 +22,6 @@ var Matrix = this.Matrix = Base.extend({ /** @lends Matrix# */ - beans: true, - /** * Creates a 2D affine transform. * @@ -609,5 +607,5 @@ var Matrix = this.Matrix = Base.extend({ this['set' + name] = function(value) { this[prop] = value; }; - }, { beans: true }); + }, {}); }); diff --git a/src/basic/Point.js b/src/basic/Point.js index ac819d26..9f5cfcfe 100644 --- a/src/basic/Point.js +++ b/src/basic/Point.js @@ -17,8 +17,6 @@ var Point = this.Point = Base.extend({ /** @lends Point# */ - beans: true, - /** * Creates a Point object with the given x and y coordinates. * @@ -919,8 +917,6 @@ var Point = this.Point = Base.extend({ * @ignore */ var LinkedPoint = Point.extend({ - beans: true, - set: function(x, y, dontNotify) { this._x = x; this._y = y; diff --git a/src/basic/Rectangle.js b/src/basic/Rectangle.js index 7bae8c4a..bbb2d3db 100644 --- a/src/basic/Rectangle.js +++ b/src/basic/Rectangle.js @@ -17,8 +17,6 @@ var Rectangle = this.Rectangle = Base.extend({ /** @lends Rectangle# */ - beans: true, - /** * Creates a Rectangle object. * @@ -649,7 +647,7 @@ var Rectangle = this.Rectangle = Base.extend({ // Note: call chaining happens here. return this[setX](point.x)[setY](point.y); }; - }, { beans: true }); + }, {}); }); /** @@ -661,8 +659,6 @@ var Rectangle = this.Rectangle = Base.extend({ * @ignore */ var LinkedRectangle = Rectangle.extend({ - beans: true, - set: function(x, y, width, height, dontNotify) { this._x = x; this._y = y; @@ -722,6 +718,6 @@ var LinkedRectangle = Rectangle.extend({ this._owner[this._setter](this); return this; }; - }, { beans: true }) + }, {}) ); }); diff --git a/src/basic/Size.js b/src/basic/Size.js index 648f7fa3..816a84b7 100644 --- a/src/basic/Size.js +++ b/src/basic/Size.js @@ -502,8 +502,6 @@ var Size = this.Size = Base.extend({ * @ignore */ var LinkedSize = Size.extend({ - beans: true, - set: function(width, height, dontNotify) { this._width = width; this._height = height; diff --git a/src/color/Color.js b/src/color/Color.js index aae50927..2011fcec 100644 --- a/src/color/Color.js +++ b/src/color/Color.js @@ -307,8 +307,6 @@ var Color = this.Color = Base.extend(new function() { }, { /** @lends Color# */ - beans: true, - /** * Returns the type of the color as a string. * diff --git a/src/color/Gradient.js b/src/color/Gradient.js index 67088f10..f91d99b0 100644 --- a/src/color/Gradient.js +++ b/src/color/Gradient.js @@ -17,8 +17,6 @@ var Gradient = this.Gradient = Base.extend({ /** @lends Gradient# */ - beans: true, - // TODO: Should type here be called 'radial' and have it receive a // boolean value? /** diff --git a/src/color/GradientColor.js b/src/color/GradientColor.js index 428dcc06..accc0a56 100644 --- a/src/color/GradientColor.js +++ b/src/color/GradientColor.js @@ -17,8 +17,6 @@ var GradientColor = this.GradientColor = Color.extend({ /** @lends GradientColor# */ - beans: true, - /** * Creates a gradient color object. * diff --git a/src/color/GradientStop.js b/src/color/GradientStop.js index 48909aff..83d2c9ad 100644 --- a/src/color/GradientStop.js +++ b/src/color/GradientStop.js @@ -18,8 +18,6 @@ var GradientStop = this.GradientStop = Base.extend({ /** @lends GradientStop# */ - beans: true, - /** * Creates a GradientStop object. * diff --git a/src/item/Group.js b/src/item/Group.js index 044aeb72..aae62127 100644 --- a/src/item/Group.js +++ b/src/item/Group.js @@ -17,8 +17,6 @@ var Group = this.Group = Item.extend({ /** @lends Group# */ - beans: true, - // DOCS: document new Group(item, item...); /** * Creates a new Group item and places it at the top of the active layer. diff --git a/src/item/Item.js b/src/item/Item.js index 16a2b7a2..adafec90 100644 --- a/src/item/Item.js +++ b/src/item/Item.js @@ -17,8 +17,6 @@ var Item = this.Item = Base.extend({ /** @lends Item# */ - beans: true, - /** * @name Item * @class The Item type allows you to access and modify the items in diff --git a/src/item/PathStyle.js b/src/item/PathStyle.js index 28ed4bca..96bf495f 100644 --- a/src/item/PathStyle.js +++ b/src/item/PathStyle.js @@ -33,8 +33,6 @@ var PathStyle = this.PathStyle = Base.extend(new function() { }; var fields = { - beans: true, - // DOCS: why isn't the example code showing up? /** * PathStyle objects don't need to be created directly. Just pass an @@ -151,7 +149,7 @@ var PathStyle = this.PathStyle = Base.extend(new function() { this[get] = function() { return this._style[get](); }; - }, { beans: true })); + }, {})); return fields; }); diff --git a/src/item/PlacedSymbol.js b/src/item/PlacedSymbol.js index d6d1455b..92121d72 100644 --- a/src/item/PlacedSymbol.js +++ b/src/item/PlacedSymbol.js @@ -17,8 +17,6 @@ var PlacedSymbol = this.PlacedSymbol = Item.extend({ /** @lends PlacedSymbol# */ - beans: true, - /** * Creates a new PlacedSymbol Item. * diff --git a/src/item/Raster.js b/src/item/Raster.js index 44f31dd3..ee14f1e2 100644 --- a/src/item/Raster.js +++ b/src/item/Raster.js @@ -17,8 +17,6 @@ var Raster = this.Raster = Item.extend({ /** @lends Raster# */ - beans: true, - // TODO: Implement url / type, width, height. // TODO: Have PlacedSymbol & Raster inherit from a shared class? // DOCS: Document Raster constructor. diff --git a/src/path/Curve.js b/src/path/Curve.js index cd3d5c7f..80fb4271 100644 --- a/src/path/Curve.js +++ b/src/path/Curve.js @@ -17,8 +17,6 @@ var Curve = this.Curve = Base.extend({ /** @lends Curve# */ - beans: true, - /** * Creates a new curve object. * diff --git a/src/path/CurveLocation.js b/src/path/CurveLocation.js index c6900db4..4e8b0077 100644 --- a/src/path/CurveLocation.js +++ b/src/path/CurveLocation.js @@ -17,8 +17,6 @@ CurveLocation = Base.extend({ /** @lends CurveLocation# */ - beans: true, - // DOCS: CurveLocation class description: add this comment back when the // mentioned functioned have been added: // The class is in use in many places, such as {@link Path#getLocationAt(offset)}, diff --git a/src/path/Path.js b/src/path/Path.js index 9279b7ed..0ec6d672 100644 --- a/src/path/Path.js +++ b/src/path/Path.js @@ -17,8 +17,6 @@ var Path = this.Path = PathItem.extend({ /** @lends Path# */ - beans: true, - /** * Creates a new Path item and places it at the top of the active layer. * @@ -1760,8 +1758,6 @@ var Path = this.Path = PathItem.extend({ } return { - beans: true, - /** * The bounding rectangle of the item excluding stroke width. * @param matrix optional diff --git a/src/path/Segment.js b/src/path/Segment.js index f8eb05c8..0a99efe2 100644 --- a/src/path/Segment.js +++ b/src/path/Segment.js @@ -17,8 +17,6 @@ var Segment = this.Segment = Base.extend({ /** @lends Segment# */ - beans: true, - /** * Creates a new Segment object. * diff --git a/src/path/SegmentPoint.js b/src/path/SegmentPoint.js index ff19ef96..56678731 100644 --- a/src/path/SegmentPoint.js +++ b/src/path/SegmentPoint.js @@ -21,8 +21,6 @@ * @ignore */ var SegmentPoint = Point.extend({ - beans: true, - set: function(x, y) { this._x = x; this._y = y; diff --git a/src/project/Project.js b/src/project/Project.js index 9e48c02f..94f2c87b 100644 --- a/src/project/Project.js +++ b/src/project/Project.js @@ -17,8 +17,6 @@ var Project = this.Project = Base.extend({ /** @lends Project# */ - beans: true, - // TODO: Add arguments to define pages // DOCS: Document Project constructor and class /** diff --git a/src/project/Symbol.js b/src/project/Symbol.js index 85b11177..73dbcf70 100644 --- a/src/project/Symbol.js +++ b/src/project/Symbol.js @@ -17,8 +17,6 @@ var Symbol = this.Symbol = Base.extend({ /** @lends Symbol# */ - beans: true, - /** * Creates a Symbol item. * diff --git a/src/text/PointText.js b/src/text/PointText.js index b67c8950..3a511730 100644 --- a/src/text/PointText.js +++ b/src/text/PointText.js @@ -17,8 +17,6 @@ var PointText = this.PointText = TextItem.extend({ /** @lends PointText# */ - beans: true, - /** * Creates a point text item * diff --git a/src/text/TextItem.js b/src/text/TextItem.js index ed698f1c..f09e7c72 100644 --- a/src/text/TextItem.js +++ b/src/text/TextItem.js @@ -17,8 +17,6 @@ var TextItem = this.TextItem = Item.extend({ /** @lends TextItem# */ - beans: true, - /** * @constructs TextItem * diff --git a/src/tool/Tool.js b/src/tool/Tool.js index b593c566..2f7b5a55 100644 --- a/src/tool/Tool.js +++ b/src/tool/Tool.js @@ -17,8 +17,6 @@ var Tool = this.Tool = Base.extend({ /** @lends Tool# */ - beans: true, - // DOCS: rewrite Tool constructor explanation /** * Initializes the tool's settings, so a new tool can be assigned to it diff --git a/src/tool/ToolEvent.js b/src/tool/ToolEvent.js index 683328b4..e5c3521e 100644 --- a/src/tool/ToolEvent.js +++ b/src/tool/ToolEvent.js @@ -17,8 +17,6 @@ var ToolEvent = this.ToolEvent = Event.extend({ /** @lends ToolEvent# */ - beans: true, - /** * @name ToolEvent * @constructor diff --git a/src/ui/Event.js b/src/ui/Event.js index aa5acc46..56db28bb 100644 --- a/src/ui/Event.js +++ b/src/ui/Event.js @@ -15,8 +15,6 @@ */ var Event = this.Event = Base.extend({ - beans: true, - initialize: function(event) { this.event = event; }, diff --git a/src/ui/KeyEvent.js b/src/ui/KeyEvent.js index 10c61964..5dfc0979 100644 --- a/src/ui/KeyEvent.js +++ b/src/ui/KeyEvent.js @@ -18,8 +18,6 @@ var KeyEvent = this.KeyEvent = Event.extend(new function() { return { /** @lends KeyEvent# */ - beans: true, - /** * @name KeyEvent * @constructor diff --git a/src/ui/View.js b/src/ui/View.js index 47787edb..1ded75dd 100644 --- a/src/ui/View.js +++ b/src/ui/View.js @@ -17,8 +17,6 @@ var View = this.View = Base.extend({ /** @lends View# */ - beans: true, - // DOCS: View: there is alot left to document // TODO: Add bounds parameter that defines position within canvas? // Find a good name for these bounds, since #bounds is already the artboard