Zoom initial implementation. No UI, only bound to mousewheel. Everything is broken, to amend !

This commit is contained in:
jdescottes
2013-10-29 22:16:39 +01:00
parent a69b83e9bd
commit 7490651f83
6 changed files with 219 additions and 93 deletions

View File

@ -15,8 +15,23 @@
canvas.classList.add(classList[i]);
}
}
return canvas;
},
disableImageSmoothing : function (canvas) {
var context = canvas.getContext('2d');
context.imageSmoothingEnabled = false;
context.mozImageSmoothingEnabled = false;
context.oImageSmoothingEnabled = false;
context.webkitImageSmoothingEnabled = false;
context.msImageSmoothingEnabled = false;
},
clear : function (canvas) {
if (canvas) {
canvas.getContext("2d").clearRect(0, 0, canvas.width, canvas.height);
}
}
};
})();