06-30-2020 22:18
06-30-2020 22:18
I'm using a Virtual Tile List in my app and I'm seeing some strange things. Let's start with the easiest one to show. The documentation:
https://dev.fitbit.com/build/reference/device-api/document/#interface-virtualtilelist
clearly shows that a VirtualTileList has an "overflow" property.
In my app, I have this code:
let VTList = document.getElementById("my-list");
for (let i in VTList) {
console.log(`VTList contains: VTList.${i}`);
}
and the output shows:
[10:11:10 PM] App: VTList contains: VTList.length
[10:11:10 PM] App: VTList contains: VTList.firstVisibleTile
[10:11:10 PM] App: VTList contains: VTList.lastVisibleTile
[10:11:10 PM] App: VTList contains: VTList.delegate
[10:11:10 PM] App: VTList contains: VTList.listeners
[10:11:10 PM] App: VTList contains: VTList.constructor
[10:11:10 PM] App: VTList contains: VTList.updateTile
[10:11:10 PM] App: VTList contains: VTList.redraw
[10:11:10 PM] App: VTList contains: VTList.clipChildren
[10:11:10 PM] App: VTList contains: VTList.style
[10:11:10 PM] App: VTList contains: VTList.x
[10:11:10 PM] App: VTList contains: VTList.y
[10:11:10 PM] App: VTList contains: VTList.width
[10:11:10 PM] App: VTList contains: VTList.height
[10:11:10 PM] App: VTList contains: VTList.text
[10:11:10 PM] App: VTList contains: VTList.image
[10:11:10 PM] App: VTList contains: VTList.value
[10:11:10 PM] App: VTList contains: VTList.mode
[10:11:10 PM] App: VTList contains: VTList.state
[10:11:10 PM] App: VTList contains: VTList.highlight
[10:11:10 PM] App: VTList contains: VTList.getBBox
[10:11:10 PM] App: VTList contains: VTList.parent
[10:11:10 PM] App: VTList contains: VTList.nextSibling
[10:11:10 PM] App: VTList contains: VTList.firstChild
[10:11:10 PM] App: VTList contains: VTList.children
[10:11:10 PM] App: VTList contains: VTList.textContent
[10:11:10 PM] App: VTList contains: VTList.innerText
[10:11:10 PM] App: VTList contains: VTList.getElementById
[10:11:10 PM] App: VTList contains: VTList.getElementsByClassName
[10:11:10 PM] App: VTList contains: VTList.getElementsByTypeName
[10:11:10 PM] App: VTList contains: VTList.getElementsByTagName
[10:11:10 PM] App: VTList contains: VTList.sendEvent
[10:11:10 PM] App: VTList contains: VTList.animate
[10:11:10 PM] App: VTList contains: VTList.id
[10:11:10 PM] App: VTList contains: VTList.class
[10:11:10 PM] App: VTList contains: VTList.type
[10:11:10 PM] App: VTList contains: VTList.layer
[10:11:10 PM] App: VTList contains: VTList.addEventListener
[10:11:10 PM] App: VTList contains: VTList.removeEventListener
[10:11:10 PM] App: VTList contains: VTList.dispatchEvent
(Obviously, I clipped the filename and line numbers off the end of these output lines in order to save space in this note.)
So, you'll notice that while this output clearly show that a VirtualTileList has the expected "firstVisibleTile", "lastVisibleTile", etc., it clearly does not have "overflow".
I see the same type of thing when I look at the VirtualTileItem properties; no "overflow".
Now, this is frustrating because my app will display some tile labels with short, 3 letter, labels in a very tall tile and overs, with 2 or 3 word labels, in a much shorter tile, where upon the label is clipped. At least it is sometimes clipped and other times it will display all of text. It's very inconsistent! I'd like to set "overflow" to "visible" and see what difference that may make, but there's no "overflow" property, even though the documentation clearly says there should be!
What's up? Anyone know?
Answered! Go to the Best Answer.
07-08-2020 15:03
07-08-2020 15:03
Ok, since no one seems to know anything about this, I'll answer my own question. 🙂
I happened upon Derek Wilson's web page about Virtual Tile Lists, where he describes the same problem I'm seeing and he happened upon a work-around! Here's the link. Thank you, Derek!
http://derekwilson.net/blog/2020/04/23/fitbit-vlist-management
07-08-2020 15:03
07-08-2020 15:03
Ok, since no one seems to know anything about this, I'll answer my own question. 🙂
I happened upon Derek Wilson's web page about Virtual Tile Lists, where he describes the same problem I'm seeing and he happened upon a work-around! Here's the link. Thank you, Derek!
http://derekwilson.net/blog/2020/04/23/fitbit-vlist-management