-
3 Oct 2012 5:52 AM #1
Add TAP/CLICK event to IMAGE component
Add TAP/CLICK event to IMAGE component
I find that I have needed to add a Custom Listener Event abstractcomponent.getEl().on('click', function() { ...}
to the onRender event of IMAGE component several time. IMAGE does not have a CLICK or TAP event. Can this be added to architect since I cannot use MVC without a valid event to select.
-
4 Oct 2012 10:16 AM #2
Relay the event.
Ie subscribe to the element-level event and fire another, component-level event. You can then subscribe to that event via a controller.Aaron Conran
@aconran
Sencha Architect Development Team
-
4 Oct 2012 10:39 AM #3
Not 100% sure what you are saying.
Ie subscribe to the element-level event and fire another, component-level event
It sounds like you want my custom listener to just fire an event that is defined for the Image Component. I still would have to code a listener for the click event. Yes I could code up using MVC for the OnRender event, but this seems a bit of a hack. What I have works, but just wanted to see if Click/Tap could be added, if not then so be it.
If I am incorrect, Can you give me an example?.
Would it not be easier going forward to just add TAP or CLICK to the events that can be selected so that the Image component works the same as other clickable components or would this require a change to the EXTJS framework and not really an Architect issue?
-
20 Nov 2012 1:54 PM #4
I have exactly the same "problem". I need to use "onclick" event on img component but i still don't find answers on web.
Do you find any info on web?
-
26 Nov 2012 7:29 AM #5
-
26 Nov 2012 11:13 AM #6


Reply With Quote