Skip to content

Commit

Permalink
revert
Browse files Browse the repository at this point in the history
  • Loading branch information
techird committed Jun 24, 2014
1 parent 6c47b11 commit f2d0fe9
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions src/core/class.js
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ define(function(require, exports) {
};

Class.prototype.getType = function() {
return this.__KityClassName || this.constructor.name;
return this.__KityClassName;
};

Class.prototype.getClass = function() {
Expand All @@ -91,10 +91,15 @@ define(function(require, exports) {
var KITY_INHERIT_FLAG = '__KITY_INHERIT_FLAG_' + (+new Date());

function inherit(constructor, BaseClass, classname) {
var KityClass = constructor;
var KityClass = eval('(function ' + classname + '( __inherit__flag ) {' +
'if( __inherit__flag != KITY_INHERIT_FLAG ) {' +
'KityClass.__KityConstructor.apply(this, arguments);' +
'}' +
'this.__KityClassName = KityClass.__KityClassName;' +
'})');
KityClass.__KityConstructor = constructor;

KityClass.prototype = Object.create(BaseClass.prototype);
KityClass.prototype = new BaseClass(KITY_INHERIT_FLAG);

for (var methodName in BaseClass.prototype) {
if (BaseClass.prototype.hasOwnProperty(methodName) && methodName.indexOf('__Kity') !== 0) {
Expand Down

0 comments on commit f2d0fe9

Please sign in to comment.