Now I need some help to get to the correct child nodecontent. Any ideas?
function makeNodeDiv(node) {
var esctitle = encodeURIComponent(
node.id);
var title = getNodeTitle(
node.id,tidtree);
var isMissing = !$tw.wiki.tiddlerExists(
node.id);
var linkclass = isMissing ? "tc-tiddlylink-missing":"tc-tiddlylink-resolves";
var linkclass = "tc-tiddlylink " + linkclass;
var nodeclass = getNodeClasses(node);
var nodecontent;
if ( node.template ) {
nodecontent = dm('div',{ "class": nodeclass,
innerHTML: getRenderedNode(node) } );
} else {
var tidlink = dm('a',{"class": linkclass,
text: title,
attributes: { href: '#'+esctitle }
});
nodecontent = dm('div', {"class": nodeclass,
children: [tidlink] });
}
// HACK TEST. NOT OK -> getting domNode by children array :( :(
if (node && nodecontent && nodecontent.children[0] && nodecontent.children[0].children[0]) {
$tw.utils.makeDraggable({
domNode: nodecontent.children[0].children[0],
dragTiddlerFn: function() {return
node.id;},
widget: node.widget
});
}
return nodecontent;
}