Kendo UI Mobile & Photoswipe

4 posts, 0 answers
  1. Kyriakos
    Kyriakos avatar
    15 posts
    Member since:
    Jun 2012

    Posted 22 Apr 2013 Link to this post

    Hi ,
     I'm trying to build a image gallery with options on swipe the image to the next image and prev image location of an array of images.

    The best next thing i could find was the following http://www.webresourcesdepot.com/image-gallery-for-mobile-and-touch-devices-photoswipe/
    which does the job perfectly on any browser and with custom toolbar where you can add options for close and etc.
    The problem is when i compile the kendo application for ipad 2.0 using phonegab and the latest xcode version the gallery opens fine but i have no event custom listeners except the ones the gallery supports.
    I mean if on the toolbar i attach a div with a ID and i try call that id onclick or on tap the event doesnt triggers.
    The gallery appends classes on the body and adds some html as well.

    So i cant find a relative solution to this problem , is there any other gallery someone could suggest to use that runs on kendo ui mobile?





  2. Alexander Valchev
    Admin
    Alexander Valchev avatar
    2875 posts

    Posted 24 Apr 2013 Link to this post

    Hi Kyriakos,

    Using the DOM click event is not recommended as it is not optimized for touch devices. Instead I suggest using the build-in click/select events of the widgets, the Kendo Mobile touch events (docs/demo) or hooking up to the touchend event.
    To solve the particular problem which you described, please make the following change in the code:
    $("#runmeagain").on('touchend click', function (e) {
        $('body').removeClass('ps-active');
        gridview(domain, cat_id);
        PhotoSwipe.unsetActivateInstance(instance);
        PhotoSwipe.detatch(instance);
        // PhotoSwipe.disposeInstance(instance);
    });


    Kind regards,
    Alexander Valchev
    the Telerik team
    Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
  3. Kendo UI is VS 2017 Ready
  4. AppsWiz
    AppsWiz avatar
    15 posts
    Member since:
    Apr 2013

    Posted 29 May 2013 Link to this post

    Hi Alexander,

    Can you please expand on your answer? i.e. where is the code you have supplied meant to go as I can't find anywhere suitable.

    Thanks.
  5. Alexander Valchev
    Admin
    Alexander Valchev avatar
    2875 posts

    Posted 31 May 2013 Link to this post

    Hi AppsWiz,

    The code sample from my previous post was related to the project provided by the topic author. The recommendations apply to all Kendo Mobile applications.

    Regards,
    Alexander Valchev
    Telerik
    Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
Back to Top
Kendo UI is VS 2017 Ready