Somehow it seems the first version just worked under special conditions :)
....
So this one should be better now.
Be aware: ... it doesn't work with TiddlyWeb / TiddlySpace.
story.displayTiddler =
function(srcElement,tiddler,template,animate,unused,customFields,toggle){
story.coreDisplayTiddler(config.macros.tiddlersBar.tabsAnimationSource,tiddler,template,animate,unused,customFields,toggle);
var title = (tiddler instanceof Tiddler)? tiddler.title : tiddler;
if (config.macros.tiddlersBar.isShown()) {
// save scroll position ... only allowed if TiddlyWeb is _not_
active
if (typeof tiddlyweb == "undefined") {
store.setValue(config.macros.tiddlersBar.currentTiddler,
"scrollPosX", findScrollX());
store.setValue(config.macros.tiddlersBar.currentTiddler,
"scrollPosY", findScrollY());
// console.log("set: ",
config.macros.tiddlersBar.currentTiddler , findScrollY() )
}
story.forEachTiddler(function(t,e){
var scrX, scrY;
if (t!=title) e.style.display="none"
else {
// DON'T allow modification on TiddlyWeb, TiddlySpace ...
because it may clone tiddlers if you view them.
if (typeof tiddlyweb == "undefined") {
// load and set scroll position
scrX = store.getValue(title, "scrollPosX");
scrY = store.getValue(title, "scrollPosY");
// console.log("scroll: ", title , scrY )
}
e.style.display="";
window.scrollTo(scrX, scrY);
}
})
config.macros.tiddlersBar.currentTiddler=title;
}
var e=document.getElementById("tiddlersBar");
if (e) config.macros.tiddlersBar.refresh(e,null);
}
have fun!
mario
--
You received this message because you are subscribed to the Google Groups
"TiddlyWiki" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/tiddlywiki.
For more options, visit https://groups.google.com/d/optout.