From a9d16260676d606fb0f892e61924409c7a740249 Mon Sep 17 00:00:00 2001 From: Paul van Tilburg Date: Wed, 11 Jan 2012 23:29:41 +0100 Subject: [PATCH] Implement the draggable route/controller (only support images for now) --- plemp.js | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/plemp.js b/plemp.js index 278a6b4..b2d9bae 100644 --- a/plemp.js +++ b/plemp.js @@ -46,8 +46,13 @@ app.get('/', function(req, res) { // The draggable route: provides direct access to the HTML generating code // for draggable objects. app.get('/draggable/:id', function(req, res) { - var file = "./upload/" + req.param.id; - console.debug("Draggable: " + file); + var file = "upload/" + req.params.id; + // Stuff taken from the Camping implementation. + drag = draggables[req.params.id]; + var default_style = "left:" + drag.left + "px;top:" + drag.top + "px;"; + console.log("Draggable: " + file); + res.send(''); }); // The current route: accessed through AJAX requests by the main page