@@ -314,34 +314,33 @@ export class ItemSliding implements ComponentInterface {
314314 try {
315315 // Calculate which options we're using
316316 const options = direction === 'end' ? this . rightOptions : this . leftOptions ;
317- const optsWidth = direction === 'end' ? this . optsWidthRightSide : this . optsWidthLeftSide ;
318317
319- // Phase 1: Reveal options beyond threshold to trigger expandable state
320- // This sets the SwipeEnd or SwipeStart state which expands the expandable option
321- const thresholdAmount = direction === 'end' ? optsWidth + SWIPE_MARGIN : - ( optsWidth + SWIPE_MARGIN ) ;
322- this . setOpenAmount ( thresholdAmount , false ) ;
323-
324- // Add AnimatingFullSwipe flag while preserving the SwipeEnd/SwipeStart state
325- this . state = this . state | SlidingState . AnimatingFullSwipe ;
318+ // Trigger expandable state without moving the item
319+ // Set state directly so expandable option fills its container, starting from
320+ // the exact position where the user released, without any visual snap.
321+ this . state =
322+ direction === 'end'
323+ ? SlidingState . End | SlidingState . SwipeEnd | SlidingState . AnimatingFullSwipe
324+ : SlidingState . Start | SlidingState . SwipeStart | SlidingState . AnimatingFullSwipe ;
326325
327326 await new Promise ( ( resolve ) => setTimeout ( resolve , 100 ) ) ;
328327
329- // Phase 2: Animate off-screen while maintaining the expanded state
328+ // Animate off-screen while maintaining the expanded state
330329 const offScreenDistance = direction === 'end' ? window . innerWidth : - window . innerWidth ;
331330 await this . animateToPosition ( offScreenDistance , 250 ) ;
332331
333- // Phase 3: Trigger action
332+ // Trigger action
334333 if ( options ) {
335334 options . fireSwipeEvent ( ) ;
336335 }
337336
338- // Phase 4: Small delay before returning
337+ // Small delay before returning
339338 await new Promise ( ( resolve ) => setTimeout ( resolve , 300 ) ) ;
340339
341- // Phase 5: Return to closed state
340+ // Return to closed state
342341 await this . animateToPosition ( 0 , 250 ) ;
343342
344- // Phase 6: Reset state
343+ // Reset state
345344 if ( this . item ) {
346345 this . item . style . transition = '' ;
347346 }
0 commit comments