Fix drag&drop in kanban for mobile

pull/1/head
yflory 4 years ago
parent 5d5276110b
commit eb85946ce2

@ -140,6 +140,9 @@
border: 0; border: 0;
background: transparent; background: transparent;
align-self: flex-start; align-self: flex-start;
@media (hover: none) {
margin-right: 20px;
}
} }
.cp-kanban-cursors { .cp-kanban-cursors {
@ -165,7 +168,10 @@
flex-wrap: wrap; flex-wrap: wrap;
touch-action: none; touch-action: none;
background: @cp_kanban-item-bg; background: @cp_kanban-item-bg;
.tools_unselectable();
touch-action: none;
cursor: move; cursor: move;
cursor: grab;
margin-bottom: 10px; margin-bottom: 10px;
&:last-child { &:last-child {
@ -253,12 +259,14 @@
.kanban-board { .kanban-board {
position: relative; position: relative;
transition: all 0.3s cubic-bezier(0.23, 1, 0.32, 1); transition: all 0.3s cubic-bezier(0.23, 1, 0.32, 1);
margin: 10px;
vertical-align: top; vertical-align: top;
display: flex; display: flex;
flex-flow: column; flex-flow: column;
width: 300px; width: 300px;
margin: 10px 5px; margin: 10px 5px;
@media (hover: none) {
margin-bottom: 30px;
}
&.is-moving.gu-mirror { &.is-moving.gu-mirror {
transform: rotate(3deg); transform: rotate(3deg);
@ -276,12 +284,17 @@
overflow-y: auto; overflow-y: auto;
justify-content: space-around; justify-content: space-around;
min-height: 38px; // Size of one card min-height: 38px; // Size of one card
@media (hover: none) {
padding-right: 30px;
}
} }
header { header {
display: flex; display: flex;
flex-wrap: wrap; flex-wrap: wrap;
align-items: center; align-items: center;
padding: 5px 10px; padding: 5px 10px;
cursor: move;
cursor: grab;
.kanban-title-board { .kanban-title-board {
flex: 1; flex: 1;
min-width: 0; min-width: 0;
@ -299,9 +312,6 @@
#kanban-edit { #kanban-edit {
font-weight: bold; font-weight: bold;
} }
&:hover {
cursor: move;
}
} }
footer { footer {
margin: 10px; margin: 10px;

@ -26,7 +26,7 @@ define([
element: '', element: '',
gutter: '15px', gutter: '15px',
widthBoard: '250px', widthBoard: '250px',
responsive: '700', responsive: 0, //'700',
responsivePercentage: false, responsivePercentage: false,
boards: { boards: {
data: {}, data: {},

Loading…
Cancel
Save