mirror of
https://github.com/mealie-recipes/mealie.git
synced 2025-06-02 13:15:23 -04:00
add touch support for mealplanner (#1295)
This commit is contained in:
parent
010aafa69b
commit
649e34f66e
@ -147,7 +147,7 @@
|
|||||||
</v-list>
|
</v-list>
|
||||||
</v-menu>
|
</v-menu>
|
||||||
<v-spacer></v-spacer>
|
<v-spacer></v-spacer>
|
||||||
<v-btn color="error" small icon @click="actions.deleteOne(mealplan.id)">
|
<v-btn small icon @touchstart.stop @click="actions.deleteOne(mealplan.id)">
|
||||||
<v-icon>{{ $globals.icons.delete }}</v-icon>
|
<v-icon>{{ $globals.icons.delete }}</v-icon>
|
||||||
</v-btn>
|
</v-btn>
|
||||||
</div>
|
</div>
|
||||||
@ -291,10 +291,12 @@ export default defineComponent({
|
|||||||
}
|
}
|
||||||
|
|
||||||
function onMoveCallback(evt: SortableEvent) {
|
function onMoveCallback(evt: SortableEvent) {
|
||||||
|
const supportedEvents = ["drop", "touchend"];
|
||||||
|
|
||||||
// Adapted From https://github.com/SortableJS/Vue.Draggable/issues/1029
|
// Adapted From https://github.com/SortableJS/Vue.Draggable/issues/1029
|
||||||
const ogEvent: DragEvent = (evt as any).originalEvent;
|
const ogEvent: DragEvent = (evt as any).originalEvent;
|
||||||
|
|
||||||
if (ogEvent && ogEvent.type !== "drop") {
|
if (ogEvent && ogEvent.type in supportedEvents) {
|
||||||
// The drop was cancelled, unsure if anything needs to be done?
|
// The drop was cancelled, unsure if anything needs to be done?
|
||||||
console.log("Cancel Move Event");
|
console.log("Cancel Move Event");
|
||||||
} else {
|
} else {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user