Sencha/ext - How Manipulate Svg Element Included Inside An Svg File ?!
This is my problem.... 'mon' function works if i set html property directly with svg code like this: html: ' I can m
Solution 1:
sure you can, the console in this sample will show "cirkel", the type of the embed has to be set, the contents has to be valid SVG and this sample needs the defer because the loading of the SVG takes some time. Hope this helps Grtz
<head><linkrel="stylesheet"type="text/css"href="ext/resources/css/ext-all-gray.css" /><scripttype="text/javascript"src="ext/bootstrap.js"></script><scripttype="text/javascript">Ext.onReady(function(){
var win = newExt.Window({
width : 300,
height : 150,
layout : 'fit',
html: '<embed src="test.svg" type="image/svg+xml" />'
});
win.show();
var delayedTask = newExt.util.DelayedTask().delay(400, function(){
console.log(window.document.plugins[0].getSVGDocument().firstChild.childNodes[1].id)
}, win);
});
</script></head><body></body></html>
Here The contents of the test.svg file
<svgxmlns="http://www.w3.org/2000/svg"version="1.1"><circleid="cirkel"cx="100"cy="50"r="40"stroke="black"stroke-width="2"fill="red"/></svg>
Post a Comment for "Sencha/ext - How Manipulate Svg Element Included Inside An Svg File ?!"