modify derive
This commit is contained in:
parent
d5c91fbdf1
commit
27f24b4337
@ -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;
|
||||
|
@ -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;
|
||||
};
|
||||
|
||||
/**
|
||||
|
Loading…
x
Reference in New Issue
Block a user