I am facing an issue with the compiler indicating that the function 'show' is defined but never used. The function show is being used in HTML like this:
<b-card>
<div id="draw-image-test">
<canvas
id="canvasId"
ref="canRef"
@mousemove="show"
/>
</div>
</b-card>
This is followed by a <script>
tag containing the definition of the 'show' function:
function show(){
const canvasMouseTrack = document.getElementById('canvasId')
const rect = canvasMouseTrack.getBoundingClientRect()
console.log(rect.offsetX)
}
Despite this, I am encountering the following error:
'show' is defined but never used no-unused-vars