pisi / Reel

The premier 360° solution for jQuery.
http://reel360.org
MIT License
690 stars 210 forks source link

Reach event rotates one frame backwards before rotating correctly #328

Open 14renus opened 6 years ago

14renus commented 6 years ago

Using the reach event to cause the reel image to play and stop at a certain frame, doesn't work properly. The image will go one frame backwards and then play forwards (starting at frame 1 and then goes to 2, then goes 36,35,...,24) <-- not sure why it rotates decreasing frames either

$('.reel').trigger('reach',[24,0.2]);

However, that problem doesn't happen when using the play event.

$('.reel').trigger('play',0.2)
              .bind('frameChange.custom', function(e,d,frame) {
                      if (frame === 24) {
                              $('.reel').trigger('stop')
                                            .unbind('frameChange.custom'); }});

this is my markup:

<img class="reel"
         data-images="..."
         data-responsive="true"
         data-cw="true"
         data-preloader="0"
         data-clickfree="false" >