Logic Machine Forum
Widget Issue - 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: Widget Issue (/showthread.php?tid=5865)



Widget Issue - jmir - 28.01.2025

Hi,

I've an object in a plan that opens a widget, inside the widget there is a circular slider set to "inline in usermode" to change a setpoint.
This slider is in the same area than the object that opens the widget but inside it. 
The issue is that when pressing the button to open the widget the same touch changes de value of the slider inside...
Is there any way to solve it?


RE: Widget Issue - admin - 29.01.2025

Try adding this to Custom JavaScript:
Code:
var fn = window.showWidgetPopup
if (fn) {
  window.showWidgetPopup = function(arg1, arg2) {
    setTimeout(function() {
      fn(arg1, arg2)
    }, 10)
  }
}



RE: Widget Issue - jmir - 29.01.2025

(29.01.2025, 06:22)admin Wrote: Try adding this to Custom JavaScript:
Code:
var fn = window.showWidgetPopup
if (fn) {
  window.showWidgetPopup = function(arg1, arg2) {
    setTimeout(function() {
      fn(arg1, arg2)
    }, 10)
  }
}

It works! Tahnks!


RE: Widget Issue - jmir - 30.01.2025

(29.01.2025, 06:22)admin Wrote: Try adding this to Custom JavaScript:
Code:
var fn = window.showWidgetPopup
if (fn) {
  window.showWidgetPopup = function(arg1, arg2) {
    setTimeout(function() {
      fn(arg1, arg2)
    }, 10)
  }
}

Hi,

And is it possible to open a widget centered in the current view on a plan when it is scrollable?

Usermode view is set to "Center horizontally, auto-size width" and depending on the position of the verticall scroll widgets open inside de current view or are partially out of it...

Thanks


RE: Widget Issue - admin - 30.01.2025

This can't be fully fixed without some firmware modifications.
Partial work-around is to scroll the content so the widget is fully visible:
Code:
$(function() {
  $('.layer-widget').on('widget-show', function() {
    this.scrollIntoView({ block: 'nearest' })
  })
})



RE: Widget Issue - jmir - 30.01.2025

(30.01.2025, 07:40)admin Wrote: This can't be fully fixed without some firmware modifications.
Partial work-around is to scroll the content so the widget is fully visible:
Code:
$(function() {
  $('.layer-widget').on('widget-show', function() {
    this.scrollIntoView({ block: 'nearest' })
  })
})

Thank you!