using both useTransform:false and zoom:true in iscroll4, zooming is not working

838 Views Asked by At

this is my code,

var myScroll;

                                    function scroll() {

                                        myScroll = new iScroll('wrapper', {
                                                               checkDOMChanges: false,
                                                               useTransform: false,
                                                               onBeforeScrollStart: function (e) {
                                                               var target = e.target;
                                                               while (target.nodeType != 1) target = target.parentNode;

                                                               if (target.tagName != 'SELECT' && target.tagName != 'INPUT' && target.tagName != 'TEXTAREA')
                                                               e.preventDefault();
                                                               },
                                                               zoom: true


                                                               });
                                        setTimeout(function () { myScroll.refresh(); }, 0);

                                    }


                                    document.addEventListener('touchmove', function (e) { e.preventDefault(); }, false);
                                    document.addEventListener('DOMContentLoaded', scroll);  

when i remove the useTransform:false line, zooming in iscroll is working.when i try the above code, zoom is not working. but i need to use useTransform:false for certain operations in my application. how to make work the zoom if i use useTransform:false line. pl help me.

1

There are 1 best solutions below

3
On BEST ANSWER

I'm not 100% sure but I'd assume iScroll needs to use transforms to zoom as it's using the transform: scale(x) property to emulate the zoom by scaling the content.

Therefore I don't think you'll be able to do this.