From c520135340d34e94ebf93000c00ac8bd58d1c919 Mon Sep 17 00:00:00 2001 From: ali asaria Date: Sat, 13 Sep 2014 09:33:50 -0400 Subject: [PATCH] drag card target is now more accurate --- client/css/style.css | 4 ++++ client/script.js | 11 +++++++---- 2 files changed, 11 insertions(+), 4 deletions(-) diff --git a/client/css/style.css b/client/css/style.css index fc8c999..5b860f0 100644 --- a/client/css/style.css +++ b/client/css/style.css @@ -552,6 +552,10 @@ input:hover { -webkit-filter: hue-rotate(180deg); }*/ +img { + user-drag: none; -moz-user-select: none; -webkit-user-drag: none; +} + .config { position: fixed; right: 18px; diff --git a/client/script.js b/client/script.js index 5963111..f17980e 100644 --- a/client/script.js +++ b/client/script.js @@ -198,7 +198,8 @@ function drawNewCard(id, text, x, y, rot, colour, sticker, animationspeed) { ui.helper.css(ui.originalPosition); return false; } - } + }, + handle: "div.content" }); //After a drag: @@ -675,6 +676,11 @@ function adjustCard(offsets, doSync) { $(function() { + + //disable image dragging + //window.ondragstart = function() { return false; }; + + if (boardInitialized === false) blockUI(''); @@ -829,8 +835,5 @@ $(function() { containment: 'parent' }); - //disable image dragging - //window.ondragstart = function() { return false; }; - });