Difference between revisions of "Template:Greece/TeamRoster"

Line 22: Line 22:
 
  var mySVG = document.getElementById("test_svg");
 
  var mySVG = document.getElementById("test_svg");
 
  var svgDoc;
 
  var svgDoc;
 +
var leftElements = [
 +
{
 +
'id' : 'asteris_mirna_xA0_Image'
 +
},
 +
{
 +
'id' : 'eugene_mirna_xA0_Image'
 +
},
 +
{
 +
'id' : 'charis_mirna_xA0_Image'
 +
},
 +
{
 +
'id' : 'thomas_mirna_xA0_Image'
 +
},
 +
{
 +
'id' : 'elissavet_mirna_xA0_Image'
 +
}
 +
];
 +
var rightElements = [
 +
{
 +
'id' : 'constantine_mirna_xA0_Image'
 +
},
 +
{
 +
'id' : 'komos_mirna_xA0_Image'
 +
},
 +
{
 +
'id' : 'agg_mirna_xA0_Image'
 +
},
 +
{
 +
'id' : 'nafsika_mirna_xA0_Image'
 +
},
 +
{
 +
'id' : 'kst_mirna_xA0_Image'
 +
}
 +
];
 +
 
  mySVG.addEventListener("load",function() {
 
  mySVG.addEventListener("load",function() {
 
       svgDoc = mySVG.contentDocument;
 
       svgDoc = mySVG.contentDocument;
 
       alert("SVG contentDocument Loaded!");
 
       alert("SVG contentDocument Loaded!");
       svgDoc.getElementById('charis_mirna_xA0_Image').setAttribute('transform', 'matrix(0.48, 0, 0, 0.48, 100, 100)');
+
 
 +
 
 +
       leftElements.forEach(function(item, index, array){
 +
console.log('item: ' + item.id);
 +
console.log('index: ' + index);
 +
      svgDoc.getElementById(item.id).setAttribute('transform', 'matrix(0.48, 0, 0, 0.48, -85, 100)');
 +
      })
 
  }, false);
 
  }, false);
  

Revision as of 13:20, 21 October 2017