Skip to content

Commit

Permalink
mozilla canvas optimization attribute
Browse files Browse the repository at this point in the history
  • Loading branch information
robwalch committed Apr 2, 2014
1 parent 8401c9d commit 82221d5
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions app/scripts/views/Canvas2dView.js
Expand Up @@ -8,6 +8,11 @@
var canvas = this.canvas = window.document.createElement( 'canvas' );
canvas.style.position = 'absolute';

if (/Firefox\//.test(navigator.userAgent)) {
var mozOpaque = document.createAttribute('moz-opaque');
canvas.setAttributeNode(mozOpaque);
}

this.context = canvas.getContext('2d');

this.resize(ec.width, ec.height, ec.pixelRatio);
Expand Down

0 comments on commit 82221d5

Please sign in to comment.