1
0
mirror of https://github.com/Jermolene/TiddlyWiki5 synced 2024-12-24 17:10:29 +00:00

Tweak Cecily startup routine

We were making too many assumptions about the DOM layout
This commit is contained in:
Jeremy Ruston 2012-10-28 09:06:54 +00:00
parent c030f735a8
commit 1bfa4ca00e

View File

@ -16,13 +16,14 @@ function CecilyListView(listMacro) {
// The list macro we're attached to // The list macro we're attached to
this.listMacro = listMacro; this.listMacro = listMacro;
// Prepare the list frame // Prepare the list frame
var listFrameDomNode = this.listMacro.listFrame.domNode; var listFrame = this.listMacro.listFrame,
listFrameDomNode = listFrame.domNode;
listFrameDomNode.style.position = "relative"; listFrameDomNode.style.position = "relative";
// Position the initial list entries on the map // Position the initial list entries on the map
this.loadMap(); this.loadMap();
for(var t=0; t<listFrameDomNode.children.length; t++) { for(var t=0; t<listFrame.children.length; t++) {
var title = this.listMacro.listFrame.children[t].listElementInfo.title, var title = listFrame.children[t].listElementInfo.title,
domNode = listFrameDomNode.children[t]; domNode = listFrame.children[t].domNode;
domNode.style.position = "absolute"; domNode.style.position = "absolute";
this.positionTiddler(title,domNode); this.positionTiddler(title,domNode);
} }