Skip to content

Instantly share code, notes, and snippets.

@parap
Created July 24, 2016 11:24
Show Gist options
  • Save parap/0341bc9d65e29957ac68b182fb25c052 to your computer and use it in GitHub Desktop.
Save parap/0341bc9d65e29957ac68b182fb25c052 to your computer and use it in GitHub Desktop.
function onresize(event) {
//canvas.width=document.documentElement.clientWidth
o.resizelist[1].x = o.resizelist[3].x = document.documentElement.clientWidth-1;
o.resizelist[2].x = 2;
var main_width = 980;
if (document.documentElement.clientWidth > main_width) {
o.resizelist[0].x = o.resizelist[4].x = document.documentElement.clientWidth / 2;
} else {
o.resizelist[0].x = o.resizelist[4].x = main_width/2;
}
resizeCanvas(canvas, context, width, height);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment