Fix up debug info and comments
This commit is contained in:
parent
9783aa913f
commit
b722b5f2f3
5
plemp.js
5
plemp.js
|
@ -11,7 +11,6 @@ var express = require("express"),
|
|||
form = require("connect-form"),
|
||||
fs = require('fs'),
|
||||
path = require('path'),
|
||||
util = require("util"),
|
||||
crypto = require("crypto")
|
||||
|
||||
// Set up the Node Express application.
|
||||
|
@ -93,14 +92,14 @@ app.post('/draggables', function(req, res) {
|
|||
res.redirect('home');
|
||||
});
|
||||
|
||||
// The draggables controller: provides direct access to the HTML
|
||||
// The draggable controller: provides direct access to the HTML
|
||||
// generating code for draggable objects.
|
||||
app.get('/draggables/:id', function(req, res) {
|
||||
var file = "../upload/" + req.params.id;
|
||||
console.log("Get draggable: " + file);
|
||||
// Stuff taken from the Camping implementation.
|
||||
drag = draggables[req.params.id];
|
||||
var default_style = "left:" + drag.left + "px;top:" + drag.top + "px;";
|
||||
console.log("Get draggable: " + file);
|
||||
res.send('<img class="draggable" id="' + req.params.id + '" ' +
|
||||
'style="' + default_style + '" src="' + file + '">');
|
||||
});
|
||||
|
|
Reference in a new issue