I m using fabric.js in one of my projects. I m using zooming functionalities . I would like to know if there a simple way to zoom all the canvas (with all the elements ) in on click.
相关问题
- character width calculation wrong with some font w
- fabric.js straight line and select on click
- change text once it is added on canvas
- fabricjs delete backgroundImage
- set Min and Max resize limits for fabric object
相关文章
- How to freedraw Circle in fabricjs using mouse?
- Saving JSON in canvas with fabric.js
- FabricJS image object clipTo shape object issue
- toSVG method not working on extended class with Fa
- Issue with object while restricting it to canvas b
- Can we add putImageData to fabric canvas instead o
- Fabric js: Increase font size instead of just scal
- Fabricjs intersectsWithObject returning false when
Try out this jsfiddle demonstrating zoom onclick of a button: http://jsfiddle.net/cmontgomery/H7Utw/1/. In essence you get all objects on the canvas and scale/move them by the same factor, giving the visual appearance of zoom.
If you use zoom with fabricjs without modifying all objects use: https://github.com/wojtek-krysiak/fabricjs-viewport.
Example: http://wojtek-krysiak.github.io/fabricjs-viewport/