From 410f381a1a091b9a850684a474997fdab4ce1f06 Mon Sep 17 00:00:00 2001 From: Chris Hallberg <crhallberg@gmail.com> Date: Tue, 30 Sep 2014 10:48:33 -0400 Subject: [PATCH] Resize fix for Zoomy. --- themes/bootstrap3/js/zoomy/canvas-zoomy.js | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/themes/bootstrap3/js/zoomy/canvas-zoomy.js b/themes/bootstrap3/js/zoomy/canvas-zoomy.js index 0284f02558d..54bc5600004 100644 --- a/themes/bootstrap3/js/zoomy/canvas-zoomy.js +++ b/themes/bootstrap3/js/zoomy/canvas-zoomy.js @@ -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) { -- GitLab