This forum uses cookies
This forum makes use of cookies to store your login information if you are registered, and your last visit if you are not. Cookies are small text documents stored on your computer; the cookies set by this forum can only be used on this website and pose no security risk. Cookies on this forum also track the specific topics you have read and when you last read them. Please confirm that you accept these cookies being set.

Group Address value in SVG icon
#12
Code:
$(function(){
  $('.rotate').each(function(i, el) {
    var $el = $(el), addr = $el.data('object'); // or 'status-object'

    grp.listen(addr, function(obj) {
      $el.each(function () {
        this.style.setProperty('transform', 'rotate(' + obj.value + 'deg)', 'important');
      });
    });
  });
});

Updated version that includes the 'important' css tag. Otherwise it isn't working when the object is set to 'read only'.

Special thanks to Erwin van der Zwart Smile
Reply


Messages In This Thread
Group Address value in SVG icon - by Thomas - 14.01.2019, 10:01
RE: Group Address value in SVG icon - by Joep - 03.10.2023, 13:36

Forum Jump: