mirror of
https://github.com/gchq/CyberChef.git
synced 2025-05-08 07:21:02 -04:00
fix drag & drop settings mobile vs desktop
This commit is contained in:
parent
ede69a7a1a
commit
4ba31236e9
2 changed files with 7 additions and 4 deletions
|
@ -2,5 +2,4 @@
|
||||||
- search-results dropdown
|
- search-results dropdown
|
||||||
- can only drag an op to favourites 1 time
|
- can only drag an op to favourites 1 time
|
||||||
- stupid popovers on deleting favs for instance ( dont always close nicely )
|
- stupid popovers on deleting favs for instance ( dont always close nicely )
|
||||||
|
|
||||||
- UI tests etc.
|
- UI tests etc.
|
||||||
|
|
|
@ -35,14 +35,18 @@ class RecipeWaiter {
|
||||||
initDragAndDrop() {
|
initDragAndDrop() {
|
||||||
const recList = document.getElementById("rec-list");
|
const recList = document.getElementById("rec-list");
|
||||||
|
|
||||||
|
let swapThreshold = this.app.isMobileView() ? 0.60 : 0.40;
|
||||||
|
let animation = this.app.isMobileView() ? 400 : 200;
|
||||||
|
let delay = this.app.isMobileView() ? 200 : 0;
|
||||||
|
|
||||||
// Recipe list
|
// Recipe list
|
||||||
Sortable.create(recList, {
|
Sortable.create(recList, {
|
||||||
group: "recipe",
|
group: "recipe",
|
||||||
sort: true,
|
sort: true,
|
||||||
draggable: "c-ingredient-li",
|
draggable: "c-ingredient-li",
|
||||||
swapThreshold: this.app.isMobileView ? 0.60 : 0.40,
|
swapThreshold: swapThreshold,
|
||||||
animation: this.app.isMobileView() ? 400 : 0,
|
animation: animation,
|
||||||
delay: this.app.isMobileView ? 200 : 0,
|
delay: delay,
|
||||||
filter: ".arg",
|
filter: ".arg",
|
||||||
preventOnFilter: false,
|
preventOnFilter: false,
|
||||||
setData: function(dataTransfer, dragEl) {
|
setData: function(dataTransfer, dragEl) {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue