Commit f7853ab3 authored by Kent Nielsen's avatar Kent Nielsen
Browse files

Reimplementing no-selection on mousemove

parent fb8bb122
......@@ -64,4 +64,8 @@
height: 100%;
}
.no-select{
@include no-select;
}
</style>
<template>
<div class="home" >
<div class="home">
<div id="grid">
<div @mousedown="resizeVertical($event, rowIndex)" class="row" v-for="(rowBlock, rowIndex) in layout" :key="rowIndex" :style="{ height: rowBlock.height + 'px' }">
<div @mousedown="resizeHorizontal($event, rowIndex, colIndex)" class="col" v-for="(colBlock, colIndex) in rowBlock.blocks" :key="colIndex" :style="{ 'flex-grow': colBlock.width }">
......@@ -104,7 +104,7 @@ export default {
this.horizontalResizeObject.col = col;
document.addEventListener("mousemove", this.resizeHorizontalMouseMove, false);
document.addEventListener("mouseup", this.eventRemover, false);
document.getElementsByTagName("html")[0].classList.add("noselect");
document.getElementsByTagName("html")[0].classList.add("no-select");
}
},
......@@ -114,7 +114,7 @@ export default {
this.verticalResizeObject.index = index;
document.addEventListener("mousemove", this.resizeVerticalMouseMove, false);
document.addEventListener("mouseup", this.eventRemover, false);
document.getElementsByTagName("html")[0].classList.add("noselect");
document.getElementsByTagName("html")[0].classList.add("no-select");
}
},
......@@ -122,7 +122,7 @@ export default {
document.removeEventListener("mousemove", this.resizeHorizontalMouseMove, false);
document.removeEventListener("mousemove", this.resizeVerticalMouseMove, false);
document.removeEventListener("mouseup", this.eventRemover, false);
document.getElementsByTagName("html")[0].classList.remove("noselect");
document.getElementsByTagName("html")[0].classList.remove("no-select");
}
},
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment