Testing preventing scroll

This commit is contained in:
Linus Miller 2017-02-23 20:02:36 +01:00
parent 2216758d14
commit bedcf95596
3 changed files with 21 additions and 2 deletions

View File

@ -1,6 +1,8 @@
.gu-mirror { div.item.gu-mirror {
position: fixed !important; position: fixed !important;
margin: 0 !important; margin: 0 !important;
transform: scale(1.2);
background: darkred;
z-index: 9999 !important; z-index: 9999 !important;
// opacity: 0.8; // opacity: 0.8;
// -ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=80)"; // -ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=80)";

View File

@ -1,12 +1,15 @@
@import "./dragula"; @import "./dragula";
div.container { div.container {
width: 100%;
flex-wrap: wrap;
margin: 0 auto; margin: 0 auto;
display: flex; display: flex;
justify-content: space-between;
> div.location { > div.location {
width: 100px; width: 100px;
height: 100px; height: 100px;
padding: 40px; padding: 10px;
&.over { &.over {
> .item { > .item {
transform: scale(1.3); transform: scale(1.3);
@ -27,3 +30,8 @@ div.item {
justify-content: center; justify-content: center;
align-items: center; align-items: center;
} }
pre {
width: 100%;
overflow: scroll;
}

View File

@ -12,6 +12,7 @@ const drake = dragula(containers, {
// // console.log(target); // // console.log(target);
// return true; // return true;
ignoreInputTextSelection: false,
// } // }
}); });
@ -41,6 +42,14 @@ drake.on('drop', (el, target, source) => {
} }
}); });
function prevent(e) {
e.preventDefault();
}
document.body.addEventListener('touchmove', (e) => {
if (e.target.classList.contains('item')) e.preventDefault();
}, { passive: false });
drake.on('over', (el, target, source) => { drake.on('over', (el, target, source) => {
if (target !== source) { if (target !== source) {
target.classList.add('over'); target.classList.add('over');