Chamilo is a learning management system focused on ease of use and accessibility
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 
chamilo-lms/plugin/mindmap/edit-mindmap/vendor/js/kampfer/class.js

31 lines
680 B

kampfer.provide('Class');
kampfer.Class = function() {};
kampfer.Class.initializing = false;
kampfer.Class.extend = function(props) {
var Class = function() {
if(!kampfer.Class.initializing && this.initializer) {
this.initializer.apply(this, arguments);
}
};
kampfer.Class.initializing = true;
// this === 构造函数。
//能否直接使用this.prototype考虑使用this.prototype。
var prototype = new this();
kampfer.Class.initializing = false;
prototype = kampfer.extend(prototype, props);
Class.prototype = prototype;
Class.prototype.constructor = Class;
Class.superClass = this.prototype;
Class.extend = kampfer.Class.extend;
return Class;
};