Skip to content

Instantly share code, notes, and snippets.

@almost
Created November 25, 2015 13:46
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save almost/8a1bea142ebf08c81ec5 to your computer and use it in GitHub Desktop.
Save almost/8a1bea142ebf08c81ec5 to your computer and use it in GitHub Desktop.
Lack of semi-colons let line 2 and 3 combine. Runtime error :(
export function pagebounds2screen({x, y, width, height}) {
let ratio = window.devicePixelRatio
[x,y] = page2screen(x, y)
width = width * ratio
height = height * ratio
return {x, y, width, height}
}
@benjie
Copy link

benjie commented Feb 11, 2016

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment