-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add mobile support for drag and drop functionality. * **Draggable and Droppable Actions:** - Add touch event listeners (`touchstart`, `touchmove`, `touchend`) in `src/lib/actions/draggable.ts` and `src/lib/actions/droppable.ts`. - Update `handleDragStart` and `handleDragEnd` in `draggable.ts` to handle touch events. - Update `handleDragEnter`, `handleDragLeave`, `handleDragOver`, and `handleDrop` in `droppable.ts` to handle touch events. - Optimize touch event handling in `droppable.ts` by debouncing touch events. * **Styles:** - Add visual feedback styles for touch interactions in `src/lib/styles/dnd.css`. - Add media queries for responsive design in `src/lib/styles/dnd.css`. - Update `src/app.css` to include mobile-specific styles and media queries. * **Svelte Components:** - Update drag and drop logic to handle touch events in `src/routes/+page.svelte`, `src/routes/grid-sort/+page.svelte`, `src/routes/horizontal-scroll/+page.svelte`, `src/routes/nested/+page.svelte`, and `src/routes/simple-list/+page.svelte`. - Add visual feedback for touch interactions in the above Svelte components. --- For more details, open the [Copilot Workspace session](https://copilot-workspace.githubnext.com/thisuxhq/SvelteDnD?shareId=XXXX-XXXX-XXXX-XXXX).
- Loading branch information
Showing
9 changed files
with
73 additions
and
15 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,15 @@ | ||
@import 'tailwindcss/base'; | ||
@import 'tailwindcss/components'; | ||
@import 'tailwindcss/utilities'; | ||
|
||
/* Mobile-specific styles and media queries for better responsiveness */ | ||
@media (max-width: 600px) { | ||
/* Adjust layout and styling for smaller screens */ | ||
.draggable-item { | ||
width: 100%; | ||
} | ||
|
||
.droppable-container { | ||
padding: 10px; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters