Commit 15ff8644 authored by Marc Duez's avatar Marc Duez

interface : fix drag/drop visu-separator behavior

- no more unwanted selection
- magnetic border effect
parent 40f2c360
......@@ -55,6 +55,11 @@ ul{
width: 100%;
overflow: hidden;
background: @background;
-khtml-user-select: none;
-webkit-user-select: none;
-moz-user-select: -moz-none;
-ms-user-select: none;
user-select: none;
}
#switch{
......@@ -70,6 +75,11 @@ ul{
height : 100%;
overflow-y : none;
float : left;
-khtml-user-select: auto;
-webkit-user-select: auto;
-moz-user-select: auto;
-ms-user-select: auto;
user-select: auto;
}
#visu, #visu2 {
......@@ -750,6 +760,7 @@ span .substitution{
#visu-separator {
height: 0px;
cursor: move;
cursor: -webkit-grab;
position: relative;
top: -20px;
......
......@@ -42,8 +42,10 @@ Builder.prototype = {
var height2 = position/total_height * 100
if (height2 > 95) height2=99;
if (height2 < 5) height2=0;
if (height2 > 99 || height2 <1) this.dropSeparator()
if (height2 > 90) height2=99;
if (height2 < 10) height2=0;
var height1 = 100 - height2
......@@ -58,6 +60,10 @@ Builder.prototype = {
if (this.drag_separator){
this.m.resize();
this.drag_separator = false;
var sel = window.getSelection();
sel.removeAllRanges();
console.log("drop");
}
}
......
Markdown is supported
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