modify derive

This commit is contained in:
kekee000 2015-01-14 18:28:24 +08:00
parent d5c91fbdf1
commit 27f24b4337
2 changed files with 8 additions and 10 deletions

View File

@ -292,14 +292,13 @@ define(
*/
Setting.derive = function (proto) {
function Class() {
function SubSetting() {
Setting.apply(this, arguments);
}
lang.extend(Class.prototype, Setting.prototype, proto);
Class.prototype.constructor = Setting;
return Class;
SubSetting.prototype = proto;
lang.inherits(SubSetting, Setting);
return SubSetting;
};
return Setting;

View File

@ -131,14 +131,13 @@ define(
*/
Shape.derive = function (prototype) {
function Constructor() {
function SubShape() {
Shape.apply(this, arguments);
}
Constructor.constructor = Shape;
lang.extend(Constructor.prototype, Shape.prototype, prototype);
return Constructor;
SubShape.prototype = prototype;
lang.inherits(SubShape, Shape);
return SubShape;
};
/**