Got note drag-and-drop working in WebKit.
This commit is contained in:
parent
16332656e3
commit
68e31f38be
|
@ -3,6 +3,8 @@ html, body {
|
|||
background-color: #fafafa;
|
||||
text-align: center;
|
||||
font-family: sans-serif;
|
||||
-moz-user-select: none;
|
||||
-webkit-user-select: none;
|
||||
}
|
||||
|
||||
a {
|
||||
|
@ -599,6 +601,7 @@ h1 {
|
|||
-moz-border-radius-bottomright: 5px;
|
||||
-webkit-border-radius: 5px;
|
||||
-moz-user-select: none;
|
||||
-webkit-user-select: none;
|
||||
color: #fafafa;
|
||||
background-color: #fafafa;
|
||||
min-width: 20px;
|
||||
|
@ -910,6 +913,7 @@ h1 {
|
|||
|
||||
.pulldown_label {
|
||||
-moz-user-select: none;
|
||||
-webkit-user-select: none;
|
||||
color: #000000;
|
||||
text-decoration: none;
|
||||
}
|
||||
|
|
|
@ -784,6 +784,10 @@ Editor.prototype.drag = function( event ) {
|
|||
var drop_target = drop_targets[ i ];
|
||||
var target_position = getElementPosition( drop_target );
|
||||
var target_size = getElementDimensions( drop_target );
|
||||
if ( WEBKIT ) {
|
||||
target_position.x -= viewport_position.x;
|
||||
target_position.y -= viewport_position.y;
|
||||
}
|
||||
|
||||
// if the div is wholly above or below the drop target, then it's not overlapping it
|
||||
if ( ( div_position.y < target_position.y && div_position.y + div_size.h < target_position.y ) ||
|
||||
|
|
Reference in New Issue