Logic Machine Forum
Autosize 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: Autosize widget (/showthread.php?tid=1088)



Autosize widget - adiaz - 14.11.2017

Hi!

I have Menu Widget that contains multiple buttons that open another widgets. When i work with PC it works fine, but when I work with iphone the widgets don't autoscale.

If i create a button outside of menu widget to open the same widget, the widget get autoscale.

What can i do? Is ther a function to do this?

Thanks!


RE: Autosize widget - adiaz - 16.11.2017

Resolved with Edgars help.

I had:

  $('.Screens').on('vclick', function() {
    $("#widget-47").removeClass("hide");
    $("#widget-29").addClass("hide"); 
  });

  $('.TempTec').on('vclick', function() {
    $("#widget-48").removeClass("hide");
    $("#widget-29").addClass("hide");
  });

  $('.Alimentacions').on('vclick', function() {
    $("#widget-49").removeClass("hide");
    $("#widget-29").addClass("hide");
  });

  $('.Apagat').on('vclick', function() {
    $("#widget-50").removeClass("hide");
    $("#widget-29").addClass("hide");
  });

  $('.Crepuscular').on('vclick', function() {
    $("#widget-62").removeClass("hide");
    $("#widget-29").addClass("hide");
  });     

Replaced with:

$('.Screens').on('vclick', function() {
    $("#widget-47").appendTo('.widgets').removeClass("hide");
    $("#widget-29").addClass("hide");
    //$('.Screens').trigger('vclick')
  });

  $('.TempTec').on('vclick', function() {
    $("#widget-48").appendTo('.widgets').removeClass("hide");
    $("#widget-29").addClass("hide");
  });

  $('.Alimentacions').on('vclick', function() {
    $("#widget-49").appendTo('.widgets').removeClass("hide");
    $("#widget-29").addClass("hide");
  });

  $('.Apagat').on('vclick', function() {
    $("#widget-50").appendTo('.widgets').removeClass("hide");
    $("#widget-29").addClass("hide");
  });

  $('.Crepuscular').on('vclick', function() {
    $("#widget-62").appendTo('.widgets').removeClass("hide");
    $("#widget-29").addClass("hide");
  });

Lot of thanks Edgars!