From c86e17bd9464c53e1e09663443a5e1b228cf96ef Mon Sep 17 00:00:00 2001 From: emkael Date: Tue, 12 Nov 2019 01:07:04 +0100 Subject: Fixed parsing canvas settings from HTML attribute string --- playoff.js | 3 +++ 1 file changed, 3 insertions(+) (limited to 'playoff.js') diff --git a/playoff.js b/playoff.js index e83c33f..b456a43 100644 --- a/playoff.js +++ b/playoff.js @@ -33,6 +33,9 @@ var playoff = { var attr = 'data-' + setting.replace(/_/g, '-'); var attr_value = canvas.getAttribute(attr); if (attr_value) { + if (attr.substr(attr.length-6) == 'offset') { + attr_value = parseInt(attr_value); + } defaults[setting] = attr_value; } } -- cgit v1.2.3