CharisKomos (Talk | contribs) |
CharisKomos (Talk | contribs) |
||
Line 71: | Line 71: | ||
]; | ]; | ||
function svgFunctionality(element){ | function svgFunctionality(element){ | ||
− | + | ||
leftElements.forEach(function(item, index, array){ | leftElements.forEach(function(item, index, array){ | ||
if(item.id != element.id){ | if(item.id != element.id){ | ||
Line 98: | Line 98: | ||
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) }); | ||
+ | svgDoc.getElementById(item.id).addEventListener('mouseover', function(){ $('#' + item.id).css('cursor', 'pointer') }); | ||
}); | }); | ||
Line 105: | Line 106: | ||
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) }); | ||
+ | svgDoc.getElementById(item.id).addEventListener('mouseover', function(){ $('#' + item.id).css('cursor', 'pointer') }); | ||
}); | }); | ||
Revision as of 15:16, 21 October 2017