Jump to content

Mobile PdfFrame On Tap Event Fire My Event - How ?


andyhill

Recommended Posts

TUnimPDFFrame UniEvents afterCreate

 

function afterCreate(sender)

{

  var me = sender;

  me.element.on('click', function()

    {

      me.fireEvent('_myClick'); // Never Fired

      alert('Clicked');                 // Never Executed

    }

  )

}

 

Please advise how I can fire an event within an event - thanks in advance

Link to comment
Share on other sites

Thanks but it does not work.

 

Can you advise ?

 

(I want to catch a "tap" event in TUnimPDFFrame and force a "Page-Fit", so after the user has changed the size many different ways I want a quick way to resize view back to page-fit [remembering the viewer has hidden the page-fit dropdown due to screen size]).

Link to comment
Share on other sites

(I want to catch a "tap" event in TUnimPDFFrame and force a "Page-Fit", so after the user has changed the size many different ways I want a quick way to resize view back to page-fit [remembering the viewer has hidden the page-fit dropdown due to screen size]).

 

Sorry, can you clarify what you wanted ?

Link to comment
Share on other sites

TUnimPDFFrame displays document. On mobile (iPhone) the Sizing DropDownBox is hidden (due to screen size).

 

User now zooms in and out of document but cannot return to Page-Fit mode.

 

I want to ADD a (tap actually a doubletap) event to TUnimPDFFrame so I can catch it via an AjaxEvent and then instruct the TUnimPDFFrame viewer to show the document in Page-Fit mode.

 

me.fireEvent('_MyDoubleTap'); // (changed event name from above) Never Fires

 

I need to catch this event and then force the viewer into Page-Fit mode.

 

I need help with both the event and the code to force Page-Fit.

Link to comment
Share on other sites

×
×
  • Create New...