Skip to content
Snippets Groups Projects
Commit 410f381a authored by Chris Hallberg's avatar Chris Hallberg
Browse files

Resize fix for Zoomy.

parent bc52287e
Branches
Tags
No related merge requests found
......@@ -5,6 +5,14 @@ var Zoomy = {
this.canvas = canvas;
this.canvas.width = Math.floor(this.canvas.clientWidth);
this.canvas.height = Math.floor(this.canvas.clientHeight);
addEventListener('resize', function() {
Zoomy.canvas.width = Math.floor(Zoomy.canvas.clientWidth);
Zoomy.canvas.height = Math.floor(Zoomy.canvas.clientHeight);
Zoomy.width = Zoomy.canvas.width;
Zoomy.height = Zoomy.canvas.height;
Zoomy.rebound();
Zoomy.draw();
}, false);
addEventListener('mousemove', Zoomy.mouseHandle, false);
addEventListener('touchmove', Zoomy.mouseHandle, false);
addEventListener('mouseup', function(e) {
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment