1
0
mirror of https://github.com/Jermolene/TiddlyWiki5 synced 2025-01-10 09:20:26 +00:00

update for negative tiddler width

This commit is contained in:
BurningTreeC 2024-10-08 15:50:59 +02:00
parent da232683fe
commit 8cefe1bcf9

View File

@ -92,7 +92,7 @@ title: $:/core/macros/sidebar-resizer
storyWidthResult={{{ [<storyWidth>compare:number:lt<storyMinWidth>then<storyMinWidthConverted>addsuffix<storyWidthMetric>] ~[<storyWidth>compare:number:gteq<storyMaxWidth>then<storyMaxWidthConverted>addsuffix<storyWidthMetric>] ~[<storyWidthConverted>addsuffix<storyWidthMetric>] }}}
tiddlerWidthResult={{{ [<tiddlerWidthMetric>match[%]then<storyWidth>compare:number:lt<storyMinWidth>then{$:/themes/tiddlywiki/vanilla/metrics/tiddlerwidth}] ~[<tiddlerWidthMetric>match[%]then<storyWidth>compare:number:gteq<storyMaxWidth>then{$:/themes/tiddlywiki/vanilla/metrics/tiddlerwidth}] ~[<tiddlerWidthMetric>!match[%]then<tiddlerWidth>compare:number:lt<tiddlerMinWidth>then<tiddlerMinWidthConverted>addsuffix<tiddlerWidthMetric>] ~[<tiddlerWidthMetric>!match[%]then<tiddlerWidth>compare:number:gteq<tiddlerMaxWidth>then<tiddlerMaxWidthConverted>addsuffix<tiddlerWidthMetric>] ~[<tiddlerWidthConverted>addsuffix<tiddlerWidthMetric>] }}}>
tiddlerWidthResult={{{ [<tiddlerWidthMetric>match[%]then<storyWidth>compare:number:lt<storyMinWidth>then{$:/themes/tiddlywiki/vanilla/metrics/tiddlerwidth}compare:number:gteq[0]then{$:/themes/tiddlywiki/vanilla/metrics/tiddlerwidth}] ~[<tiddlerWidthMetric>match[%]then<storyWidth>compare:number:gteq<storyMaxWidth>then{$:/themes/tiddlywiki/vanilla/metrics/tiddlerwidth}] ~[<tiddlerWidthMetric>!match[%]then<tiddlerWidth>compare:number:lt<tiddlerMinWidth>then<tiddlerMinWidthConverted>addsuffix<tiddlerWidthMetric>] ~[<tiddlerWidthMetric>!match[%]then<tiddlerWidth>compare:number:gteq<tiddlerMaxWidth>then<tiddlerMaxWidthConverted>addsuffix<tiddlerWidthMetric>] ~[<tiddlerWidth>compare:number:lt[0]then[0]addsuffix<tiddlerWidthMetric>] ~[<tiddlerWidthConverted>addsuffix<tiddlerWidthMetric>] }}}>
<$action-setfield $tiddler="$:/themes/tiddlywiki/vanilla/metrics/tiddlerwidth" text=<<tiddlerWidthResult>>/>
<$action-setfield $tiddler="$:/themes/tiddlywiki/vanilla/metrics/storywidth" text=<<storyWidthResult>>/>