Commit 5116db24 authored by Clement Ho's avatar Clement Ho

Convert to single quotes

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