Friday, October 25, 2013

Zoom left side of iPad

If you have a zoom issue with iPad showing on the left side instead of the right, you are probably using jqzoom. In my case, it was for Magento. Hopefully this fix will then work for you.

Find jquery-jqzoom-core-pack.js or whatever your JqZoom file is called.

Find the line:
switch (l.position) {
                    case "left":

Comment out
//this.node.leftpos = (p.pos.l - p.bleft - Math.abs(l.xOffset) - l.zoomWidth > 0) ? (0 - l.zoomWidth - Math.abs(l.xOffset)) : (p.ow + Math.abs(l.xOffset)); Under the left switch statement. And add this.node.leftpos = (p.ow + Math.abs(l.xOffset)); Then comment out under the switch default statement: // this.node.leftpos = (p.rightlimit + Math.abs(l.xOffset) + l.zoomWidth < screen.width) ? (p.ow + Math.abs(l.xOffset)) : (0 - l.zoomWidth - Math.abs(l.xOffset)); And add this this.node.leftpos = p.ow + Math.abs(l.xOffset);

No comments:

Post a Comment