简体   繁体   English

我可以在canvas / pixijs上使autolayout js工作吗?

[英]Can i make autolayout js work on canvas / pixijs

I am new to javascript/HTML5 我是javascript / HTML5的新手

I found that there is a layout library for js called here 我发现有对JS布局库调用这里

it works perfectly on the DOM elements, and the examples provided by the documentation are also for DOM. 它在DOM元素上完美运行,文档提供的示例也适用于DOM。

Does anyone know if it also work on canvas and how. 有谁知道它是否也适用于画布以及如何使用。 If it is not , is there any replacement? 如果不是,有没有更换?

Well if you can create views using autolayout then it's just a matter of creating a helper class or function that will render out the objects onto the canvas. 好吧,如果你可以使用autolayout创建视图,那么只需要创建一个辅助类或函数来将对象渲染到画布上。 Providing you know what the elements 'should' be doing on the canvas then it's just a matter of feeding in the values from autolayout. 如果您知道元素应该在画布上做什么,那么只需要从autolayout中提取值即可。

I could code an example of this but your question is really broad, though I hope this kind of helps. 我可以编写一个这样的例子,但你的问题确实很广泛,尽管我希望这会有所帮助。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM