I have a function which draws lines using kinetic.js and canvas. I'm trying to find a certain argument from the function and write that argument to the console when I click on each line. How would I go about doing this? FYI, I'm trying to get the argument outside of the function.
Kinetic
function drawLine(name, points, fill, stroke, closed, strokeWidth){
window[name] = new Kinetic.Line({
points: points,
fill: fill,
stroke: stroke,
closed: closed,
strokeWidth: strokeWidth
});
}
drawLine("NST_R01", [938.4, 258.167, 868, 258.167], "", red, "", 3);
The argument I want to get is the name argument.