Commit b45fe0e6 by Alexander Kryklia

update format

parent d3264dd8
......@@ -16,31 +16,31 @@ define(['logme'], function (logme) {
for (c1 = 0; c1 < state.draggables.length; c1++) {
if (state.draggables[c1].x !== -1) {
tempObj = {};
tempObj[state.draggables[c1].id] = {
'x': state.draggables[c1].x,
'y': state.draggables[c1].y
};
tempObj[state.draggables[c1].id] = [
state.draggables[c1].x,
state.draggables[c1].y
];
draggables.push(tempObj);
}
}
stateStr = JSON.stringify({
'targets': false,
'use_targets': false,
'draggables': draggables
});
} else {
for (c1 = 0; c1 < state.targets.length; c1++) {
for (c2 = 0; c2 < state.targets[c1].draggable.length; c2++) {
tempObj = {};
tempObj[state.targets[c1].draggable[c2]] = state.draggables[c1].id;
tempObj[state.targets[c1].draggable[c2]] = state.targets[c1].id;
draggables.push(tempObj);
}
}
stateStr = JSON.stringify({
'targets': true,
'use_targets': true,
'draggables': draggables
});
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment