简体   繁体   中英

How to use SVGs as an object in Sencha Touch?

Is it possible to embedded a SVG within the DOM (to be used as an object)? I have a huge SVG image with small different images on it, and depending on some logic, this small images should be appear or disappear. Here is some javascript code that can handle this:

function changegraphic(type) { 
    document.getElementsByClassName("Type").style.display = 'none'; 
    document.getElementById("image-type"+type).style.display = 'block'; 
}

您好pompeyo,我相信sencha touch具有svg / canvas支持,因为您在下面的文档链接中,您应该采取一些解决方法来解决您的问题。.http://docs.sencha.com/touch/2.2.1/#!/api/Ext 。 draw.engine.Svg

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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