PDA

View Full Version : Ext.ux.IconAlive



franck34
18 Apr 2009, 2:49 AM
Hi guys,

Here is a little user extension to make panel or windows containing icons with some behaviors.

FEATURES:
* Keyboard : In a Ext Windows, you can use keys LEFT/RIGHT/UP/DOWN/HOME/END and ENTER/DEL. You can not use keys on Panel. I've tried but without success, having to deal with a global keymap, with lot's of effect side.
* Mouse : Click to select, DblClick to open. Click somewhere else in the panel to unselect previously selected icon.

BUGS:
* Keys doesn't work on Webkit (chrome/safari).

TODO:
* onKeyUp/Down, select icon based on the screen position, not simply previous/next. (done)
* scroll to selected icon when window show a scroll if too little. (done)
* optionnal nice flashy border effect or 'frame' effect when selecting an icon. (done)

DEMO & DOWNLOAD:
http://innovacode.com/extjs/Ext.ux.IconAlive/

THANKS :
* edspencer, elvischrist or neonmonk for help
* johnsource for psychological coatching and jack's daniel companion

This is my first "clean" extension from scratch, all reviews are welcome.

only_do@126.com
19 Apr 2009, 11:46 PM
it is really good.

dolittle
20 Apr 2009, 12:37 AM
Looks great.

You handle all events on the icon level. Wouldn't it be better to do it with event delegations?
Dataview and the tree for example has a listener on on the parent element. When an event fires you check to see which of the child element fired the event.
Maybe you can have a plugin for components that holds icons and your box component icon for each icon.

franck34
20 Apr 2009, 2:00 AM
Looks great.

You handle all events on the icon level. Wouldn't it be better to do it with event delegations?
Dataview and the tree for example has a listener on on the parent element. When an event fires you check to see which of the child element fired the event.
Maybe you can have a plugin for components that holds icons and your box component icon for each icon.

I'll take a look at dataview/tree you give. Not all events are at in the icon level, but in the iconManager, which is plugged on the focusEl of the window. But yes i think it's possible to refactore it more cleanly ;)

I'm working on another version right now, trying to select the upper icon (and not the previous one as actualy) when keyUP occured, depending on the scroll.

Thanks for your feedback !