Files
Testing/videocall3/Canvas-Designer/dev/zoom-handler.js
sean 0e8a8b3028
Some checks are pending
deploy-testing / deploy (push) Waiting to run
Initial testing snapshot
2026-11-17 16:15:01 -05:00

27 lines
613 B
JavaScript

var zoomHandler = {
scale: 1.0,
up: function(e) {
this.scale += .01;
this.apply();
},
down: function(e) {
this.scale -= .01;
this.apply();
},
apply: function() {
tempContext.scale(this.scale, this.scale);
context.scale(this.scale, this.scale);
drawHelper.redraw();
},
icons: {
up: function(ctx) {
ctx.font = '22px Verdana';
ctx.strokeText('+', 10, 30);
},
down: function(ctx) {
ctx.font = '22px Verdana';
ctx.strokeText('-', 15, 30);
}
}
};