I'm trying to set up distinct listeners for a list of objects:
for(i=0;i<numInputs;i++) {
var inPort = inputPorts.get(i);
var portName = inPort.getProperty("name");
inPort.shape.attr({ cursor: 'pointer' }).mouseover(function(e) { mouseOverInfo.text("PORT:: "+portName); });
}
What's happening right now is that every port object is only getting the very last element's name as its own. So when I mouse over, I get returned only the last object's name.
How to do this properly?
Thanks