03-20-2018 08:19
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post

03-20-2018 08:19
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post
- Who Voted for this post?
Hi guys,
I've been searching the docs and the channels but I can't seem to find an example of the marquee component.
Could someone share how they've been using it?
Answered! Go to the Best Answer.
Accepted Solutions
03-21-2018 11:45
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post

SunsetRunner
03-21-2018 11:45
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post
- Who Voted for this post?
We are working on updating the documentation and the UI Component marquee is part of it.
In the meantime, this is how you can use it. First add the import statement in your widgets.gui file
<link rel="import" href="/mnt/sysassets/widgets/marquee_text_widget.gui" />
And in the gui file you want to display the marquee, you can use it like this
<svg> <use href='#marquee-text' font-size='32' width='100%' height='100%' fill='white'> <set href='group/text' attributeName='text-buffer' to='Bacon ipsum dolor amet sausage prosciutto tongue turducken tail.' /> </use> </use> </svg>
03-21-2018 11:45
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post

SunsetRunner
03-21-2018 11:45
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post
- Who Voted for this post?
We are working on updating the documentation and the UI Component marquee is part of it.
In the meantime, this is how you can use it. First add the import statement in your widgets.gui file
<link rel="import" href="/mnt/sysassets/widgets/marquee_text_widget.gui" />
And in the gui file you want to display the marquee, you can use it like this
<svg> <use href='#marquee-text' font-size='32' width='100%' height='100%' fill='white'> <set href='group/text' attributeName='text-buffer' to='Bacon ipsum dolor amet sausage prosciutto tongue turducken tail.' /> </use> </use> </svg>
03-22-2018 05:31
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post

03-22-2018 05:31
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post
- Who Voted for this post?
Sure no problem, writing docs is always a pain in the #ss .
hanks!!!
03-23-2018 07:11
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post

03-23-2018 07:11
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post
is there maybe an option to control the speed? It is moving kinda fast by default, not sure it would fit my style

03-27-2018 17:06
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post


03-27-2018 17:06
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post
- Who Voted for this post?
Try adding the `value` attribute to the `<use>`.
<use value="500" ....
03-28-2018 06:19
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post

03-28-2018 06:19
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post
ok, that's much better. Thanks!!

05-10-2018 03:31
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post

05-10-2018 03:31
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post
How do you change the text inside the Marquee programmatically? Where does the 'id' go and what attribute do you change in the javascript?

05-10-2018 04:50
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post

05-10-2018 04:50
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post
- Who Voted for this post?
<use href='#marquee-text' id="address_address" class="h1 address_address" font-size="70" x="0" fill="mediumpurple" value="40">
....
</use>
title.text = 'someText';
If you just select the marquee like any other element by id you can set the text val
05-10-2018 05:02
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post

05-10-2018 05:02
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post
Wow... was overthinking it! Also I put the id in the wrong spot.

05-10-2018 05:19
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post

05-10-2018 05:19
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post
Is there any way to make it pause the marquee after it finishes a scroll for a few seconds? I tried disabling; but that leaves it where ever it stops, and then resets it on enable.

05-10-2018 05:30
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post

05-10-2018 05:30
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post
Not really sure but maybe you can set the value to 0 ?

05-11-2018 05:11
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post

05-11-2018 05:11
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post
It looks like it would be a pain. Clearing and resetting the text puts it back at the beginning; but there doesn't seem be a way to see where along the scroll it is; su you have to time it and then on an interval disable and re-set the text and then re-enable it.

09-15-2022 21:52
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post

09-15-2022 21:52
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post
Setting the speed in the SVG is fine, it can also be done in a linked stylesheet. But what I can't seem to do is change the speed programmatically. I've tried element.style.value="120", element.value="120", element.setAttribute("value","120") -- and tried both numbers and strings. element.value generates an error if I don't provide a number - but it doesn't seem to take effect.

09-15-2022 22:37
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post

SunsetRunner
09-15-2022 22:37
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post
It is very well possible, that this value is hardcoded in the underlying symbol, so every change you make would be overwritten by that one. Just a guess. (To be sure you could check the symbol in the simulator-files.)

09-15-2022 23:28
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post


09-15-2022 23:28
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post
I suspect that .value isn't implemented in the JS bindings.
As a kludge, you can change .class at runtime. You'll need a separate CSS rule for each .class, and just put the value in each one.
I don't know how 'dynamic' this will be; eg, if you change the class, the new value may not take effect without some messing around (or ever). I know it works at least the first time!
Obviously this will be a bit limiting if you want heaps of different values.
Gondwana Software

09-16-2022 05:11
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post

09-16-2022 05:11
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post
Peter,
Thanks. But I'm curious about your statement that "...it works at least the first time" - I've been unable to make it change at all.
I've attempted to change the class using e.className = "newClass", e.className.basVal = "newClass", and e.setAttributes("class","newClass"). None of these work at all. What method did you use?
Joey

09-16-2022 09:45 - edited 09-16-2022 09:46
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post

SunsetRunner
09-16-2022 09:45 - edited 09-16-2022 09:46
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post
If value isn't exposed and class doesn't work for switching, you could perhaps try a workaround by grouping the marquee and animate additionally or alternatively.

09-16-2022 10:47
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post

09-16-2022 10:47
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post
Barbara,
I tried those approaches, but none worked dynamically. The only solution I found (and chose not to implement) was to have 3 or 4 speeds defines on duplicate marquees which were selectively hidden. Not so much fun, that. For the time being I'm just going to pick a good rate and hard-code it.
J.

09-16-2022 10:58
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post

SunsetRunner
09-16-2022 10:58
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post
dynamically. But I agree, that it would be semi-fun to fiddle out all
necessary settings.
Last - but very ugly - idea:
Having multiple copies of the use with differnt speed and then switch
display inline/none

09-16-2022 11:01
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post

SunsetRunner
09-16-2022 11:01
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post
Although... then it might be eaier to write your own marquee from scratch 😅

