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.

Visualization problem
#1
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
Reply
#2
Can you please describe your problem?
------------------------------
Ctrl+F5
Reply
#3
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
Reply
#4
You probably have no elements on the start page. elements on layouts do not count.
------------------------------
Ctrl+F5
Reply
#5
Ok, thanks,

now will add something, did not know about this.

Alex

Yeep, now works Smile

Alex
Reply
#6
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.
Reply
#7
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
Reply
#8
You don't need to make multiple copies of this script. Single instance can handle any number of objects.
Reply
#9
(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..
Reply
#10
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.
Reply


Forum Jump: