Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

On Click event #12

Open
khalilsarabey opened this issue Jul 21, 2014 · 2 comments
Open

On Click event #12

khalilsarabey opened this issue Jul 21, 2014 · 2 comments

Comments

@khalilsarabey
Copy link

Hello,
Is there any built in way to have a default on click event that simply opens a large image in a popup window where you can slide left and right to browse the rest?
I think this will make life much easier for beginners who are learning since I read that if this is not done properly it can cause memory leaks.
I think this is not implemented, but any guide lines would be appreciated!
Thanks, perfect job on the grid system though.

@prodz18
Copy link
Owner

prodz18 commented Jul 22, 2014

Hi.
There is a function already in the widget that opens a large image in a modal pop-up window. You could do something like this:

$.fg.setOnItemClick(function(e){
    $.fg.openModal('###THE_IMAGE_URL_OR_PATH###');
});

Regarding to slide the images left or right, you could easily do that with a Scrollable View. Check the documentation on Appcelerator for an example. You'll need to create a function where it opens a window or view that contains a ScrollableView with all the images or views and point to an specific view or image. Then, assign that function to the setOnItemClick() method of the widget. I'll try to post an example later.

@khalilsarabey
Copy link
Author

Thank you Pablo!
I tried the openModal function, it does display the image but over the thumbnails, which is not what I'm trying to establish, what I'm trying to have is something similar to the iOS gallery.
I'll try to work on that, and any example from you would be a GREAT help since I'm still learning :))

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants