fnp
/
fnpeditor.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Removing bullet/enum from list item containing nested list
[fnpeditor.git]
/
modules
/
nodeFamilyTree
/
nodeFamilyTree.js
diff --git
a/modules/nodeFamilyTree/nodeFamilyTree.js
b/modules/nodeFamilyTree/nodeFamilyTree.js
index
3c78bd1
..
b5cb56e
100644
(file)
--- a/
modules/nodeFamilyTree/nodeFamilyTree.js
+++ b/
modules/nodeFamilyTree/nodeFamilyTree.js
@@
-31,31
+31,32
@@
return function(sandbox) {
setNode: function(node) {
\r
console.log('familyTree sets node');
\r
var nodes = this.nodes = {};
\r
setNode: function(node) {
\r
console.log('familyTree sets node');
\r
var nodes = this.nodes = {};
\r
+ this.currentNode = node;
\r
var parentNode = node.parent();
\r
var parent = undefined;
\r
\r
if(parentNode) {
\r
parent = {
\r
var parentNode = node.parent();
\r
var parent = undefined;
\r
\r
if(parentNode) {
\r
parent = {
\r
- repr: parentNode.
tag + (parentNode.klass ? ' / ' + parentNode.klass
: ''),
\r
- id: parentNode.
id
\r
+ repr: parentNode.
getTag() + (parentNode.getClass() ? ' / ' + parentNode.getClass()
: ''),
\r
+ id: parentNode.
getId()
\r
};
\r
};
\r
- this.nodes[parentNode.
id
] = parentNode;
\r
+ this.nodes[parentNode.
getId()
] = parentNode;
\r
}
\r
\r
var children = [];
\r
node.children().each(function() {
\r
var child = this;
\r
}
\r
\r
var children = [];
\r
node.children().each(function() {
\r
var child = this;
\r
- children.push({repr: child.
tag + (child.klass ? ' / ' + child.klass : ''), id: child.id
});
\r
- nodes[child.
id
] = child;
\r
+ children.push({repr: child.
getTag() + (child.getClass() ? ' / ' + child.getClass() : ''), id: child.getId()
});
\r
+ nodes[child.
getId()
] = child;
\r
});
\r
this.dom.empty();
\r
this.dom.append($(template({parent: parent, children: children})));
\r
},
\r
});
\r
this.dom.empty();
\r
this.dom.append($(template({parent: parent, children: children})));
\r
},
\r
- highlightNode: function(
wlxml
Node) {
\r
- this.dom.find('a[data-id="'+
wlxmlNode.id
+'"]').addClass('rng-common-hoveredNode');
\r
+ highlightNode: function(
canvas
Node) {
\r
+ this.dom.find('a[data-id="'+
canvasNode.getId()
+'"]').addClass('rng-common-hoveredNode');
\r
},
\r
},
\r
- dimNode: function(
wlxml
Node) {
\r
- this.dom.find('a[data-id="'+
wlxmlNode.id
+'"]').removeClass('rng-common-hoveredNode');
\r
+ dimNode: function(
canvas
Node) {
\r
+ this.dom.find('a[data-id="'+
canvasNode.getId()
+'"]').removeClass('rng-common-hoveredNode');
\r
}
\r
}
\r
\r
}
\r
}
\r
\r
@@
-65,17
+66,18
@@
return function(sandbox) {
start: function() {
\r
sandbox.publish('ready');
\r
},
\r
start: function() {
\r
sandbox.publish('ready');
\r
},
\r
- setNode: function(node) {
\r
- view.setNode(node);
\r
+ setNode: function(canvasNode) {
\r
+ if(!canvasNode.isSame(view.currentNode))
\r
+ view.setNode(canvasNode);
\r
},
\r
getView: function() {
\r
return view.dom;
\r
},
\r
},
\r
getView: function() {
\r
return view.dom;
\r
},
\r
- highlightNode: function(
wlxml
Node) {
\r
- view.highlightNode(
wlxml
Node);
\r
+ highlightNode: function(
canvas
Node) {
\r
+ view.highlightNode(
canvas
Node);
\r
},
\r
},
\r
- dimNode: function(
wlxml
Node) {
\r
- view.dimNode(
wlxml
Node);
\r
+ dimNode: function(
canvas
Node) {
\r
+ view.dimNode(
canvas
Node);
\r
}
\r
};
\r
};
\r
}
\r
};
\r
};
\r