mirror of
https://github.com/piskelapp/piskel.git
synced 2023-08-10 21:12:52 +03:00
Remove unnecessary caching
This commit is contained in:
parent
7e9c632efd
commit
26b3cf3a23
@ -30,12 +30,7 @@
|
||||
* @param {String} globalAlpha (optional) global frame opacity
|
||||
*/
|
||||
drawToCanvas : function (frame, canvas, transparentColor, globalAlpha) {
|
||||
var context;
|
||||
if (canvas.context) {
|
||||
context = canvas.context;
|
||||
} else {
|
||||
context = canvas.context = canvas.getContext('2d');
|
||||
}
|
||||
var context = canvas.getContext('2d');
|
||||
globalAlpha = isNaN(globalAlpha) ? 1 : globalAlpha;
|
||||
context.globalAlpha = globalAlpha;
|
||||
transparentColor = transparentColor || Constants.TRANSPARENT_COLOR;
|
||||
|
Loading…
Reference in New Issue
Block a user