@@ -11,7 +11,7 @@ import { DECAL_DEBUG_KEY } from './context'
1111
1212const ctx = inject (DECAL_DEBUG_KEY )
1313if (! ctx ) { throw new Error (' [DecalDebugUI] Handle.vue requires the DecalDebugUI context.' ) }
14- const { session, isSnapEnabled, snapAngleDeg, rootRef, commit, cancel } = ctx
14+ const { session, isSnapEnabled, snapAngleDeg, rootRef, cancel } = ctx
1515
1616const MIN_SCALE = 0.25
1717const MAX_SCALE = 3.5
@@ -27,8 +27,6 @@ const isSliderDragging = ref(false)
2727const dragCenter = reactive ({ x: 0 , y: 0 , radius: 0 })
2828
2929const isEditing = computed (() => !! session .value ?.editingEntry .value )
30- const editingMode = computed (() => session .value ?.editingMode .value ?? null )
31- const isUpdating = computed (() => editingMode .value === ' update' )
3230const isDraggingTexture = computed (() => session .value ?.dragTextureIndex .value !== null )
3331const editingZIndex = computed (() => session .value ?.editingEntry .value ?.zIndex ?? null )
3432
@@ -57,11 +55,10 @@ const { x: xDrag, y: yDrag } = useDraggable(dragRef, {
5755 const s = session .value
5856 if (! s ) { return }
5957 s .setUiDragging (false )
60- // Released off-mesh: commit if updating, cancel if creating.
61- if (! s .isCursorOnTarget .value ) {
62- if (isUpdating .value ) { commit () }
63- else { cancel () }
64- }
58+ // Off-mesh release has no valid raycast point — cancel in both modes
59+ // so the decal doesn't land at a garbage position the user can't see.
60+ // (Update reverts to backup, create drops the pending placement.)
61+ if (! s .isCursorOnTarget .value ) { cancel () }
6562 },
6663})
6764
0 commit comments