-
21 Nov 2012 3:33 AM #1
Overlay near mouse click
Overlay near mouse click
I am relatively new to this forum. Trying to understand overlays. Is there an API method that shows overlay panel near mouse/touch position like overlayPanel.showBy(X, Y, 'lc-lc?')?
-
21 Nov 2012 8:48 PM #2
Have you reviewed the Panel class? The first example in the docs relates to its use as an overlay. There is a showBy method too but it is in relation to another component.
http://sencha/touch/sencha-touch-2.1...-method-showBy
If that doesn't suit you and you truly want to show an overlay in relation to the touch position, please post more details on what you're trying to accomplish as well as any relevant code.
BriceBrice Mason
Front End Developer
Modus Create
@bricemason
bricemason.com
Sencha Touch Screencasts
Vimeo - Sencha Touch Channel
Github Projects:
Sencha Cordova Builder enables the automatic creation, building, and running of PhoneGap (Cordova) projects with Sencha Touch.
Am I Sencha Touch Ready? checks your system to determine what you need to do to start Sencha Touch development. If you're having trouble getting up and running, try this out.
Sencha Tools Bridge allows Sencha SDK Tools to co-exist with Sencha Cmd on the same system.
-
21 Nov 2012 11:47 PM #3
Hi bhakta,
I quickly developed a senchafiddle: http://www.senchafiddle.com/#P3VCq
Maybe you can use this as a first step and some inspiration (supposed that this is what you asked for)?
Best regards,
Schildi
-
22 Nov 2012 4:24 AM #4
Schildi, Yeah that is what I want. But here is a challenge. I am using a List and touch has to happen inside ListItem. The itemTap functions here are not giving me event object to locate touch coordinates. I don't know if this works out if I add List to another panel and add tap listener to the parent panel. But I liked your solution. Will try that out. Thanks.
-
22 Nov 2012 9:33 AM #5
Oh, itemtap does give you an event object.

http://docs.sencha.com/touch/2-0/#!/...-event-itemtap
Tip: you can check the different params by logging its values in the console:Code:itemtap: function(list, index, target, record, e, eOpts) { var x = e.pageX; var y = e.pageY; // show the panel and stuff... }
Best regards,Code:itemtap: function(list, index, target, record, e, eOpts) { console.log(list); console.log(index); console.log(target); console.log(record); console.log(e); console.log(eOpts); }
Schildi


Reply With Quote