Skip to content
Snippets Groups Projects
Commit 5116db24 authored by Clement Ho's avatar Clement Ho
Browse files

Convert to single quotes

parent a30fbbdd
No related branches found
No related tags found
No related merge requests found
Loading
Loading
@@ -27,8 +27,8 @@
* @see http://stackoverflow.com/questions/118241/calculate-text-width-with-javascript/21015393#21015393
*/
// re-use canvas object for better performance
var canvas = gl.text.getTextWidth.canvas || (gl.text.getTextWidth.canvas = document.createElement("canvas"));
var context = canvas.getContext("2d");
var canvas = gl.text.getTextWidth.canvas || (gl.text.getTextWidth.canvas = document.createElement('canvas'));
var context = canvas.getContext('2d');
context.font = font;
var metrics = context.measureText(text);
return metrics.width;
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment