要开始写 window resize,有点小激动啊
This commit is contained in:
parent
8f4fc25324
commit
b44fd6d959
|
@ -13,7 +13,7 @@
|
||||||
"Keymap": "wide",
|
"Keymap": "wide",
|
||||||
"Created": 1414080000000000000,
|
"Created": 1414080000000000000,
|
||||||
"Updated": 1414080000000000000,
|
"Updated": 1414080000000000000,
|
||||||
"Lived": 1414080000000000000,
|
"Lived": 1443837436994469575,
|
||||||
"Editor": {
|
"Editor": {
|
||||||
"FontFamily": "Consolas, 'Courier New', monospace",
|
"FontFamily": "Consolas, 'Courier New', monospace",
|
||||||
"FontSize": "13px",
|
"FontSize": "13px",
|
||||||
|
@ -22,7 +22,10 @@
|
||||||
"TabSize": "4"
|
"TabSize": "4"
|
||||||
},
|
},
|
||||||
"LatestSessionContent": {
|
"LatestSessionContent": {
|
||||||
"FileTree": [],
|
"FileTree": [
|
||||||
|
"/Users/Vanessa/Work/GoGoGo/src",
|
||||||
|
"/Users/Vanessa/Work/GoGoGo/src/2"
|
||||||
|
],
|
||||||
"Files": [],
|
"Files": [],
|
||||||
"CurrentFile": "",
|
"CurrentFile": "",
|
||||||
"FileTreeLayout": null,
|
"FileTreeLayout": null,
|
||||||
|
|
|
@ -160,9 +160,7 @@ var session = {
|
||||||
};
|
};
|
||||||
|
|
||||||
sessionWS.onmessage = function (e) {
|
sessionWS.onmessage = function (e) {
|
||||||
console.log('[session onmessage]' + e.data);
|
|
||||||
var data = JSON.parse(e.data);
|
var data = JSON.parse(e.data);
|
||||||
|
|
||||||
switch (data.cmd) {
|
switch (data.cmd) {
|
||||||
case 'create-file':
|
case 'create-file':
|
||||||
var node = tree.fileTree.getNodeByTId(tree.getTIdByPath(data.dir)),
|
var node = tree.fileTree.getNodeByTId(tree.getTIdByPath(data.dir)),
|
||||||
|
@ -192,11 +190,10 @@ var session = {
|
||||||
"isParent": true
|
"isParent": true
|
||||||
}]);
|
}]);
|
||||||
}
|
}
|
||||||
|
|
||||||
break;
|
break;
|
||||||
case 'remove-file':
|
case 'remove-file':
|
||||||
case 'rename-file':
|
case 'rename-file':
|
||||||
var node = tree.fileTree.getNodeByTId(tree.getTIdByPath(data.path));
|
var node = tree.fileTree.getNodeByTId(tree.getTIdByPath(data.path));
|
||||||
tree.fileTree.removeNode(node);
|
tree.fileTree.removeNode(node);
|
||||||
|
|
||||||
var nodes = tree.fileTree.transformToArray(node);
|
var nodes = tree.fileTree.transformToArray(node);
|
||||||
|
|
Loading…
Reference in New Issue