14.11.2020, 20:37
(02.09.2020, 11:09)admin Wrote: This example will set rotate the icon according to object value (data type 5.003 - angle).Can I modify this function to rotate a fan icon, that keeps rotating in a sertain speed if value´s not equal to 0?
Set Additional classes of your object to rotate
Add to Custom JavaScript:
Note that this won't work in the editor, only in the visualization view.Code:$(function(){
$('.rotate').each(function(i, el) {
var $el = $(el), addr = $el.data('object'); // or 'status-object'
grp.listen(addr, function(obj) {
$el.find('.icon').css('transform', 'rotate(' + obj.value + 'deg');
});
});
});