Pass ctor.dont to all constructor calls that are followed with explicit initialize() calls afterwards, to make sure it is only called once.

This commit is contained in:
Jürg Lehni 2011-02-20 01:45:53 +01:00
parent a41a762237
commit ed752ed744
5 changed files with 5 additions and 5 deletions
src/basic

View file

@ -283,7 +283,7 @@ Rectangle = Base.extend({
if (length == 1 && args[index] instanceof Rectangle) {
return args[index];
} else if (length != 0) {
var rect = new Rectangle();
var rect = new Rectangle(Rectangle.dont);
rect.initialize.apply(rect, index > 0
? Array.prototype.slice.call(args, index) : args);
return rect;