https://groups.google.com/group/tiddlywiki/browse_thread/thread/686b4840d96367d0/25b25450a802bd4e?hl=de&lnk=gst&q=triptych#25b25450a802bd4e
Hi again,
tried it again almost a half year later and finally was able to
identify most essential stuff for the dragable Sidebars to function.
Took much time and work, because this theme is really a mess with so
many cross-dependencies between css and js bits and pieces here and
there.
However, now that I got it going I'm more than ever convinced this
feature alone is really worthwhile.
Remember my TiddlyDesktop in 2007? (
http://menuflex.tiddlyspot.com/)
- or Menuflex of 2009? (
http://tiddlyhome.bidix.info/desk/)
All I really tried with these two adaptations was creating the most
versatile way for working with different texts by simply having more
than one display area (while for merely reading TW text one would more
than suffice).
Beside the many glitches of TiddlyDesktop - which never really grew up
after it was born - it's real limitation is the mess it creates, where
one has to cascade or close all tiddlers to regain the oversight again
- dragging the tiddlers and borders often multiple times in each and
every direction. The much more professional approach with movable
panels by Eric doesn't spare from this kind of busy drag-/dropping
while editing, Menuflex is the furthest I got to the same objective
with basic html and css alone. But already then limited to certain
browsers and never really fully satisfying.
Triptych solves all this much more simpler by automatically adjusting
the size of the existing display area after a sidebar has been dragged
to its desired size, with the sole purpose to use a sidebar as a
proberly sized second display area. It doesn't only gives most
flexibility while editing (having tiddlers side by side same size for
reference and/or other necessary task aside), but with its minimized
sidebars kind of automatic 'fullscreen' mode for smaller displays.
I'm still working on pulling and reducing all necessary css now spread
over many stylesheet into one systemTheme, and the 5 plugins in less
than that. However one of these little essential macros has been
married with an existing, and renamed to TiddlersBarPluginMPKos. Which
for me is unfortunate, because I usually prefer breadcrumbs for that
kind of navigation with many more options than TiddlersBar, while
sparing screen space to the extreme if stuffed into a popup. Since I
don't know js, I would be very glad if someone could help with
extracting this piece of code, now married and only working with
TiddlersBarPluginMPKos together, into a small independently working
plugin:
fitTiddlerDisplay: function() {
var tDFrac;
if (config.options["txtUserTiddlerWidth"] == undefined
|| config.options["txtUserTiddlerWidth"] > 100
|| config.options["txtUserTiddlerWidth"] < 0)
tDFrac = 0.98;
else tDFrac = config.options["txtUserTiddlerWidth"]/100;
var sideFrac = ( 1 - tDFrac ) / 2;
var wiDiv = document.getElementById("testWidthDiv");
var w_all = wiDiv.offsetWidth;
if (jQuery('#leftBarWrapper').hasClass('fixedSidebarWrapper'))
var w_left = jQuery('#leftBarWrapper').width();
else var w_left = 0;
if (jQuery('#rightBarWrapper').hasClass('fixedSidebarWrapper'))
var w_right = jQuery('#rightBarWrapper').width();
else var w_right = 0;
var w_free = w_all - w_left - w_right;
var leftBorder_dA = w_left + sideFrac*w_free;
jQuery('#displayArea').css('left',leftBorder_dA+'px');
jQuery('#displayArea').width(tDFrac*w_free);
//console.log("fitted");
},
Source:
http://triptych-theme.tiddlyspace.com/#TiddlersBarPluginMPKos