bugfix...

Signed-off-by: Alex A. Naanou <alex.nanou@gmail.com>
This commit is contained in:
Alex A. Naanou 2017-03-28 07:54:24 +03:00
parent 42a141ba40
commit 50823e69a0
2 changed files with 6 additions and 5 deletions

View File

@ -124,7 +124,8 @@ function(cls, cfg, parent){
parent = parent == null ? this.ribbons.viewer parent = parent == null ? this.ribbons.viewer
: parent instanceof Function ? parent.call(this) : parent instanceof Function ? parent.call(this)
: parent : parent
return parent.find('.'+ cls.join('.')).length > 0 ? 'on' : 'off' }, return parent.find('.'+ cls.join('.')).length > 0 ? 'on' : 'off'
},
['off', 'on'], ['off', 'on'],
function(state){ function(state){
if(state == 'on'){ if(state == 'on'){

View File

@ -265,15 +265,15 @@ function(elem, state_accessor, states, callback_a, callback_b){
// update the element... // update the element...
//state_accessor.call(this, e, state) //state_accessor.call(this, e, state)
var res = state_accessor.call(this, e, state) var res = state_accessor.call(this, e, state)
action = res !== undefined ? res : action //action = res !== undefined ? res : action
// post callback... // post callback...
if(callback_post != null){ if(callback_post != null){
var res = callback_post.apply(this, [action, e].concat(args)) var r = callback_post.apply(this, [action, e].concat(args))
action = res !== undefined ? res : action action = r !== undefined ? r : action
} }
return action return res || action
} }
// XXX these are broken -- this is wrong... // XXX these are broken -- this is wrong...