Wicket 和 SVG - 存在任何组件吗?
SVG DOM 可以用 JavaScript 控制,因此它可以支持 AJAX...我想知道 Wicket 是否有一些 SVG 组件。如果 Wicket 可以使用纯 xml/svg
作为输出格式。
快速谷歌搜索仅显示问题在代码牧场。
SVG DOM can be controlled with JavaScript, so it can be AJAX-enabled... I wonder if there are some SVG components for Wicket yet. And if Wicket can have pure xml/svg
as the output format.
Quick googling shows only a question at Code Ranch.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
我不知道你是否还需要 wicket-svg 库。但我在 github 上启动了一个项目,提供 wicket 组件来使用 svg。
请点击此链接:wicket-svg
I don't know if you need a wicket-svg library anymore. But I have started a project at github to provide wicket components to work with svg.
Follow this link: wicket-svg
我不知道构建的组件,但 Wicket 肯定可以将 xml/svg 作为输出格式,并且制作一个呈现 svg 的页面非常简单。
愚蠢的简单示例代码:
如果您将其映射为可添加书签的页面并调用它,它会根据硬编码的 svg(从 w3schools 示例中窃取)显示一个可爱的蓝色矩形。当然,您可以轻松地参数化页面并生成 svg,而不仅仅是发送常量字符串...
我怀疑基于
object
标记构建一个组件也不难,这样svg 可以显示为 html 页面的一部分,而不是像这样显示整个页面,但我还没有尝试这样做。I don't know of components built, but Wicket definitely can have
xml/svg
as output format, and it's quite simple to make a Page that renders svg.Dumb simple example code:
If you map this as a bookmarkable page and call it up, it does display a lovely blue rectangle, as per the hard-coded svg (stolen from a w3schools example). And of course you could easily parametrize the page and generate the svg instead of just sending a constant string...
I suspect it also wouldn't be hard to build a component based on the
object
tag so that svg could be shown as part of an html page rather than being the whole page like this, but I haven't yet tried to do so.