Browse Source

update with artf suggestion

pull/691/head
TWCM 9 years ago
parent
commit
9d714b6075
  1. 6
      src/commands/view/SelectComponent.js

6
src/commands/view/SelectComponent.js

@ -101,20 +101,20 @@ module.exports = {
this.updateAttached(); this.updateAttached();
} }
var model = $(trg).data('model'); var model = $(trg).data('model');
if (typeof model != 'undefined') { if (model != 'undefined') {
if (!model.get("selectable")) { if (!model.get("selectable")) {
var comp = model && model.parent(); var comp = model && model.parent();
// recurse through the parent() chain until a selectable parent is found // recurse through the parent() chain until a selectable parent is found
while (comp && !comp.get("selectable")) { while (comp && !comp.get("hoverable")) {
comp = comp.parent(); comp = comp.parent();
} }
trg = comp.view.el; trg = comp.view.el;
} }
} }
var pos = this.getElementPos(trg); var pos = this.getElementPos(trg);
this.updateBadge(trg, pos); this.updateBadge(trg, pos);
this.updateHighlighter(trg, pos); this.updateHighlighter(trg, pos);

Loading…
Cancel
Save