Solved. Bit of a workaround but simpler than I expected
const var pnl_DETECT = Content.getComponent("pnl_DETECT"); const var tile_DRAGROP = Content.getComponent("tile_DRAGROP"); const var pnl_BLOCK = Content.getComponent("pnl_BLOCK"); pnl_DETECT.setMouseCallback(function(event) { var w = this.getWidth(); var h = this.getHeight(); var isMouseOver = (event.x >= 0 && event.x <= w && event.y >= 0 && event.y <= h); var isDragging = event.drag || event.mouseDown || (event.x != this.data.lastX || event.y != this.data.lastY); this.data.lastX = event.x; this.data.lastY = event.y; if (isMouseOver && isDragging) { pnl_BLOCK.showControl(false); } else { pnl_BLOCK.showControl(true); } });