turn.js icon indicating copy to clipboard operation
turn.js copied to clipboard

zoom, why it isn't in the js?

Open schirrel opened this issue 8 years ago • 2 comments

I'm having problem with zoom..

  1. i already tried jquery zoom, didn't make any difference...
  2. i had tried turn('zoon') i got zoom is an invalid value
  3. i tried the new zoom-viewport, got the zoom is an invalid value as well and then i think about looking how turn work with zoom and looked at https://github.com/blasten/turn.js/blob/master/turn.js and i realized that there's no zoom there... why?

schirrel avatar Aug 11 '17 14:08 schirrel

my code is:

$('#flipbook').turn({
              width: Math.round($('#flipbook canvas')[0].height * 1.4),
              height: $('#flipbook canvas')[0].height,
              autoCenter: true
            });


            $('#zoom-viewport').zoom({
              flipbook: $('#flipbook'),
              max: 3
            });

            $('#flipbook').click(function() {

              var zoom = $('#flipbook').turn('zoom');
              alert('Current zoom: '+zoom);
            });

schirrel avatar Aug 11 '17 18:08 schirrel

@CoderSquirrel I believe you have to include the zoom.js file separately. At least that's what I did to get zoom to work for me. On their website examples, when you look at the js files they are calling over the network, you can see that they are including it as a separate file from turn.js.

http://www.turnjs.com/lib/zoom.min.js

MrLuisAmador avatar Aug 17 '17 14:08 MrLuisAmador