SVG image xlink:href 设置失败_html/css_WEB-ITnose

WBOY
Release: 2016-06-24 11:48:03
Original
1781 people have browsed it

  公司比较频繁的业务需求,需要在地图上面,标注地区的信息,考虑到兼容性问题,在实际开发中是通过raphael.js绘制地图信息,进行相关交互

产品部门同事辛苦的画SVG地图,可配置地图块与实际地区code之间的关系,又比较麻烦,就可了相关配置信息的工具,通过AAUTO,IE内核写的

最近实际使用了下node-webkit + 有新项目地图配置需要升级 + 看了些avalon.js,准备升级下配置工具,这个等完成了分享下,顺便分享下最近填过的坑

  扯了半天背景,进入正题

  SVG image xlink:href 设置失败

  实际是在使用avalon的时候, SVG节点内需要引入图片,用作点的显示,通过level属性,动态修改图形

Copy after login

  在修改level值后没有任何反映,查了半天资料未果,最后试了下,发现是xlink:href在一开始需要有相关默认值,在模版生成节点的时候其实是没有这个属性的导致的,所以手动添加了xlink:href属性

Copy after login

source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!