Commit 50016803 by Valera Rozuvan Committed by Alexander Kryklia

Implemented isReusable feature. Not fully tested.

parent 98977cab
...@@ -69,10 +69,6 @@ define( ...@@ -69,10 +69,6 @@ define(
updateInput.update(state); updateInput.update(state);
} }
}()); }());
setTimeout(function () {
logme('After 1000 ms:', state);
}, 1000);
} }
}); });
......
...@@ -198,9 +198,16 @@ define(['logme'], function (logme) { ...@@ -198,9 +198,16 @@ define(['logme'], function (logme) {
function getById(state, type, id) { function getById(state, type, id) {
return (function (c1) { return (function (c1) {
while (c1 < state[type].length) { while (c1 < state[type].length) {
if (state[type][c1].id === id) { if (type === 'draggables') {
return state[type][c1]; if ((state[type][c1].id === id) && (state[type][c1].isOriginal === true)) {
return state[type][c1];
}
} else { // 'targets'
if (state[type][c1].id === id) {
return state[type][c1];
}
} }
c1 += 1; c1 += 1;
} }
......
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