fixing options

This commit is contained in:
Vadim
2015-09-19 20:06:07 -04:00
parent c596c91d8d
commit 7ab02c5b11
+3 -3
View File
@@ -7,7 +7,7 @@
(function (root) {
function CanvasTextWrapper(canvas, text, opts) {
function CanvasTextWrapper(canvas, text, options) {
'use strict';
var defaults = {
@@ -25,11 +25,11 @@
strokeText: false // text is stroked according to context configuration
};
opts = opts || {};
var opts = {};
for (var property in defaults) {
if (defaults.hasOwnProperty(property)) {
opts[property] = (opts && opts[property]) ? opts[property] : defaults[property];
opts[property] = (options && options[property]) ? options[property] : defaults[property];
}
}