1.0.4 • Published 4 years ago
canvas-positioner v1.0.4
Accepts window object, and a canvas reference. Automatically sets the position to absolute, and if on desktop, centers in the middle of the page, and on mobile, will set to full screen.
Example:
//position canvas fullscreen for mobile, and in the center of your screen for desktop positionCanvas(window, document.getElementsByTagName("canvas")0);