MCPcopy Index your code
hub / github.com/SuperMap/iClient-JavaScript / enableClassExtend

Function enableClassExtend

libs/echarts/echarts.simple.js:12244–12280  ·  view source on GitHub ↗

* @public

(RootClass, mandatoryMethods)

Source from the content-addressed store, hash-verified

12242 * @public
12243 */
12244function enableClassExtend(RootClass, mandatoryMethods) {
12245
12246 RootClass.$constructor = RootClass;
12247 RootClass.extend = function (proto) {
12248
12249 if (__DEV__) {
12250 each$1(mandatoryMethods, function (method) {
12251 if (!proto[method]) {
12252 console.warn(
12253 'Method `' + method + '` should be implemented'
12254 + (proto.type ? ' in ' + proto.type : '') + '.'
12255 );
12256 }
12257 });
12258 }
12259
12260 var superClass = this;
12261 var ExtendedClass = function () {
12262 if (!proto.$constructor) {
12263 superClass.apply(this, arguments);
12264 }
12265 else {
12266 proto.$constructor.apply(this, arguments);
12267 }
12268 };
12269
12270 extend(ExtendedClass.prototype, proto);
12271
12272 ExtendedClass.extend = this.extend;
12273 ExtendedClass.superCall = superCall;
12274 ExtendedClass.superApply = superApply;
12275 inherits(ExtendedClass, this);
12276 ExtendedClass.superClass = superClass;
12277
12278 return ExtendedClass;
12279 };
12280}
12281
12282var classBase = 0;
12283

Callers 1

echarts.simple.jsFile · 0.70

Calls 3

each$1Function · 0.70
extendFunction · 0.70
inheritsFunction · 0.70

Tested by

no test coverage detected