2014-05-15 93 views
1

如何推荐以下方法来执行以下操作?带子表面的表面html内容

我有一些HTML浏览器内容的表面。 在html中希望有一个额外的滚动视图与表面。 从哪里获取Scrollview的x,y和宽度,高度? 我是否必须等待html呈现出来,然后将内部html部分转换为表面?

回答

3

不能将Surfaces用作其他曲面的容器。您需要收集View,RenderNode或ContainerSurface对象中的所有曲面。

https://github.com/Famous/core/blob/master/View.js https://github.com/Famous/core/blob/master/RenderNode.js https://github.com/Famous/surfaces/blob/master/ContainerSurface.js

请记住,Famo.us勾画出内容的方式是在渲染树的风格。用树的类比,Surface将是一片叶子,前面提到的Objects将更像分支。

以下是你需要了解的Famo.us RenderTree一切:

https://github.com/Famous/guides/blob/master/dev/2014-04-09-render-tree.md

而且,看看每一个所提及的对象的实例。你可以找到最适合您的使用情况下,一个..

https://github.com/Famous/examples/blob/master/src/examples/core/View/example.js https://github.com/Famous/examples/blob/master/src/examples/surfaces/ContainerSurface/example.js

希望这有助于!