Use a version of Bootstrap that always produces beans and remove all beans: true instructions.

This commit is contained in:
Jürg Lehni 2011-06-17 18:42:29 +01:00
parent 7bd571de17
commit 3226147e00
28 changed files with 6 additions and 66 deletions

4
lib/bootstrap.js vendored
View file

@ -14,7 +14,7 @@
var Base = new function() { // Bootstrap scope var Base = new function() { // Bootstrap scope
// Fix __proto__ for browsers where it is not implemented (IE and Opera). // Fix __proto__ for browsers where it is not implemented (IE and Opera).
var fix = !this.__proto__, 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, proto = Object.prototype,
/** /**
* Private function that checks if an object contains a given property. * 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. // Iterate through all definitions in src now and call field() for each.
if (src) { if (src) {
beans = src.beans && []; beans = [];
for (var name in src) for (var name in src)
if (has.call(src, name) && !hidden.test(name)) if (has.call(src, name) && !hidden.test(name))
field(name, null, true, generics); field(name, null, true, generics);

View file

@ -22,8 +22,6 @@
var Matrix = this.Matrix = Base.extend({ var Matrix = this.Matrix = Base.extend({
/** @lends Matrix# */ /** @lends Matrix# */
beans: true,
/** /**
* Creates a 2D affine transform. * Creates a 2D affine transform.
* *
@ -609,5 +607,5 @@ var Matrix = this.Matrix = Base.extend({
this['set' + name] = function(value) { this['set' + name] = function(value) {
this[prop] = value; this[prop] = value;
}; };
}, { beans: true }); }, {});
}); });

View file

@ -17,8 +17,6 @@
var Point = this.Point = Base.extend({ var Point = this.Point = Base.extend({
/** @lends Point# */ /** @lends Point# */
beans: true,
/** /**
* Creates a Point object with the given x and y coordinates. * Creates a Point object with the given x and y coordinates.
* *
@ -919,8 +917,6 @@ var Point = this.Point = Base.extend({
* @ignore * @ignore
*/ */
var LinkedPoint = Point.extend({ var LinkedPoint = Point.extend({
beans: true,
set: function(x, y, dontNotify) { set: function(x, y, dontNotify) {
this._x = x; this._x = x;
this._y = y; this._y = y;

View file

@ -17,8 +17,6 @@
var Rectangle = this.Rectangle = Base.extend({ var Rectangle = this.Rectangle = Base.extend({
/** @lends Rectangle# */ /** @lends Rectangle# */
beans: true,
/** /**
* Creates a Rectangle object. * Creates a Rectangle object.
* *
@ -649,7 +647,7 @@ var Rectangle = this.Rectangle = Base.extend({
// Note: call chaining happens here. // Note: call chaining happens here.
return this[setX](point.x)[setY](point.y); return this[setX](point.x)[setY](point.y);
}; };
}, { beans: true }); }, {});
}); });
/** /**
@ -661,8 +659,6 @@ var Rectangle = this.Rectangle = Base.extend({
* @ignore * @ignore
*/ */
var LinkedRectangle = Rectangle.extend({ var LinkedRectangle = Rectangle.extend({
beans: true,
set: function(x, y, width, height, dontNotify) { set: function(x, y, width, height, dontNotify) {
this._x = x; this._x = x;
this._y = y; this._y = y;
@ -722,6 +718,6 @@ var LinkedRectangle = Rectangle.extend({
this._owner[this._setter](this); this._owner[this._setter](this);
return this; return this;
}; };
}, { beans: true }) }, {})
); );
}); });

View file

@ -502,8 +502,6 @@ var Size = this.Size = Base.extend({
* @ignore * @ignore
*/ */
var LinkedSize = Size.extend({ var LinkedSize = Size.extend({
beans: true,
set: function(width, height, dontNotify) { set: function(width, height, dontNotify) {
this._width = width; this._width = width;
this._height = height; this._height = height;

View file

@ -307,8 +307,6 @@ var Color = this.Color = Base.extend(new function() {
}, { }, {
/** @lends Color# */ /** @lends Color# */
beans: true,
/** /**
* Returns the type of the color as a string. * Returns the type of the color as a string.
* *

View file

@ -17,8 +17,6 @@
var Gradient = this.Gradient = Base.extend({ var Gradient = this.Gradient = Base.extend({
/** @lends Gradient# */ /** @lends Gradient# */
beans: true,
// TODO: Should type here be called 'radial' and have it receive a // TODO: Should type here be called 'radial' and have it receive a
// boolean value? // boolean value?
/** /**

View file

@ -17,8 +17,6 @@
var GradientColor = this.GradientColor = Color.extend({ var GradientColor = this.GradientColor = Color.extend({
/** @lends GradientColor# */ /** @lends GradientColor# */
beans: true,
/** /**
* Creates a gradient color object. * Creates a gradient color object.
* *

View file

@ -18,8 +18,6 @@
var GradientStop = this.GradientStop = Base.extend({ var GradientStop = this.GradientStop = Base.extend({
/** @lends GradientStop# */ /** @lends GradientStop# */
beans: true,
/** /**
* Creates a GradientStop object. * Creates a GradientStop object.
* *

View file

@ -17,8 +17,6 @@
var Group = this.Group = Item.extend({ var Group = this.Group = Item.extend({
/** @lends Group# */ /** @lends Group# */
beans: true,
// DOCS: document new Group(item, item...); // DOCS: document new Group(item, item...);
/** /**
* Creates a new Group item and places it at the top of the active layer. * Creates a new Group item and places it at the top of the active layer.

View file

@ -17,8 +17,6 @@
var Item = this.Item = Base.extend({ var Item = this.Item = Base.extend({
/** @lends Item# */ /** @lends Item# */
beans: true,
/** /**
* @name Item * @name Item
* @class The Item type allows you to access and modify the items in * @class The Item type allows you to access and modify the items in

View file

@ -33,8 +33,6 @@ var PathStyle = this.PathStyle = Base.extend(new function() {
}; };
var fields = { var fields = {
beans: true,
// DOCS: why isn't the example code showing up? // DOCS: why isn't the example code showing up?
/** /**
* PathStyle objects don't need to be created directly. Just pass an * 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() { this[get] = function() {
return this._style[get](); return this._style[get]();
}; };
}, { beans: true })); }, {}));
return fields; return fields;
}); });

View file

@ -17,8 +17,6 @@
var PlacedSymbol = this.PlacedSymbol = Item.extend({ var PlacedSymbol = this.PlacedSymbol = Item.extend({
/** @lends PlacedSymbol# */ /** @lends PlacedSymbol# */
beans: true,
/** /**
* Creates a new PlacedSymbol Item. * Creates a new PlacedSymbol Item.
* *

View file

@ -17,8 +17,6 @@
var Raster = this.Raster = Item.extend({ var Raster = this.Raster = Item.extend({
/** @lends Raster# */ /** @lends Raster# */
beans: true,
// TODO: Implement url / type, width, height. // TODO: Implement url / type, width, height.
// TODO: Have PlacedSymbol & Raster inherit from a shared class? // TODO: Have PlacedSymbol & Raster inherit from a shared class?
// DOCS: Document Raster constructor. // DOCS: Document Raster constructor.

View file

@ -17,8 +17,6 @@
var Curve = this.Curve = Base.extend({ var Curve = this.Curve = Base.extend({
/** @lends Curve# */ /** @lends Curve# */
beans: true,
/** /**
* Creates a new curve object. * Creates a new curve object.
* *

View file

@ -17,8 +17,6 @@
CurveLocation = Base.extend({ CurveLocation = Base.extend({
/** @lends CurveLocation# */ /** @lends CurveLocation# */
beans: true,
// DOCS: CurveLocation class description: add this comment back when the // DOCS: CurveLocation class description: add this comment back when the
// mentioned functioned have been added: // mentioned functioned have been added:
// The class is in use in many places, such as {@link Path#getLocationAt(offset)}, // The class is in use in many places, such as {@link Path#getLocationAt(offset)},

View file

@ -17,8 +17,6 @@
var Path = this.Path = PathItem.extend({ var Path = this.Path = PathItem.extend({
/** @lends Path# */ /** @lends Path# */
beans: true,
/** /**
* Creates a new Path item and places it at the top of the active layer. * 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 { return {
beans: true,
/** /**
* The bounding rectangle of the item excluding stroke width. * The bounding rectangle of the item excluding stroke width.
* @param matrix optional * @param matrix optional

View file

@ -17,8 +17,6 @@
var Segment = this.Segment = Base.extend({ var Segment = this.Segment = Base.extend({
/** @lends Segment# */ /** @lends Segment# */
beans: true,
/** /**
* Creates a new Segment object. * Creates a new Segment object.
* *

View file

@ -21,8 +21,6 @@
* @ignore * @ignore
*/ */
var SegmentPoint = Point.extend({ var SegmentPoint = Point.extend({
beans: true,
set: function(x, y) { set: function(x, y) {
this._x = x; this._x = x;
this._y = y; this._y = y;

View file

@ -17,8 +17,6 @@
var Project = this.Project = Base.extend({ var Project = this.Project = Base.extend({
/** @lends Project# */ /** @lends Project# */
beans: true,
// TODO: Add arguments to define pages // TODO: Add arguments to define pages
// DOCS: Document Project constructor and class // DOCS: Document Project constructor and class
/** /**

View file

@ -17,8 +17,6 @@
var Symbol = this.Symbol = Base.extend({ var Symbol = this.Symbol = Base.extend({
/** @lends Symbol# */ /** @lends Symbol# */
beans: true,
/** /**
* Creates a Symbol item. * Creates a Symbol item.
* *

View file

@ -17,8 +17,6 @@
var PointText = this.PointText = TextItem.extend({ var PointText = this.PointText = TextItem.extend({
/** @lends PointText# */ /** @lends PointText# */
beans: true,
/** /**
* Creates a point text item * Creates a point text item
* *

View file

@ -17,8 +17,6 @@
var TextItem = this.TextItem = Item.extend({ var TextItem = this.TextItem = Item.extend({
/** @lends TextItem# */ /** @lends TextItem# */
beans: true,
/** /**
* @constructs TextItem * @constructs TextItem
* *

View file

@ -17,8 +17,6 @@
var Tool = this.Tool = Base.extend({ var Tool = this.Tool = Base.extend({
/** @lends Tool# */ /** @lends Tool# */
beans: true,
// DOCS: rewrite Tool constructor explanation // DOCS: rewrite Tool constructor explanation
/** /**
* Initializes the tool's settings, so a new tool can be assigned to it * Initializes the tool's settings, so a new tool can be assigned to it

View file

@ -17,8 +17,6 @@
var ToolEvent = this.ToolEvent = Event.extend({ var ToolEvent = this.ToolEvent = Event.extend({
/** @lends ToolEvent# */ /** @lends ToolEvent# */
beans: true,
/** /**
* @name ToolEvent * @name ToolEvent
* @constructor * @constructor

View file

@ -15,8 +15,6 @@
*/ */
var Event = this.Event = Base.extend({ var Event = this.Event = Base.extend({
beans: true,
initialize: function(event) { initialize: function(event) {
this.event = event; this.event = event;
}, },

View file

@ -18,8 +18,6 @@ var KeyEvent = this.KeyEvent = Event.extend(new function() {
return { return {
/** @lends KeyEvent# */ /** @lends KeyEvent# */
beans: true,
/** /**
* @name KeyEvent * @name KeyEvent
* @constructor * @constructor

View file

@ -17,8 +17,6 @@
var View = this.View = Base.extend({ var View = this.View = Base.extend({
/** @lends View# */ /** @lends View# */
beans: true,
// DOCS: View: there is alot left to document // DOCS: View: there is alot left to document
// TODO: Add bounds parameter that defines position within canvas? // TODO: Add bounds parameter that defines position within canvas?
// Find a good name for these bounds, since #bounds is already the artboard // Find a good name for these bounds, since #bounds is already the artboard