From 8beac809b8486933386678a6d0b2abc6a86a5219 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Agence=20Web=20Pyr=C3=A9web?= Date: Mon, 7 Mar 2016 17:08:54 +0100 Subject: [PATCH] Classes access fix for Android Now Android can have access to added classes on click. Fix for issue #2 --- controllers/widget.js | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/controllers/widget.js b/controllers/widget.js index 76358c2..5d05668 100644 --- a/controllers/widget.js +++ b/controllers/widget.js @@ -24,6 +24,12 @@ text = text.replace(/fa-[a-z-]+/g, function (match) }); $.iconLabel.text = text; +// classes fix for Android +if (OS_ANDROID) { + var classes = args.classes || []; + $.iconLabel.classes = classes; +} + // workaround for android exports.on = function(name, cb) { return $.iconLabel.addEventListener(name, cb); }; exports.off = function(name, cb) { return $.iconLabel.removeEventListener(name, cb); }; @@ -38,4 +44,4 @@ exports.addEventListener = $.iconLabel.addEventListener; exports.removeEventListener = $.iconLabel.removeEventListener; exports.trigger = $.iconLabel.fireEvent; -exports.fireEvent = $.iconLabel.fireEvent; \ No newline at end of file +exports.fireEvent = $.iconLabel.fireEvent;