typed-text
typed-text copied to clipboard
add initialWait, removeCursor and hideCursorDuringInitialWait
Just checkout the demo and let me know what you think about the new attributes.
I'm thinking about a string
attribute that takes just a simple string and sets the strings
array accordingly. This might come in handy if you just want to use one string but it will probably mess up the api a bit...
Maybe I messed up code style a bit somwhere x/ sorry for that ;)
If you want me to squash the commits just let me know....
Thanks for the PR! I am gonna check the features when I find some time and reply back, they look cool at a glance!
Hi @toarm,
I checked your PR and I made a few changes here:
- revert commit 16d9228 because a margin is not needed/breaks the layout of the demo in the webcomponents page.
- changed removeCursor to hideCursor. Since you 've already put an id to cursor and use it for hiding, I thought it was cleaner.
Could you also squash the commits where you added and then removed the _firstTyping attribute?
Thanks!
P.S.
I'm thinking about a string attribute that takes just a simple string and sets the strings array accordingly.
I didn't understand what you meant by this
Hi @sespiros , thanks for coming back. I'm quite busy this week x/ I'll do the changes next week (probably at the weekend).
I didn't understand what you meant by this
This is what it looks like if I want to use the element with just a plain string (not an string array):
<typed-text cursor="▍" noretype="" remove-cursor blink
strings="[[someStringArray]]"></typed-text>
<script>
//some polymer element:
...
someStringArray: {
type: Array,
computed: "_computeStringArray(someString)"
},
someString: {
type: String
}
...
_computeStringArray(someString) {
return [someString];
}
</script>
Maybe now it makes more sense to you or am I missing something?