138
rated 0 times
[
143]
[
5]
/ answers: 1 / hits: 27183
/ 9 Years ago, tue, may 26, 2015, 12:00:00
How can I pan and zoom using fabricjs? I've tried using the methods zoomToPoint and setZoom but they do not work for panning. Once I start using different zoom points I start having trouble.
$('#zoomIn').click(function(){
canvas.setZoom(canvas.getZoom() * 1.1 ) ;
}) ;
$('#zoomOut').click(function(){
canvas.setZoom(canvas.getZoom() / 1.1 ) ;
}) ;
$('#goRight').click(function(){
//Need to implement
}) ;
$('#goLeft').click(function(){
//Need to implement
}) ;
http://jsfiddle.net/hdramos/ux16013L/
More From » canvas