Commit 417d3c1ef9e250a2e8a514b4db11c113b21dfe18
use observeables and ease-in
mix irving committed on 2/14/2018, 12:08:39 AMParent: 4e6ec20947fcc765efbf7a8e5947553f574943da
Files changed
app/html/blogCard.js | changed |
app/html/blogCard.mcss | changed |
app/html/blogCard.js | ||
---|---|---|
@@ -105,9 +105,8 @@ | ||
105 | 105 … | } |
106 | 106 … | |
107 | 107 … | var classList = MutantArray(['-arriving']) |
108 | 108 … | if (blog.unread) classList.push('-unread') |
109 | - setImmediate(() => classList.delete('-arriving')) | |
110 | 109 … | |
111 | 110 … | var b = h('BlogCard', { id, classList, 'ev-click': onClick }, [ |
112 | 111 … | h('div.context', [ |
113 | 112 … | api.about.html.avatar(author, 'tiny'), |
@@ -125,7 +124,13 @@ | ||
125 | 124 … | ]) |
126 | 125 … | ]) |
127 | 126 … | ]) |
128 | 127 … | |
128 … | + arrive() | |
129 | 129 … | return b |
130 … | + | |
131 … | + function arrive () { | |
132 … | + if (!b.parentNode) return setTimeout(arrive, 100) | |
133 … | + classList.delete('-arriving') | |
134 … | + } | |
130 | 135 … | }) |
131 | 136 … | } |
Built with git-ssb-web