onPosChange(e.x, e.y)} on:mousedown={e => { isDown = true onPosChange(e.clientX, e.clientY) } } on:mousemove={e => { if(isDown){ onPosChange(e.clientX, e.clientY) }}} on:mouseup={() => { isDown = false } } on:touchmove={e => onPosChange(e.touches[0].clientX, e.touches[0].clientY)} on:touchstart={e => onPosChange(e.touches[0].clientX, e.touches[0].clientY)}>