Logic Machine Forum
Visualization problem - 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: Visualization problem (/showthread.php?tid=4175)



Visualization problem - AlexLV - 04.08.2022

I need help, my visualization not working correctly. I started to use layouts, and something not OK for me..

@admin, can you please check my visu? I can send my project and questions , but PM not working any more..

BR,

Alexander


RE: Visualization problem - Daniel - 04.08.2022

Can you please describe your problem?


RE: Visualization problem - AlexLV - 04.08.2022

Hi Daniel,

So questions:
1. my visu not opening from start page as I want, but opens from other page. Setting main page like default not helping.
2. Blink text function for alarm not working for more than one group.
3. At creation visualization page I can see text and group object, but at visualization only group object. Text not seen (under image??)

Better to see it, first time I start use layouts.

BR,

Alex


RE: Visualization problem - Daniel - 04.08.2022

You probably have no elements on the start page. elements on layouts do not count.


RE: Visualization problem - AlexLV - 04.08.2022

Ok, thanks,

now will add something, did not know about this.

Alex

Yeep, now works Smile

Alex


RE: Visualization problem - admin - 05.08.2022

2. Blink should work for any number of objects/elements.

Use additional class blinker.

Custom JS:
Code:
$(function() {
  $('.blinker').each(function(_, el) {
    var addr = $(el).data('object');
    if (addr) {
      grp.listen(addr, function(obj) {
        $(el).toggleClass('blink', obj.value);
      });
    }
  });
});

Custom CSS:
Code:
@keyframes blinker {
  from {opacity: 1.0;}
  to {opacity: 0.0;}
}
.blink{
  animation-name: blinker;
  animation-duration: 0.6s;
  animation-iteration-count: infinite;
  animation-timing-function: ease-in-out;
  animation-direction: alternate;
}

3. Any elements placed in a layout will be rendered below any elements in a plan.


RE: Visualization problem - AlexLV - 05.08.2022

Hi,

I use this variant:

$(function() {
$('.color-by-value53').each(function(_, el) {
var addr = $(el).data('object');
if (addr) {
grp.listen(addr, function(obj) {
var color;

if (obj.value) {
color = 'red';
}
else {
color = 'Green';
}

$(el).css('color', color).toggleClass('blink', obj.value);
});
}
});
});

When value is changing, colors are changing also, but not blinking..
Once I see it worked than not working anymore..

Also question - for different groups I just change class name here and at visu, is it correct:

$('.color-by-value53') ?? Can I use other class name after dots, what is the rules?

I also tried your variant, just added your part to custom JS and added class blinker to group object at visu, anyway not working..


Alex


RE: Visualization problem - admin - 05.08.2022

You don't need to make multiple copies of this script. Single instance can handle any number of objects.


RE: Visualization problem - AlexLV - 05.08.2022

(05.08.2022, 15:53)admin Wrote: You don't need to make multiple copies of this script. Single instance can handle any number of objects.

you mean that for different groups I need use the same class name, and it will work?  For me not worked..So I decided to change class names

Alex

and blink not working anyway..


RE: Visualization problem - admin - 05.08.2022

Yes, the same class name can be used for all objects that should change color and blink. Check that your custom CSS has correct entries for blink animation.