A collaborative document has a method called scale () .
I have this implementation for scaling (scaling) my chart:
var graphScale = 1;
var paperScale = function(sx, sy) {
paper.scale(sx, sy);
};
var zoomOut = function() {
graphScale -= 0.1;
paperScale(graphScale, graphScale);
};
var zoomIn = function() {
graphScale += 0.1;
paperScale(graphScale, graphScale);
};
var resetZoom = function() {
graphScale = 1;
paperScale(graphScale, graphScale);
};
Perhaps this is what you need?
source
share