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.

Widget and camera
#7
HI,

The script here is which works well, it is not certainly very academic.... I does not follow a specialist of the js!

JMM.


Code:
// Init widget and change display and opacity
  $("#widget-27").removeClass('hide');
  $("#widget-27").css("display", "none").css("opacity", "0");
 
 // Open widget on KNX command
 grp.listen('2/3/4', function(object, state) {
   if (state == 'value' && object.value == true ) {
      // hide camera on widget In the case she would have remained open and triggered open button camera  
     $("#widget-27 > div").addClass('hide').trigger('vclick').css("pointer-events", "none");
     // Command to show widget
     $('#widget-27').css({'display':'block', 'opacity': '1', 'transform': 'perspective(800px)', 'top': '200px', 'left': '500px'});
   }
 }, true); // set to true to execute on same object value
 
 // Close widget on KNX command
 grp.listen('2/3/4', function(object, state) {
   if (state == 'value' && object.value == false ) {
      // Command to display widget
      $("#widget-27").css("display", "none").css("opacity", "0");
   }
 }, true); // set to true to execute on same object value
 
Jean-Marc
Reply


Messages In This Thread
Widget and camera - by JMM - 26.06.2017, 11:10
RE: Widget and camera - by AEK - 26.06.2017, 13:02
RE: Widget and camera - by JMM - 27.06.2017, 06:10
RE: Widget and camera - by admin - 27.06.2017, 09:51
RE: Widget and camera - by JMM - 27.06.2017, 13:32
RE: Widget and camera - by admin - 27.06.2017, 14:04
RE: Widget and camera - by JMM - 27.06.2017, 16:56

Forum Jump: