What is a good way to know when all surfaces had been initially rendered in famo.us?

ぐ巨炮叔叔 提交于 2019-12-06 21:39:30

The best way in your use case may be to listen for the deploy on each surface (renderable) in each view

surface.on('deploy', function() {...});

and once all of the surfaces have been deployed emit a custom event to the view

thisView._eventOutput.emit('completed-deploy', {data: someData});

You can then listen to each view to know when the renderables are deployed

view.on('completed-deploy', function(data) {....});

Although this does take care of the fact that the renderable is deployed to the DOM, it will not let you know if it is done with any transition of a modifier. In the case you would also need to have a function for flagging when transition is complete in your views, if that is what you need.

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!