Registering Click Event
I tried using the following JavaScript on slide enter. The click event registers OUTSIDE the slide but not inside. Basically I just want to capture the coordinates whenever a user clicks on the slide.
function getClickPosition(e) {
var xPosition = e.clientX;
var yPosition = e.clientY;
console.log(xPosition,",",yPosition);
window.cpAPIInterface.setVariableValue("X_COORDINATE",xPosition);
window.cpAPIInterface.setVariableValue("Y_COORDINATE",yPosition);
}
window.addEventListener("click", getClickPosition, false);
