Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Merge branch 'master' of github.com:aliasaria/scrumblr

  • Loading branch information...
commit 5bf629439c35af53ba7cf118968199b6b7a88594 2 parents cb0afcf + 3a80c7c
@aliasaria authored
Showing with 19 additions and 5 deletions.
  1. +19 −4 client/script.js
  2. +0 −1  lib/data/mongodb.js
View
23 client/script.js
@@ -3,7 +3,7 @@ var totalcolumns = 0;
var columns = [];
var currentTheme = "bigcards";
var boardInitialized = false;
-
+var keyTrap = null;
var socket = io.connect();
@@ -154,7 +154,9 @@ function getMessage( m )
}
-
+$(document).bind('keyup', function(event) {
+ keyTrap = event.which;
+});
function drawNewCard(id, text, x, y, rot, colour, sticker, animationspeed)
{
@@ -185,12 +187,25 @@ function drawNewCard(id, text, x, y, rot, colour, sticker, animationspeed)
snap: false,
snapTolerance: 5,
containment: [0,0,2000,2000],
- stack: ".card"
+ stack: ".card",
+ start: function (event, ui) {
+ keyTrap = null;
+ },
+ drag: function (event, ui) {
+ if (keyTrap == 27) {
+ ui.helper.css(ui.originalPosition);
+ return false;
+ }
+ }
}
);
-
+
//After a drag:
card.bind( "dragstop", function(event, ui) {
+ if (keyTrap == 27) {
+ keyTrap = null;
+ return;
+ }
var data = {
id: this.id,
View
1  lib/data/mongodb.js
@@ -164,7 +164,6 @@ db.prototype = {
);
},
setBoardSize: function(room, size) {
- this.room.findOne({name:room})
this.rooms.update(
{name:room},
{$set:{'size':size}}
Please sign in to comment.
Something went wrong with that request. Please try again.