- « Previous
-
- 1
- 2
- Next »
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.
09-16-2022 13:55
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post


09-16-2022 13:55
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post
- Who Voted for this post?
index.view:
<svg>
<use id="marquee" href="#marquee-text" font-size="32" y="50%-40" width="100%"
height="80" fill="white" mode="1" class='value50'>
<rect width="100%" height="100%" fill="black" opacity="0.2" />
<set href="group/text" attributeName="text-buffer"
to="Lorem ipsum dolor sit amet, consectetur adipiscing elit." />
<set href="group/separator" attributeName="width" to="150" />
</use>
</svg>
styles.css:
.value50 {
value: 50;
}
.value250 {
value: 250;
}
index.js:
import document from 'document'
const marqueeEl = document.getElementById('marquee')
marqueeEl.class = 'value250'
setTimeout(() => {
marqueeEl.state = "enabled";
}, 2000);
Gondwana Software
09-16-2022 14:41
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post

09-16-2022 14:41
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post
- Who Voted for this post?
Thanks, Peter - thought I'd tried that, must have had a typo in the code somewhere.
J.
09-16-2022 14:44
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post


09-16-2022 14:44
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post
.class vs. .className? It's a bit... non-standard.
Gondwana Software

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


09-16-2022 16:08
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post
As an aside, I thought this was interesting:
<symbol id="marquee-text" class="marquee-text" type="marquee-text-widget"
overflow='hidden' focusable='false' pointer-events='none'
system-events='all' data-size='16'>
<g transform='scale(0.1)'>
<g id="group" transform='translate(0) scale(10)'>
<text id="text" height='100%' fill='inherit' fill-opacity='inherit'
font-size='inherit' font-weight='inherit' text-decoration='inherit'
text-length='64'/>
<rect id="separator" x='$' width='87' height='0' fill='none'/>
<text id="copy" x='$' height='100%' fill='inherit' fill-opacity='inherit'
font-size='inherit' font-weight='inherit' text-decoration='inherit'
text-length='64'/>
</g>
</g>
</symbol>
Source: C:\Users\Peter\AppData\Local\Programs\@fitbitsimulator\resources\static\devicesim\win\atlas\Resources\widgets\marquee_text_widget.gui
I would have expected an <animateTransform> in there. I wonder if the movement is being done step-by-step in JS.
The scale() shenanigans are also interesting. Perhaps they allow smoother (less discrete) movement.
Gondwana Software

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

09-16-2022 17:09
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post
Peter,
The same things puzzle me. I also wonder if any events are emitted. I notice the system-events="all" on the symbol element. I was hoping the marquee would emit something each time the buffer repeated. It would be nice to show n runs of the text then stop it programmatically.
Thanks very much for your help on this.
J.

09-16-2022 18:16 - edited 09-16-2022 18:17
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post


09-16-2022 18:16 - edited 09-16-2022 18:17
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post
I suspect the system-events thing is to allow the marquee to start when touched, if configured to do so.
For extra capabilities, I think Barb's suggestion (recreating the component as a widget) would be the way to go. It's tempting...
Gondwana Software

09-17-2022 00:49
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post

SunsetRunner
09-17-2022 00:49
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post
If anybody is ever going to write a marquee-widget, please add an unrotated text to being able to rotate (getBBox()) 😉

09-23-2022 20:49
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post


09-23-2022 20:49
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post
- Who Voted for this post?
@RisoSystems: here's a crude and negligibly-tested alternative to marquee-test. Relevant features:
- speed can be changed in JS
- animation events can be obtained
- repeatCount can be set
- (various other bloatware)
Sorry BarbWire, it isn't <g>-proof.
Gondwana Software
09-24-2022 00:35 - edited 09-24-2022 00:36
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post

SunsetRunner
09-24-2022 00:35 - edited 09-24-2022 00:36
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post


- « Previous
-
- 1
- 2
- Next »