|
@@ -63,10 +63,15 @@ export function init() {
|
|
Ext.mixin.Observable.prototype.doAddListener = function (ename, fn, scope, options, order, caller, manager) {
|
|
Ext.mixin.Observable.prototype.doAddListener = function (ename, fn, scope, options, order, caller, manager) {
|
|
if (typeof fn === 'string' && _.startsWith(fn, 'scope.')) {
|
|
if (typeof fn === 'string' && _.startsWith(fn, 'scope.')) {
|
|
// console.log('doAddListener', ename, fn, scope, options, order, caller, manager)
|
|
// console.log('doAddListener', ename, fn, scope, options, order, caller, manager)
|
|
- const vm = this.lookupViewModel()
|
|
|
|
- if (vm && vm.yvanScope) {
|
|
|
|
- scope = vm.yvanScope
|
|
|
|
- fn = scope[fn.substr('scope.'.length)]
|
|
|
|
|
|
+ if (window["IS_DESIGN_MODE"]) {
|
|
|
|
+ fn = Ext.emptyFn
|
|
|
|
+
|
|
|
|
+ }else {
|
|
|
|
+ const vm = this.lookupViewModel()
|
|
|
|
+ if (vm && vm.yvanScope) {
|
|
|
|
+ scope = vm.yvanScope
|
|
|
|
+ fn = scope[fn.substr('scope.'.length)]
|
|
|
|
+ }
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|