| | |
| | | */ |
| | | function select(id) |
| | | { |
| | | // allow subscribes to prevent selection change |
| | | if (me.triggerEvent('beforeselect', indexbyid[id]) === false) { |
| | | return; |
| | | } |
| | | |
| | | if (selection) { |
| | | id2dom(selection, true).removeClass('selected').removeAttr('aria-selected'); |
| | | if (search_active) |
| | |
| | | * When dragging starts, compute absolute bounding boxes of the list and it's items |
| | | * for faster comparisons while mouse is moving |
| | | */ |
| | | function drag_start() |
| | | function drag_start(force) |
| | | { |
| | | if (drag_active) |
| | | if (!force && drag_active) |
| | | return; |
| | | |
| | | drag_active = true; |
| | |
| | | autoexpand_item = id; |
| | | autoexpand_timer = setTimeout(function() { |
| | | expand(autoexpand_item); |
| | | drag_start(); // re-calculate item coords |
| | | drag_start(true); // re-calculate item coords |
| | | autoexpand_item = null; |
| | | if (ui_droppable) |
| | | $.ui.ddmanager.prepareOffsets($.ui.ddmanager.current, null); |