andyhill Posted March 12, 2018 Share Posted March 12, 2018 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 More sharing options...
Sherzod Posted March 12, 2018 Share Posted March 12, 2018 Hi, You can try to use 'tap' instead of 'click': ... me.element.on('tap', function() ... Link to comment Share on other sites More sharing options...
andyhill Posted March 12, 2018 Author Share Posted March 12, 2018 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 More sharing options...
Sherzod Posted March 12, 2018 Share Posted March 12, 2018 (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 More sharing options...
andyhill Posted March 13, 2018 Author Share Posted March 13, 2018 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 More sharing options...
Recommended Posts