在哪里可以找到有关布局管理器如何工作的信息(布局管理器内部)?
放入答案或指向某些页面的链接,其中包含有关布局管理器如何工作的信息(布局管理器内部)?
一般而言。用于在浏览器中放置 2d(普通)组件。我想用 javascript 为应用程序框架构建一个布局管理器
Put in an answer or link to some page with information about how Layout Managers work (Layout Managers internals)?
in general matter. For laying 2d (normal) components in a browser. I want to build a layout manager for an application framework in javascript
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
假设我掌握了您的问题,布局管理器执行的典型任务是:
跟踪每个布局组件的位置信息。在浏览器中可以尽可能地映射CSS定位的顶部、左侧、绝对、相对等关系。包括边距、填充、边框等的影响。
这可以被视为同一点,但跟踪图层(通常在您的情况下为 z-index)也很重要。
如果您有能力处理此问题,您已经有了一个良好的开端。通过设计可以根据模板或模式重新排列的布局格式,能够更进一步,这也非常有用。
Assuming I have a grasp of your question, the quintessential tasks a layout manager performs are namely:
Keep track of position information for each layout component. In a browser can go as far as meaning you can map the relationship of css positioning top, left, absolute, relative, etc.. including the affects of margins, padding, borders, etc..
This may be viewed as the same point, but keeping track of layers (usually z-index in your case) is also important.
If you are capable of handling this, you are on to a good start. Being able to take it a step further by designing layout formats that may be rearranged based on a template or schema can also be very useful.