Commit ddafa735 authored by techird's avatar techird

add selected status into tmpData

parent e67dffb4
......@@ -9,11 +9,17 @@ kity.extendClass(Minder, {
var i = 0;
current.forEach(function(node) {
if (last.indexOf(node) == -1) changed.push(node);
if (last.indexOf(node) == -1) {
changed.push(node);
node.setTmpData('selected', true);
}
});
last.forEach(function(node) {
if (current.indexOf(node) == -1) changed.push(node);
if (current.indexOf(node) == -1) {
changed.push(node);
node.setTmpData('selected', false);
}
});
while (i < changed.length) changed[i++].render();
......@@ -112,6 +118,6 @@ kity.extendClass(Minder, {
kity.extendClass(MinderNode, {
isSelected: function() {
return (~this.getMinder().getSelectedNodes().indexOf(this));
return this.getTmpData('selected');
}
});
\ No newline at end of file
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