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.

Visualization Icons Position Rotate
#21
Hello 
Could we make the degree variable from the name Like: Rotate-xx
where xx is the degree we wants
Reply
#22
See this if you want to rotate an icon based on linked object value:
https://forum.logicmachine.net/showthread.php?tid=1831
Reply
#23
Hello Admin
I want to set the rotation angle from the custom name.
I want to use it for one bit Linear Lighting object
Could we do some thing like that based on the custom name value
BR,
Reply
#24
Custom name cannot be accessed from Custom JS at the moment. This can be done via Additional classes. This code will look for all elements where class list contains rotate-XYZ (where XYZ is an angle value in degrees). No custom CSS is needed for this solution, the rotation is applied by the code itself..
Code:
$(function(){
  $('[class*=rotate-]').each(function(index, el) {
    var match = el.className.match(/rotate\-(\d+)/);
    el.style.transform = 'rotate(' + match[1] + 'deg';
  });
});
Reply
#25
(11.04.2022, 05:34)admin Wrote: Custom name cannot be accessed from Custom JS at the moment. This can be done via Additional classes. This code will look for all elements where class list contains rotate-XYZ (where XYZ is an angle value in degrees). No custom CSS is needed for this solution, the rotation is applied by the code itself..
Code:
$(function(){
  $('[class*=rotate-]').each(function(index, el) {
    var match = el.className.match(/rotate\-(\d+)/);
    el.style.transform = 'rotate(' + match[1] + 'deg';
  });
});

Thanks Admin
Great
Could we use custom name in the tooltip or not yet?
Reply
#26
Custom name will be accessible from JavaScript side in the next firmware.
Reply
#27
(11.04.2022, 09:23)admin Wrote: Custom name will be accessible from JavaScript side in the next firmware.

Great news
Reply


Forum Jump: