Moving drawing.js to module format