|
|
@ -10,6 +10,7 @@ function Chart(config) { |
|
|
|
// bind "this" to nested API
|
|
|
|
// bind "this" to nested API
|
|
|
|
(function bindThis(fn, target, argThis) { |
|
|
|
(function bindThis(fn, target, argThis) { |
|
|
|
for (var key in fn) { |
|
|
|
for (var key in fn) { |
|
|
|
|
|
|
|
if (key === '$extIsFunction') { continue; } |
|
|
|
target[key] = fn[key].bind(argThis); |
|
|
|
target[key] = fn[key].bind(argThis); |
|
|
|
if (Object.keys(fn[key]).length > 0) { |
|
|
|
if (Object.keys(fn[key]).length > 0) { |
|
|
|
bindThis(fn[key], target[key], argThis); |
|
|
|
bindThis(fn[key], target[key], argThis); |
|
|
|