Logic Machine Forum
About widget - Printable Version

+- Logic Machine Forum (https://forum.logicmachine.net)
+-- Forum: LogicMachine eco-system (https://forum.logicmachine.net/forumdisplay.php?fid=1)
+--- Forum: Visualization (https://forum.logicmachine.net/forumdisplay.php?fid=9)
+--- Thread: About widget (/showthread.php?tid=4713)



About widget - Ibrahim - 13.04.2023

Hello,

I have a layout for my project as below and the widget is opening when the temperature icon is pressed. Is it possible to animate the red frame with widget? When the widget is opened, the red frame will be appear, if the widget is closed, the frame will be disappear. Is it possible?

   

Thanks.


RE: About widget - admin - 14.04.2023

Add this to Custom CSS to have a red shadow on widgets:
Code:
.layer-widget {
  box-shadow: 0 0 6px 3px rgba(255,0,0,0.5);
}



RE: About widget - Ibrahim - 14.04.2023

Hi admin,
This added shadow to widget but I need to frame on the plan independent of widget position. The client wants to see what areas will be covered by the opened widget.


RE: About widget - admin - 14.04.2023

You can draw the outline on the plan background image manually or create elements on the plan using Custom JavaScript. But in this case these elements will only be visible in the viewer mode not in the editor. #plan-1 is the element ID of the plan where the element will be placed. Change as needed. Plan ID is shown in the plan edit form.
Code:
$(function() {
  if ($('body').hasClass('usermode')) {
    $('<div></div>').css({
      position: 'absolute',
      width: 400,
      height: 300,
      top: 70,
      left: 100,
      'box-shadow': '0 0 6px 3px rgba(255,0,0,0.5)'
    }).appendTo('#plan-1');
  }
});