clean the code
parent
867525945d
commit
add35f16fd
|
@ -81,6 +81,7 @@ exports.handleMessage = function(client, message)
|
||||||
|
|
||||||
function handleClientReady(client, message)
|
function handleClientReady(client, message)
|
||||||
{
|
{
|
||||||
|
//send the timeslider client the clientVars, with this values its able to start
|
||||||
createTimesliderClientVars (message.padId, function(err, clientVars)
|
createTimesliderClientVars (message.padId, function(err, clientVars)
|
||||||
{
|
{
|
||||||
if(err) throw err;
|
if(err) throw err;
|
||||||
|
@ -89,6 +90,9 @@ function handleClientReady(client, message)
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Handles a request for a rough changeset, the timeslider client needs it
|
||||||
|
*/
|
||||||
function handleChangesetRequest(client, message)
|
function handleChangesetRequest(client, message)
|
||||||
{
|
{
|
||||||
var granularity = message.data.granularity;
|
var granularity = message.data.granularity;
|
||||||
|
@ -96,6 +100,7 @@ function handleChangesetRequest(client, message)
|
||||||
var end = start + (100 * granularity);
|
var end = start + (100 * granularity);
|
||||||
var padId = message.padId;
|
var padId = message.padId;
|
||||||
|
|
||||||
|
//build the requested rough changesets and send them back
|
||||||
getChangesetInfo(padId, start, end, granularity, function(err, changesetInfo)
|
getChangesetInfo(padId, start, end, granularity, function(err, changesetInfo)
|
||||||
{
|
{
|
||||||
if(err) throw err;
|
if(err) throw err;
|
||||||
|
|
|
@ -120,14 +120,3 @@ function loadBroadcastRevisionsJS()
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// revisionInfo.addChangeset(0, 5, "abcde")
|
|
||||||
// revisionInfo.addChangeset(5, 10, "fghij")
|
|
||||||
// revisionInfo.addChangeset(10, 11, "k")
|
|
||||||
// revisionInfo.addChangeset(11, 12, "l")
|
|
||||||
// revisionInfo.addChangeset(12, 13, "m")
|
|
||||||
// revisionInfo.addChangeset(13, 14, "n")
|
|
||||||
// revisionInfo.addChangeset(14, 15, "o")
|
|
||||||
// revisionInfo.addChangeset(15, 20, "pqrst")
|
|
||||||
//
|
|
||||||
// print (revisionInfo.getPath(15, 0))
|
|
||||||
|
|
File diff suppressed because one or more lines are too long
Loading…
Reference in New Issue