Hey guys,

/Bug squashing time!/

When doing some pre-work for a project i want to start on, i found out 
that the interface library still had some minor bugs. I've mailed 
allready mailed them to Stefan, but he is very busy with a project right 
now, he doesn't even respond to my mail anymore :p (or he is on vacation) :p

Anyway, since interface was in SVN, i took the opportunity to squash the 
bugs myself.

*The first bug: idrag.js*
I noticed i couldn't destroy the draggable once it was created. I 
commented out the old code, and put in the new code. This way you can 
see what i did.

*The second and third bug: iselect.js*
I found out that selecting was inconsistent. You had different behaviour 
when not using CTRL, or if you are using CTRL. This is how it now works:
- When the dragging starts, an array of ID's is created with the current 
selected items. This was crucial in finding out which items where 
previously selected.
- When you mouseover an image, it checks to see if this item was 
selected (when you started dragging), if so, unselect it, else mark it;
- If an item was selected, but it was not selected when you started 
dragging, and you remove the selection box from it (e.g. unhover) 
deselect it;
- But RESELECT the object, if we are using CTRL & we dragged over an 
item which was selected while we started the drag (so it got 
unselected), but while still holding CTRL, we moved away from it. 
Meaning you didn't want to unselect it.
- When the selection stops, the "currentSelection" array is emptied.

All in all quite some work to get it right, but as far as i can see it 
behaves now like the windows explorer selection style...

*Note on changes to iutil.js:*
The new functionality REQUIRES Array.indexOf (see previous message), if 
you don't have it, a fallback code was implemented in iutil.js. I 
thought this was the best place for it.

-- Gilles




_______________________________________________
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/

Reply via email to