CharisKomos (Talk | contribs) |
CharisKomos (Talk | contribs) |
||
Line 23: | Line 23: | ||
var svgDoc; | var svgDoc; | ||
var leftElements = [ | var leftElements = [ | ||
+ | {}, | ||
{ | { | ||
'id' : 'asteris_mirna_xA0_Image', | 'id' : 'asteris_mirna_xA0_Image', | ||
Line 106: | Line 107: | ||
leftElements.forEach(function(item, index, array){ | leftElements.forEach(function(item, index, array){ | ||
− | |||
− | |||
svgDoc.getElementById(item.id).setAttribute('transform', item.translate_before); | svgDoc.getElementById(item.id).setAttribute('transform', item.translate_before); | ||
svgDoc.getElementById(item.id).addEventListener('click', function(){ svgFunctionality(item) }); | svgDoc.getElementById(item.id).addEventListener('click', function(){ svgFunctionality(item) }); | ||
Line 114: | Line 113: | ||
rightElements.forEach(function(item, index, array){ | rightElements.forEach(function(item, index, array){ | ||
− | |||
− | |||
svgDoc.getElementById(item.id).setAttribute('transform', item.translate_before); | svgDoc.getElementById(item.id).setAttribute('transform', item.translate_before); | ||
svgDoc.getElementById(item.id).addEventListener('click', function(){ svgFunctionality(item) }); | svgDoc.getElementById(item.id).addEventListener('click', function(){ svgFunctionality(item) }); | ||
Line 124: | Line 121: | ||
}, false); | }, false); | ||
− | + | /* | |
function moveSection(idStr, xOffset, yOffset) { | function moveSection(idStr, xOffset, yOffset) { | ||
var domElemnt = document.getElementById(idStr); | var domElemnt = document.getElementById(idStr); | ||
Line 132: | Line 129: | ||
domElemnt.setAttribute('transform', transformAttr); | domElemnt.setAttribute('transform', transformAttr); | ||
}else{ console.log('element wasn\'t found'); } | }else{ console.log('element wasn\'t found'); } | ||
− | } | + | }*/ |
</script> | </script> | ||
</html> | </html> |
Revision as of 16:04, 21 October 2017