kimoa / svg-edit

Automatically exported from code.google.com/p/svg-edit
MIT License
3 stars 0 forks source link

addSvgElementJson #832

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
I am trying to add Elements with a certain Image Pattern.  How do I use 
addSvgElementJson to do something like

<defs>
  <pattern y="0" x="0" height="300" width="300" patternUnits="userSpaceOnUse" id="mShapeColor">
  <image xlink:href="gcolors/sg-memo.jpg" id="svg_1" height="300" width="300" y="0" x="0"/>
  </pattern>
 </defs>

Thanks

Original issue reported on code.google.com by stonewar...@gmail.com on 19 Jul 2011 at 8:17

GoogleCodeExporter commented 9 years ago
Really wished we had a Forum to discuss issues.

What I did to get this to work is use the appendChild() function.  I had to 
also make a small change in the svgCanvas.js file to allow the findDefs() 
function to available outside the svgCanvas.js file.

var findDefs = this.findDefs = function() {
instead of
var findDefs = function() {

Original comment by stonewar...@gmail.com on 20 Jul 2011 at 8:46

GoogleCodeExporter commented 9 years ago
This issue needs to be deleted. 

Original comment by mcdonald...@gmail.com on 25 Jul 2011 at 1:49