0

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.

mmathan
  • 273
  • 1
  • 5
  • 13

1 Answers1

0

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.

Ben Collier
  • 618
  • 4
  • 13
  • hi ben, ok i will accept what u r saying.. is there any way to make useTransform:true when we need to zoom and other times let it be useTransform:false. – mmathan Jun 06 '12 at 05:07
  • You might be able to jump between the two, but it might not work / might flicker or mess with the zooming. – Ben Collier Jun 24 '12 at 10:34
  • ok how to change the property or how to call the property of iscroll in my method. – mmathan Jun 25 '12 at 04:53