Closed H1D closed 9 years ago
Changing line has no effect because defaultHeight
is not really used now and all cloak-views have 0 height so ember-cloaks
uncloaks all of them since they are all on screen =))
I found it was best to render them all up to get initial heights and then cloak, but that might just be better for our use case. I would love to fix this to help you out if I can. What would you suggest?
@eviltrout I did 3 things in my fork:
defaultHeight
defaultCloakHeight
support (method on a model that predicts height of a view)You might find that 2. is kind of "tricky hacky" but cmon'! ember-cloaking
is a kind of hack by itself =)
BTW 2. can be improved greatly: after first view rendered we can calculate "correction coefficient" based on predicted and real height and then use it for all other views.
So what do you think?
@eviltrout ping
Sorry it's been a long week! I will look at this soon.
On Thursday, February 27, 2014, Artem Suschev notifications@github.com wrote:
@eviltrout https://github.com/eviltrout ping
Reply to this email directly or view it on GitHubhttps://github.com/eviltrout/ember-cloaking/issues/9#issuecomment-36236225 .
OK, understood
Sure, those seem reasonable. Send over a PR and I'll merge it :)
@eviltrout I believe we can close this: https://github.com/eviltrout/ember-cloaking/pull/15
It turned out that
ember-cloakning
uncloaks all views first and only then cloaks it back :expressionless:Demo http://jsbin.com/ACikukuCA/35/edit (check out console)
Is it by design?
We can change this line to
this.cloak()
but it's half-measure. Some kind of progressive rendering should be implemented which would check what's on screen after each view uncloaked.