janpaepke / ScrollMagic

The javascript library for magical scroll interactions.
http://ScrollMagic.io
Other
14.88k stars 2.17k forks source link

scrollmagic start event not working on mobile #702

Open nshinde004 opened 7 years ago

nshinde004 commented 7 years ago

Requirement: As the scene is triggered "start" event is triggered which calls scenestart function and works perfectly on desktop/mac on chrome and safari. But this event is totally unreliable on mobile devices. it gets triggered sometimes once while scrolling in one direction. if you go in opposite direction it doesn't trigger.

for (var i = 0; i < $rootScope.flow.modules.length; i++) { var el = document.getElementById("page-" + i); var scene = new ScrollMagic.Scene({ triggerElement: el, //"#page-" + i, triggerHook: 0.5, });

        scene.on("start", sceneStart);   //this event triggering 
                                              //is  inconsistent and 
                                             //fires random on mobile 
                                              //devices on 

        ctl.addScene(scene);
    }

I tried looking at http://scrollmagic.io/examples/expert/mobile_advanced.html but I couldn't figure out how will the sourcecode help me in triggering similar event? I went through custom events (http://iscrolljs.com/#custom-events) in Iscroll but couldn't figure-out how will that trigger event based on different elements shown in viewport.

Any help appreciated. Thanks!

nshinde004 commented 7 years ago

anyone please help?

RachaelCasper commented 5 years ago

Did you ever fix this? I'm having the same issue