Update canvas.class.js

Block accidental flipping on scaling.