@threadlabs/looma 0.11.2 → 0.11.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/components/ui-tree-item/ui-tree-item.html +1 -1
- package/components/ui-tree-item/ui-tree-item.js +2 -5
- package/dist/index.js +1 -1
- package/package.json +1 -1
- package/styles/ui-tree-item.css +2 -2
- package/vue/UiTreeItem.vue +1 -1
- package/vue/chunks/UiTreeItem.js +1 -1
- package/vue/components.css +66 -66
|
@@ -298,7 +298,7 @@
|
|
|
298
298
|
/* A hovered row reads its whole name: the label slides far enough to show the end, waits
|
|
299
299
|
there, and comes back. Only when it actually overflows — the controller measures by how
|
|
300
300
|
much — after the controls have taken their place over its end — and hands over the distance
|
|
301
|
-
and a duration from it, so
|
|
301
|
+
and a duration from it, so every name moves at the same speed. */
|
|
302
302
|
.row[data-ui-marquee] > .label > .label-text {
|
|
303
303
|
/* Once, and it stays at the end while the pointer is there: a name that keeps sliding back
|
|
304
304
|
and forth under the pointer is harder to read than one that arrives and holds. */
|
|
@@ -102,7 +102,7 @@ export default function controller(host) {
|
|
|
102
102
|
* at its own width; it has to end where the fade before the controls begins, since the controls
|
|
103
103
|
* overlay the label's end rather than taking width from it.
|
|
104
104
|
*/
|
|
105
|
-
const MARQUEE_SPEED = 36; // CSS pixels per second.
|
|
105
|
+
const MARQUEE_SPEED = 36; // CSS pixels per second, for every name: a clamped duration made short slides crawl.
|
|
106
106
|
// The tree sets this for its items; an item's own prop overrides it either way.
|
|
107
107
|
const marqueeWanted = () => host.state.marquee
|
|
108
108
|
|| getComputedStyle(element).getPropertyValue("--ui-tree-item-marquee").trim() === "1";
|
|
@@ -121,10 +121,7 @@ export default function controller(host) {
|
|
|
121
121
|
const lead = icon?.width ? (rightToLeft ? icon.right - cell.right : cell.left - icon.left) : 0;
|
|
122
122
|
row.style.setProperty("--_marquee-lead", `${Math.max(0, lead)}px`);
|
|
123
123
|
row.style.setProperty("--_marquee-distance", `${rightToLeft ? distance : -distance}px`);
|
|
124
|
-
row.style.setProperty(
|
|
125
|
-
"--_marquee-duration",
|
|
126
|
-
`${Math.min(10, Math.max(1.4, distance / MARQUEE_SPEED)).toFixed(2)}s`
|
|
127
|
-
);
|
|
124
|
+
row.style.setProperty("--_marquee-duration", `${(distance / MARQUEE_SPEED).toFixed(2)}s`);
|
|
128
125
|
row.dataset.uiMarquee = "";
|
|
129
126
|
};
|
|
130
127
|
const stopMarquee = () => {
|