ZoomIn ZoomOut in Fabric.js
https://groups.google.com/forum/?fromgroups#!topic/fabricjs/WQ0jegaIFCY
HTML
<script src="https://raw.github.com/kangax/fabric.js/master/dist/all.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/fabric.js/1.6.0/fabric.js"></script>
<br/>
<canvas id="c" width="1800" height="2000"></canvas>
CSS
canvas{
border-width: 1pz;
border-style: solid;
border-color: #000;
width:400px !important;
height:600px !important;
}
JavaScript
// canvas
var canvas = new fabric.Canvas('c');
canvas.backgroundColor = "#F5F5F5";
// text
var text = new fabric.Text('Text inside canvas', {
left: 200,
top: 50
});
text.hasRotatingPoint = true;
canvas.add(text);