Hi Tobias,
вторник, 5 марта 2013 г., 17:54:57 UTC+4 пользователь Tobias Beer написал:
>
> Hi Yakov,
>
> I believe closing the current tiddler first and then opening the new one
> fixes the problem.
>
> that's not an ideal option as it causes the tiddler to open on the bottom,
because the "source" tiddler no longer exists. However, I've found a
workaround: first, I make it invisible, that open the target and then
actually close the "source" tiddler:
var orig_onClickTiddlerLink = onClickTiddlerLink;
onClickTiddlerLink = function(ev) {
var result;
if(ev.shiftKey) {
var tid = story.findContainingTiddler(this);
tid.style.display = "none"; // to "correct" page and zoomer position
result = orig_onClickTiddlerLink(ev);
if(tid) {
var tName = tid.getAttribute("tiddler");
story.closeTiddler(tName);
}
} else
result = orig_onClickTiddlerLink(ev);
return result;
}
[sorry, a bug in google.groups/Opera doesn't allow to make this monospace
in Opera]
I was "lazy" to write this as I feel that in that case I'd better publish
the plugin, but I'm somewhat busy this week..
By the way, I called it FromTiddlerToTiddlerPlugin ;) I'll test the IE
window.event later as well.
Best regards,
Yakov.
--
You received this message because you are subscribed to the Google Groups
"TiddlyWikiDev" 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/tiddlywikidev?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.