Get position of pointer event *relative to canvas height*

I’m not sure exactly what you need.

In the example Construction of frames with contour/profile , the position of the pointer is displayed.

See ConstructFrame line 1093

function onContainerBMouseMove
getMarkerXY( event.clientX, event.clientY );

reticle.position.set( markerX, markerY, 0 );

xyValue.style.left = event.clientX + 10 + "px";
xyValue.style.top = event.clientY - 10 +"px";

xyValue.innerHTML = Math.round( 10000 *( markerX + 1 ) * sizeFactorL ) / 10000 + " ▪ " + Math.round( 10000 * markerY * sizeFactorL ) / 10000;

and

function getMarkerXY( ecX, ecY )