Ti.SvgView
Ti.SvgView copied to clipboard
Eventhandler not triggered
When a SVG image is added to a view, the event handler is not triggered.
Controller: var svgView = require('com.geraudbourdin.svgview'); var svg = svgView.createView({ image : SVG_FILE_A, width : '80', height : '80', top : 0, left : 0, borderColor : 'transparent' }); $.vw1m.add(svg);
function svgClick(e) { Ti.API.info("You clicked the button"); }
View: <View id="vw1m" onClick="svgClick"></View>
Function svgClick is not triggered. Also the following is not working:
svg.addEventListener('click', function(e) { Ti.API.info("You clicked the button"); });
What am I doing wrong? Best regards, Raymond