- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi guys. I am after some help.
I have made an app which I have launches on iOS, Play, Kindle and Windows. The app is a basically a reference app for lawyers looking for information. They tap buttons for the information they want and then the info pops up on screen. The info which pops up is a PDF converted to a JPG. I made the HTML5 side of it using a website creator called Incomedia Website X5. The code to open the popup is a standard feature on WebsiteX5 so I have not written it. The program calls it a Showbox Gallery.
This is a sample of the code from the HTML page:
<a href="#" onclick="return x5engine.imShowBox({ swipeImg: 'res/imSwipe.png', closeImg: 'res/imClose.png', loadingImg: 'res/imLoad.gif', effect: 'fade', background: '#000000', textColor: '#000000', boxColor: '#FFFFFF', startIndex: 0, loadingImg: 'res/imLoad.gif', closeImg: 'res/imClose.png', media:[{type: 'image', url: 'files/image-042.jpg', width: 764, height: 1080, description: ''}]}, 0, this);"><img id="imObjectImage_1" src="images/arson.png" title="Arson" alt="Arson" height="52" width="202" /></a></div></div>
</div>
<div style="float: left; width: 295px;">
<div id="imCell_2" class="imGrid[0, 0]"><div id="imCellStyleGraphics_2"></div><div id="imCellStyle_2"><a href="#" onclick="return x5engine.imShowBox({ swipeImg: 'res/imSwipe.png', closeImg: 'res/imClose.png', loadingImg: 'res/imLoad.gif', effect: 'fade', background: '#000000', textColor: '#000000', boxColor: '#FFFFFF', startIndex: 0, loadingImg: 'res/imLoad.gif', closeImg: 'res/imClose.png', media:[{type: 'image', url: 'files/image-051.jpg', width: 764, height: 1080, description: ''}]}, 0, this);"><img id="imObjectImage_2" src="images/criminal_damage.png" title="Criminal Damage" alt="Criminal Damage" height="52" width="202" /></a>
As you can probably tell (at least I think this is right) it uses a JavaScript code called "x5engine.imShowBox" to open the file. The issue I have is this: when the page pops up, it renders more or less full screen but it cannot be zoomed in on at all. This isn't really a problem if you are reading it on an iPad or similar because it renders very well. The problem is that I could really do with adding pinch and zoom functionality to this and I have absolutely no idea where to start.
This is the contents of the x5engine.js file which appears to define the imShowBox function:
var _jq=$.noConflict(!0);try{window.$=window.jQuery=_jq}catch(Excp){}var x5engine={utils:{isOnline:function(){return window.top.location.href.substring(0,4)=="http"?!0:!1}},imShowBox:function(){return!1},imTip:{Show:function(e,t){return!1}}},swfobject=null;(function(e,t){"use strict";var n=function(){var e;e=["res/swfobject.js","res/x5engine.deferrable.js","res/l10n.js","res/x5cartengine.js","res/x5settings.js"];for(var n=0;n<e.length;n++){var r=document.createElement("script");r.src=(e
Any help would be gratefully received.
Joe
- Tags:
- HTML5
- Intel® XDK
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Not sure, but I did find some references to enabling pinch zoom in Cordova on Stack Overflow and other places, like this one:
Unfortunately the suggested solution involves modifying some of the native (java) code in the plugin. I would hope there's something easier, but you might give it a try. You'd have to git clone the plugin to your local drive and then make the modifications, I think. I haven't tried it myself, but it's worth a shot.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
https://software.intel.com/en-us/xdk/faqs/cordova#pinch-and-zoom
The FAQ above has some information on pinch and zoom that might be useful.

- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page