mirror of
https://github.com/Jermolene/TiddlyWiki5
synced 2024-11-23 10:07:19 +00:00
DynaView: Simplify visibility processing
And add a table of contents to the demo
This commit is contained in:
parent
02ae8969b2
commit
7709192cc8
@ -17,9 +17,14 @@ caption: {{$:/language/SideBar/Open/Caption}}
|
||||
<div>
|
||||
<$button message="tm-close-tiddler" tooltip={{$:/language/Buttons/Close/Hint}} aria-label={{$:/language/Buttons/Close/Caption}} class="tc-btn-invisible tc-btn-mini">×</$button> <$link to={{!!title}}><$view field="title"/></$link>
|
||||
|
||||
<$reveal type="match" stateTitle={{{ [[$:/state/viewtemplate/visibility/]addsuffix<currentTiddler>] }}} text="true">
|
||||
<$set name="state" value={{{ [[$:/state/viewtemplate/visibility/]addsuffix<currentTiddler>] }}}>
|
||||
<$reveal type="match" stateTitle=<<state>> text="true">
|
||||
<span style="display: inline-block; background: red; color: white; padding: 2px; border-radius: 2px;font-size: 0.5em;line-height: 1;text-shadow: none;font-weight: bold;vertical-align: middle;">LOADED</span>
|
||||
</$reveal>
|
||||
<$reveal type="match" stateTitle=<<state>> text="false">
|
||||
<span style="display: inline-block; background: green; color: white; padding: 2px; border-radius: 2px;font-size: 0.5em;line-height: 1;text-shadow: none;font-weight: bold;vertical-align: middle;">UNLOADED</span>
|
||||
</$reveal>
|
||||
</$set>
|
||||
</div>
|
||||
</$droppable>
|
||||
</div>
|
||||
|
33
editions/dynaviewdemo/tiddlers/TableOfContents.tid
Normal file
33
editions/dynaviewdemo/tiddlers/TableOfContents.tid
Normal file
@ -0,0 +1,33 @@
|
||||
title: $:/_Sidebar/TableOfContents
|
||||
tags: $:/tags/SideBar
|
||||
caption: Contents
|
||||
|
||||
\define toc-body(tag,sort:"",exclude,path)
|
||||
<ol class="tc-toc">
|
||||
<$list filter="""[all[shadows+tiddlers]tag<__tag__>!has[draft.of]$sort$] -[<__tag__>] -[enlist<__exclude__>]""">
|
||||
<$vars item=<<currentTiddler>> path={{{ [<__path__>addsuffix[/]addsuffix<__tag__>] }}} excluded="""[enlist<__exclude__>] -[<__tag__>]""">
|
||||
<li>
|
||||
<$link to={{{ [enlist{!!tiddler-list}] }}}>
|
||||
<$list filter="[enlist{!!tiddler-list}addprefix[$:/state/viewtemplate/visibility/]text[true]limit[1]]" variable="listItem" emptyMessage="""<div style="display:inline-block;width:4px;height:1em;background-color:transparent;"></div>""">
|
||||
<div style="display:inline-block;width:4px;height:1em;background-color:red;"></div>
|
||||
</$list>
|
||||
<$view field='caption'>
|
||||
<$view field='title'/>
|
||||
</$view>
|
||||
</$link>
|
||||
<$macrocall $name="toc-body" tag=<<item>> sort=<<__sort__>> exclude=<<excluded>> path=<<path>>/>
|
||||
</li>
|
||||
</$vars>
|
||||
</$list>
|
||||
</ol>
|
||||
\end
|
||||
|
||||
\define toc(tag,sort:"")
|
||||
<$macrocall $name="toc-body" tag=<<__tag__>> sort=<<__sort__>> />
|
||||
\end
|
||||
|
||||
<div class='tc-table-of-contents'>
|
||||
|
||||
<<toc "TableOfContents">>
|
||||
|
||||
</div>
|
@ -11,15 +11,15 @@ $:/state/folded/$(currentTiddler)$
|
||||
<$tiddler tiddler=<<currentTiddler>>>
|
||||
<div data-tiddler-title=<<currentTiddler>> data-tags={{!!tags}} class=<<frame-classes>>>
|
||||
<$set name="state" value={{{ [[$:/state/viewtemplate/visibility/]addsuffix<currentTiddler>] }}}>
|
||||
<$reveal stateTitle=<<state>> type="match" text="true" tag="div">
|
||||
<div class="tc-dynaview-set-tiddler-when-visible tc-dynaview-expand-viewport" data-dynaview-set-tiddler=<<state>> data-dynaview-set-value="true" data-dynaview-has-triggered={{{ [<state>get[text]] }}}>
|
||||
<$reveal stateTitle=<<state>> type="nomatch" text="" default="" tag="div">
|
||||
<div class="tc-dynaview-set-tiddler-when-visible tc-dynaview-expand-viewport" data-dynaview-set-tiddler=<<state>> data-dynaview-set-value="true" data-dynaview-unset-value="false">
|
||||
<$list filter="[all[shadows+tiddlers]tag[$:/tags/ViewTemplate]!has[draft.of]]" variable="listItem">
|
||||
<$transclude tiddler=<<listItem>>/>
|
||||
</$list>
|
||||
</div>
|
||||
</$reveal>
|
||||
<$reveal stateTitle=<<state>> type="nomatch" text="true" tag="div">
|
||||
<div class="tc-dynaview-set-tiddler-when-visible tc-dynaview-expand-viewport" style="min-height: 5em;" data-dynaview-set-tiddler=<<state>> data-dynaview-set-value="true" data-dynaview-has-triggered={{{ [<state>get[text]] }}}>
|
||||
<$reveal stateTitle=<<state>> type="match" text="" default="" tag="div">
|
||||
<div class="tc-dynaview-set-tiddler-when-visible tc-dynaview-expand-viewport" style="min-height: 5em;" data-dynaview-set-tiddler=<<state>> data-dynaview-set-value="true" data-dynaview-unset-value="false">
|
||||
</div>
|
||||
</$reveal>
|
||||
</$set>
|
||||
|
@ -0,0 +1,27 @@
|
||||
[
|
||||
{"title": "TableOfContents", "text": "", "list": "[[Chapter 1]] [[Chapter 2]] [[Chapter 3]] [[Chapter 4]] [[Chapter 5]] [[Chapter 6]] [[Chapter 7]] [[Chapter 8]] [[Chapter 9]] [[Chapter 10]] [[Chapter 11]] [[Chapter 12]]"},
|
||||
{"title": "Chapter 1", "tiddler-list": "[[Alice in Wonderland:-anchor-]] [[Alice in Wonderland:-paragraph-1]] [[Alice in Wonderland:-paragraph-2]] [[Alice in Wonderland:-paragraph-3]] [[Alice in Wonderland:-paragraph-4]] [[Alice in Wonderland:-paragraph-5]] [[Alice in Wonderland:-paragraph-6]] [[Alice in Wonderland:-paragraph-7]] [[Alice in Wonderland:-paragraph-8]] [[Alice in Wonderland:-paragraph-9]] [[Alice in Wonderland:-paragraph-10]] [[Alice in Wonderland:-paragraph-11]] [[Alice in Wonderland:-paragraph-12]] [[Alice in Wonderland:-paragraph-13]] [[Alice in Wonderland:-paragraph-14]] [[Alice in Wonderland:-paragraph-15]] [[Alice in Wonderland:-paragraph-16]] [[Alice in Wonderland:-paragraph-17]] [[Alice in Wonderland:-paragraph-18]] [[Alice in Wonderland:-paragraph-19]] [[Alice in Wonderland:-paragraph-20]] [[Alice in Wonderland:-paragraph-21]] [[Alice in Wonderland:-paragraph-22]] [[Alice in Wonderland:-paragraph-23]] [[Alice in Wonderland:-paragraph-24]] [[Alice in Wonderland:-paragraph-25]] [[Alice in Wonderland:-paragraph-26]] [[Alice in Wonderland:-paragraph-27]]", "tags": "TableOfContents", "text": ""},
|
||||
{"title": "Chapter 2", "tiddler-list": "[[Alice in Wonderland:-paragraph-28]] [[Alice in Wonderland:-paragraph-29]] [[Alice in Wonderland:-paragraph-30]] [[Alice in Wonderland:-paragraph-31]] [[Alice in Wonderland:-paragraph-32]] [[Alice in Wonderland:-paragraph-33]] [[Alice in Wonderland:-paragraph-34]] [[Alice in Wonderland:-paragraph-35]] [[Alice in Wonderland:-paragraph-36]] [[Alice in Wonderland:-paragraph-37]] [[Alice in Wonderland:-paragraph-38]] [[Alice in Wonderland:-paragraph-39]] [[Alice in Wonderland:-paragraph-40]] [[Alice in Wonderland:-paragraph-41]] [[Alice in Wonderland:-paragraph-42]] [[Alice in Wonderland:-paragraph-43]] [[Alice in Wonderland:-paragraph-44]] [[Alice in Wonderland:-paragraph-45]] [[Alice in Wonderland:-paragraph-46]] [[Alice in Wonderland:-paragraph-47]] [[Alice in Wonderland:-paragraph-48]] [[Alice in Wonderland:-paragraph-49]] [[Alice in Wonderland:-paragraph-50]] [[Alice in Wonderland:-paragraph-51]] [[Alice in Wonderland:-paragraph-52]] [[Alice in Wonderland:-paragraph-53]] [[Alice in Wonderland:-paragraph-54]]", "tags": "TableOfContents", "text": ""},
|
||||
{"title": "Chapter 3", "tiddler-list": "[[Alice in Wonderland:-paragraph-55]] [[Alice in Wonderland:-paragraph-56]] [[Alice in Wonderland:-paragraph-57]] [[Alice in Wonderland:-paragraph-58]] [[Alice in Wonderland:-paragraph-59]] [[Alice in Wonderland:-paragraph-60]] [[Alice in Wonderland:-paragraph-61]] [[Alice in Wonderland:-paragraph-62]] [[Alice in Wonderland:-paragraph-63]] [[Alice in Wonderland:-paragraph-64]] [[Alice in Wonderland:-paragraph-65]] [[Alice in Wonderland:-paragraph-66]] [[Alice in Wonderland:-paragraph-67]] [[Alice in Wonderland:-paragraph-68]] [[Alice in Wonderland:-paragraph-69]] [[Alice in Wonderland:-paragraph-70]] [[Alice in Wonderland:-paragraph-71]] [[Alice in Wonderland:-paragraph-72]] [[Alice in Wonderland:-paragraph-73]] [[Alice in Wonderland:-paragraph-74]] [[Alice in Wonderland:-paragraph-75]] [[Alice in Wonderland:-paragraph-76]] [[Alice in Wonderland:-paragraph-77]] [[Alice in Wonderland:-paragraph-78]] [[Alice in Wonderland:-paragraph-79]] [[Alice in Wonderland:-paragraph-80]] [[Alice in Wonderland:-paragraph-81]] [[Alice in Wonderland:-paragraph-82]] [[Alice in Wonderland:-paragraph-83]] [[Alice in Wonderland:-paragraph-84]] [[Alice in Wonderland:-paragraph-85]] [[Alice in Wonderland:-paragraph-86]] [[Alice in Wonderland:-paragraph-87]] [[Alice in Wonderland:-paragraph-88]] [[Alice in Wonderland:-paragraph-89]] [[Alice in Wonderland:-paragraph-90]] [[Alice in Wonderland:-paragraph-91]] [[Alice in Wonderland:-paragraph-92]] [[Alice in Wonderland:-paragraph-93]] [[Alice in Wonderland:-paragraph-94]] [[Alice in Wonderland:-paragraph-95]] [[Alice in Wonderland:-paragraph-96]] [[Alice in Wonderland:-paragraph-97]] [[Alice in Wonderland:-paragraph-98]] [[Alice in Wonderland:-paragraph-99]] [[Alice in Wonderland:-paragraph-100]] [[Alice in Wonderland:-paragraph-101]] [[Alice in Wonderland:-paragraph-102]] [[Alice in Wonderland:-paragraph-103]]", "tags": "TableOfContents", "text": ""},
|
||||
{"title": "Chapter 4", "tiddler-list": "[[Alice in Wonderland:-paragraph-104]] [[Alice in Wonderland:-paragraph-105]] [[Alice in Wonderland:-paragraph-106]] [[Alice in Wonderland:-paragraph-107]] [[Alice in Wonderland:-paragraph-108]] [[Alice in Wonderland:-paragraph-109]] [[Alice in Wonderland:-paragraph-110]] [[Alice in Wonderland:-paragraph-111]] [[Alice in Wonderland:-paragraph-112]] [[Alice in Wonderland:-paragraph-113]] [[Alice in Wonderland:-paragraph-114]] [[Alice in Wonderland:-paragraph-115]] [[Alice in Wonderland:-paragraph-116]] [[Alice in Wonderland:-paragraph-117]] [[Alice in Wonderland:-paragraph-118]] [[Alice in Wonderland:-paragraph-119]] [[Alice in Wonderland:-paragraph-120]] [[Alice in Wonderland:-paragraph-121]] [[Alice in Wonderland:-paragraph-122]] [[Alice in Wonderland:-paragraph-123]] [[Alice in Wonderland:-paragraph-124]] [[Alice in Wonderland:-paragraph-125]] [[Alice in Wonderland:-paragraph-126]] [[Alice in Wonderland:-paragraph-127]] [[Alice in Wonderland:-paragraph-128]] [[Alice in Wonderland:-paragraph-129]] [[Alice in Wonderland:-paragraph-130]] [[Alice in Wonderland:-paragraph-131]] [[Alice in Wonderland:-paragraph-132]] [[Alice in Wonderland:-paragraph-133]] [[Alice in Wonderland:-paragraph-134]] [[Alice in Wonderland:-paragraph-135]] [[Alice in Wonderland:-paragraph-136]] [[Alice in Wonderland:-paragraph-137]] [[Alice in Wonderland:-paragraph-138]] [[Alice in Wonderland:-paragraph-139]] [[Alice in Wonderland:-paragraph-140]] [[Alice in Wonderland:-paragraph-141]] [[Alice in Wonderland:-paragraph-142]] [[Alice in Wonderland:-paragraph-143]] [[Alice in Wonderland:-paragraph-144]] [[Alice in Wonderland:-paragraph-145]] [[Alice in Wonderland:-paragraph-146]]", "tags": "TableOfContents", "text": ""},
|
||||
{"title": "Chapter 5", "tiddler-list": "[[Alice in Wonderland:-paragraph-147]] [[Alice in Wonderland:-paragraph-148]] [[Alice in Wonderland:-paragraph-149]] [[Alice in Wonderland:-paragraph-150]] [[Alice in Wonderland:-paragraph-151]] [[Alice in Wonderland:-paragraph-152]] [[Alice in Wonderland:-paragraph-153]] [[Alice in Wonderland:-paragraph-154]] [[Alice in Wonderland:-paragraph-155]] [[Alice in Wonderland:-paragraph-156]] [[Alice in Wonderland:-paragraph-157]] [[Alice in Wonderland:-paragraph-158]] [[Alice in Wonderland:-paragraph-159]] [[Alice in Wonderland:-paragraph-160]] [[Alice in Wonderland:-paragraph-161]] [[Alice in Wonderland:-paragraph-162]] [[Alice in Wonderland:-paragraph-163]] [[Alice in Wonderland:-paragraph-164]] [[Alice in Wonderland:-paragraph-165]] [[Alice in Wonderland:-paragraph-166]] [[Alice in Wonderland:-paragraph-167]] [[Alice in Wonderland:-paragraph-168]] [[Alice in Wonderland:-paragraph-169]] [[Alice in Wonderland:-paragraph-170]] [[Alice in Wonderland:-paragraph-171]] [[Alice in Wonderland:-paragraph-172]] [[Alice in Wonderland:-paragraph-173]] [[Alice in Wonderland:-paragraph-174]] [[Alice in Wonderland:-paragraph-175]] [[Alice in Wonderland:-paragraph-176]] [[Alice in Wonderland:-paragraph-177]] [[Alice in Wonderland:-paragraph-178]] [[Alice in Wonderland:-paragraph-179]] [[Alice in Wonderland:-paragraph-180]] [[Alice in Wonderland:-paragraph-181]] [[Alice in Wonderland:-paragraph-182]] [[Alice in Wonderland:-paragraph-183]] [[Alice in Wonderland:-paragraph-184]] [[Alice in Wonderland:-paragraph-185]] [[Alice in Wonderland:-paragraph-186]] [[Alice in Wonderland:-paragraph-187]] [[Alice in Wonderland:-paragraph-188]] [[Alice in Wonderland:-paragraph-189]] [[Alice in Wonderland:-paragraph-190]] [[Alice in Wonderland:-paragraph-191]] [[Alice in Wonderland:-paragraph-192]] [[Alice in Wonderland:-paragraph-193]] [[Alice in Wonderland:-paragraph-194]] [[Alice in Wonderland:-paragraph-195]] [[Alice in Wonderland:-paragraph-196]] [[Alice in Wonderland:-paragraph-197]] [[Alice in Wonderland:-paragraph-198]] [[Alice in Wonderland:-paragraph-199]] [[Alice in Wonderland:-paragraph-200]] [[Alice in Wonderland:-paragraph-201]] [[Alice in Wonderland:-paragraph-202]] [[Alice in Wonderland:-paragraph-203]] [[Alice in Wonderland:-paragraph-204]] [[Alice in Wonderland:-paragraph-205]] [[Alice in Wonderland:-paragraph-206]] [[Alice in Wonderland:-paragraph-207]] [[Alice in Wonderland:-paragraph-208]] [[Alice in Wonderland:-paragraph-209]] [[Alice in Wonderland:-paragraph-210]] [[Alice in Wonderland:-paragraph-211]] [[Alice in Wonderland:-paragraph-212]] [[Alice in Wonderland:-paragraph-213]] [[Alice in Wonderland:-paragraph-214]] [[Alice in Wonderland:-paragraph-215]] [[Alice in Wonderland:-paragraph-216]] [[Alice in Wonderland:-paragraph-217]] [[Alice in Wonderland:-paragraph-218]] [[Alice in Wonderland:-paragraph-219]] [[Alice in Wonderland:-paragraph-220]] [[Alice in Wonderland:-paragraph-221]] [[Alice in Wonderland:-paragraph-222]] [[Alice in Wonderland:-paragraph-223]]", "tags": "TableOfContents", "text": ""},
|
||||
{"title": "Chapter 6", "tiddler-list": "[[Alice in Wonderland:-paragraph-224]] [[Alice in Wonderland:-paragraph-225]] [[Alice in Wonderland:-paragraph-226]] [[Alice in Wonderland:-paragraph-227]] [[Alice in Wonderland:-paragraph-228]] [[Alice in Wonderland:-paragraph-229]] [[Alice in Wonderland:-paragraph-230]] [[Alice in Wonderland:-paragraph-231]] [[Alice in Wonderland:-paragraph-232]] [[Alice in Wonderland:-paragraph-233]] [[Alice in Wonderland:-paragraph-234]] [[Alice in Wonderland:-paragraph-235]] [[Alice in Wonderland:-paragraph-236]] [[Alice in Wonderland:-paragraph-237]] [[Alice in Wonderland:-paragraph-238]] [[Alice in Wonderland:-paragraph-239]] [[Alice in Wonderland:-paragraph-240]] [[Alice in Wonderland:-paragraph-241]] [[Alice in Wonderland:-paragraph-242]] [[Alice in Wonderland:-paragraph-243]] [[Alice in Wonderland:-paragraph-244]] [[Alice in Wonderland:-paragraph-245]] [[Alice in Wonderland:-paragraph-246]] [[Alice in Wonderland:-paragraph-247]] [[Alice in Wonderland:-paragraph-248]] [[Alice in Wonderland:-paragraph-249]] [[Alice in Wonderland:-paragraph-250]] [[Alice in Wonderland:-paragraph-251]] [[Alice in Wonderland:-paragraph-252]] [[Alice in Wonderland:-paragraph-253]] [[Alice in Wonderland:-paragraph-254]] [[Alice in Wonderland:-paragraph-255]] [[Alice in Wonderland:-paragraph-256]] [[Alice in Wonderland:-paragraph-257]] [[Alice in Wonderland:-paragraph-258]] [[Alice in Wonderland:-paragraph-259]] [[Alice in Wonderland:-paragraph-260]] [[Alice in Wonderland:-paragraph-261]] [[Alice in Wonderland:-paragraph-262]] [[Alice in Wonderland:-paragraph-263]] [[Alice in Wonderland:-paragraph-264]] [[Alice in Wonderland:-paragraph-265]] [[Alice in Wonderland:-paragraph-266]] [[Alice in Wonderland:-paragraph-267]] [[Alice in Wonderland:-paragraph-268]] [[Alice in Wonderland:-paragraph-269]] [[Alice in Wonderland:-paragraph-270]] [[Alice in Wonderland:-paragraph-271]] [[Alice in Wonderland:-paragraph-272]] [[Alice in Wonderland:-paragraph-273]] [[Alice in Wonderland:-paragraph-274]] [[Alice in Wonderland:-paragraph-275]] [[Alice in Wonderland:-paragraph-276]] [[Alice in Wonderland:-paragraph-277]] [[Alice in Wonderland:-paragraph-278]] [[Alice in Wonderland:-paragraph-279]] [[Alice in Wonderland:-paragraph-280]] [[Alice in Wonderland:-paragraph-281]] [[Alice in Wonderland:-paragraph-282]] [[Alice in Wonderland:-paragraph-283]] [[Alice in Wonderland:-paragraph-284]] [[Alice in Wonderland:-paragraph-285]] [[Alice in Wonderland:-paragraph-286]] [[Alice in Wonderland:-paragraph-287]] [[Alice in Wonderland:-paragraph-288]] [[Alice in Wonderland:-paragraph-289]] [[Alice in Wonderland:-paragraph-290]] [[Alice in Wonderland:-paragraph-291]] [[Alice in Wonderland:-paragraph-292]] [[Alice in Wonderland:-paragraph-293]] [[Alice in Wonderland:-paragraph-294]] [[Alice in Wonderland:-paragraph-295]] [[Alice in Wonderland:-paragraph-296]] [[Alice in Wonderland:-paragraph-297]] [[Alice in Wonderland:-paragraph-298]] [[Alice in Wonderland:-paragraph-299]] [[Alice in Wonderland:-paragraph-300]] [[Alice in Wonderland:-paragraph-301]] [[Alice in Wonderland:-paragraph-302]] [[Alice in Wonderland:-paragraph-303]] [[Alice in Wonderland:-paragraph-304]] [[Alice in Wonderland:-paragraph-305]]", "tags": "TableOfContents", "text": ""},
|
||||
{"title": "Chapter 7", "tiddler-list": "[[Alice in Wonderland:-paragraph-306]] [[Alice in Wonderland:-paragraph-307]] [[Alice in Wonderland:-paragraph-308]] [[Alice in Wonderland:-paragraph-309]] [[Alice in Wonderland:-paragraph-310]] [[Alice in Wonderland:-paragraph-311]] [[Alice in Wonderland:-paragraph-312]] [[Alice in Wonderland:-paragraph-313]] [[Alice in Wonderland:-paragraph-314]] [[Alice in Wonderland:-paragraph-315]] [[Alice in Wonderland:-paragraph-316]] [[Alice in Wonderland:-paragraph-317]] [[Alice in Wonderland:-paragraph-318]] [[Alice in Wonderland:-paragraph-319]] [[Alice in Wonderland:-paragraph-320]] [[Alice in Wonderland:-paragraph-321]] [[Alice in Wonderland:-paragraph-322]] [[Alice in Wonderland:-paragraph-323]] [[Alice in Wonderland:-paragraph-324]] [[Alice in Wonderland:-paragraph-325]] [[Alice in Wonderland:-paragraph-326]] [[Alice in Wonderland:-paragraph-327]] [[Alice in Wonderland:-paragraph-328]] [[Alice in Wonderland:-paragraph-329]] [[Alice in Wonderland:-paragraph-330]] [[Alice in Wonderland:-paragraph-331]] [[Alice in Wonderland:-paragraph-332]] [[Alice in Wonderland:-paragraph-333]] [[Alice in Wonderland:-paragraph-334]] [[Alice in Wonderland:-paragraph-335]] [[Alice in Wonderland:-paragraph-336]] [[Alice in Wonderland:-paragraph-337]] [[Alice in Wonderland:-paragraph-338]] [[Alice in Wonderland:-paragraph-339]] [[Alice in Wonderland:-paragraph-340]] [[Alice in Wonderland:-paragraph-341]] [[Alice in Wonderland:-paragraph-342]] [[Alice in Wonderland:-paragraph-343]] [[Alice in Wonderland:-paragraph-344]] [[Alice in Wonderland:-paragraph-345]] [[Alice in Wonderland:-paragraph-346]] [[Alice in Wonderland:-paragraph-347]] [[Alice in Wonderland:-paragraph-348]] [[Alice in Wonderland:-paragraph-349]] [[Alice in Wonderland:-paragraph-350]] [[Alice in Wonderland:-paragraph-351]] [[Alice in Wonderland:-paragraph-352]] [[Alice in Wonderland:-paragraph-353]] [[Alice in Wonderland:-paragraph-354]] [[Alice in Wonderland:-paragraph-355]] [[Alice in Wonderland:-paragraph-356]] [[Alice in Wonderland:-paragraph-357]] [[Alice in Wonderland:-paragraph-358]] [[Alice in Wonderland:-paragraph-359]] [[Alice in Wonderland:-paragraph-360]] [[Alice in Wonderland:-paragraph-361]] [[Alice in Wonderland:-paragraph-362]] [[Alice in Wonderland:-paragraph-363]] [[Alice in Wonderland:-paragraph-364]] [[Alice in Wonderland:-paragraph-365]] [[Alice in Wonderland:-paragraph-366]] [[Alice in Wonderland:-paragraph-367]] [[Alice in Wonderland:-paragraph-368]] [[Alice in Wonderland:-paragraph-369]] [[Alice in Wonderland:-paragraph-370]] [[Alice in Wonderland:-paragraph-371]] [[Alice in Wonderland:-paragraph-372]] [[Alice in Wonderland:-paragraph-373]] [[Alice in Wonderland:-paragraph-374]] [[Alice in Wonderland:-paragraph-375]] [[Alice in Wonderland:-paragraph-376]] [[Alice in Wonderland:-paragraph-377]] [[Alice in Wonderland:-paragraph-378]] [[Alice in Wonderland:-paragraph-379]] [[Alice in Wonderland:-paragraph-380]] [[Alice in Wonderland:-paragraph-381]] [[Alice in Wonderland:-paragraph-382]] [[Alice in Wonderland:-paragraph-383]] [[Alice in Wonderland:-paragraph-384]] [[Alice in Wonderland:-paragraph-385]] [[Alice in Wonderland:-paragraph-386]] [[Alice in Wonderland:-paragraph-387]] [[Alice in Wonderland:-paragraph-388]] [[Alice in Wonderland:-paragraph-389]] [[Alice in Wonderland:-paragraph-390]] [[Alice in Wonderland:-paragraph-391]] [[Alice in Wonderland:-paragraph-392]] [[Alice in Wonderland:-paragraph-393]] [[Alice in Wonderland:-paragraph-394]] [[Alice in Wonderland:-paragraph-395]] [[Alice in Wonderland:-paragraph-396]] [[Alice in Wonderland:-paragraph-397]] [[Alice in Wonderland:-paragraph-398]] [[Alice in Wonderland:-paragraph-399]] [[Alice in Wonderland:-paragraph-400]] [[Alice in Wonderland:-paragraph-401]] [[Alice in Wonderland:-paragraph-402]] [[Alice in Wonderland:-paragraph-403]] [[Alice in Wonderland:-paragraph-404]] [[Alice in Wonderland:-paragraph-405]] [[Alice in Wonderland:-paragraph-406]] [[Alice in Wonderland:-paragraph-407]] [[Alice in Wonderland:-paragraph-408]] [[Alice in Wonderland:-paragraph-409]] [[Alice in Wonderland:-paragraph-410]] [[Alice in Wonderland:-paragraph-411]]", "tags": "TableOfContents", "text": ""},
|
||||
{"title": "Chapter 8", "tiddler-list": "[[Alice in Wonderland:-paragraph-412]] [[Alice in Wonderland:-paragraph-413]] [[Alice in Wonderland:-paragraph-414]] [[Alice in Wonderland:-paragraph-415]] [[Alice in Wonderland:-paragraph-416]] [[Alice in Wonderland:-paragraph-417]] [[Alice in Wonderland:-paragraph-418]] [[Alice in Wonderland:-paragraph-419]] [[Alice in Wonderland:-paragraph-420]] [[Alice in Wonderland:-paragraph-421]] [[Alice in Wonderland:-paragraph-422]] [[Alice in Wonderland:-paragraph-423]] [[Alice in Wonderland:-paragraph-424]] [[Alice in Wonderland:-paragraph-425]] [[Alice in Wonderland:-paragraph-426]] [[Alice in Wonderland:-paragraph-427]] [[Alice in Wonderland:-paragraph-428]] [[Alice in Wonderland:-paragraph-429]] [[Alice in Wonderland:-paragraph-430]] [[Alice in Wonderland:-paragraph-431]] [[Alice in Wonderland:-paragraph-432]] [[Alice in Wonderland:-paragraph-433]] [[Alice in Wonderland:-paragraph-434]] [[Alice in Wonderland:-paragraph-435]] [[Alice in Wonderland:-paragraph-436]] [[Alice in Wonderland:-paragraph-437]] [[Alice in Wonderland:-paragraph-438]] [[Alice in Wonderland:-paragraph-439]] [[Alice in Wonderland:-paragraph-440]] [[Alice in Wonderland:-paragraph-441]] [[Alice in Wonderland:-paragraph-442]] [[Alice in Wonderland:-paragraph-443]] [[Alice in Wonderland:-paragraph-444]] [[Alice in Wonderland:-paragraph-445]] [[Alice in Wonderland:-paragraph-446]] [[Alice in Wonderland:-paragraph-447]] [[Alice in Wonderland:-paragraph-448]] [[Alice in Wonderland:-paragraph-449]] [[Alice in Wonderland:-paragraph-450]] [[Alice in Wonderland:-paragraph-451]] [[Alice in Wonderland:-paragraph-452]] [[Alice in Wonderland:-paragraph-453]] [[Alice in Wonderland:-paragraph-454]] [[Alice in Wonderland:-paragraph-455]] [[Alice in Wonderland:-paragraph-456]] [[Alice in Wonderland:-paragraph-457]] [[Alice in Wonderland:-paragraph-458]] [[Alice in Wonderland:-paragraph-459]] [[Alice in Wonderland:-paragraph-460]] [[Alice in Wonderland:-paragraph-461]] [[Alice in Wonderland:-paragraph-462]] [[Alice in Wonderland:-paragraph-463]] [[Alice in Wonderland:-paragraph-464]] [[Alice in Wonderland:-paragraph-465]] [[Alice in Wonderland:-paragraph-466]] [[Alice in Wonderland:-paragraph-467]] [[Alice in Wonderland:-paragraph-468]] [[Alice in Wonderland:-paragraph-469]] [[Alice in Wonderland:-paragraph-470]] [[Alice in Wonderland:-paragraph-471]] [[Alice in Wonderland:-paragraph-472]] [[Alice in Wonderland:-paragraph-473]] [[Alice in Wonderland:-paragraph-474]] [[Alice in Wonderland:-paragraph-475]] [[Alice in Wonderland:-paragraph-476]] [[Alice in Wonderland:-paragraph-477]] [[Alice in Wonderland:-paragraph-478]] [[Alice in Wonderland:-paragraph-479]] [[Alice in Wonderland:-paragraph-480]] [[Alice in Wonderland:-paragraph-481]] [[Alice in Wonderland:-paragraph-482]] [[Alice in Wonderland:-paragraph-483]]", "tags": "TableOfContents", "text": ""},
|
||||
{"title": "Chapter 9", "tiddler-list": "[[Alice in Wonderland:-paragraph-484]] [[Alice in Wonderland:-paragraph-485]] [[Alice in Wonderland:-paragraph-486]] [[Alice in Wonderland:-paragraph-487]] [[Alice in Wonderland:-paragraph-488]] [[Alice in Wonderland:-paragraph-489]] [[Alice in Wonderland:-paragraph-490]] [[Alice in Wonderland:-paragraph-491]] [[Alice in Wonderland:-paragraph-492]] [[Alice in Wonderland:-paragraph-493]] [[Alice in Wonderland:-paragraph-494]] [[Alice in Wonderland:-paragraph-495]] [[Alice in Wonderland:-paragraph-496]] [[Alice in Wonderland:-paragraph-497]] [[Alice in Wonderland:-paragraph-498]] [[Alice in Wonderland:-paragraph-499]] [[Alice in Wonderland:-paragraph-500]] [[Alice in Wonderland:-paragraph-501]] [[Alice in Wonderland:-paragraph-502]] [[Alice in Wonderland:-paragraph-503]] [[Alice in Wonderland:-paragraph-504]] [[Alice in Wonderland:-paragraph-505]] [[Alice in Wonderland:-paragraph-506]] [[Alice in Wonderland:-paragraph-507]] [[Alice in Wonderland:-paragraph-508]] [[Alice in Wonderland:-paragraph-509]] [[Alice in Wonderland:-paragraph-510]] [[Alice in Wonderland:-paragraph-511]] [[Alice in Wonderland:-paragraph-512]] [[Alice in Wonderland:-paragraph-513]] [[Alice in Wonderland:-paragraph-514]] [[Alice in Wonderland:-paragraph-515]] [[Alice in Wonderland:-paragraph-516]] [[Alice in Wonderland:-paragraph-517]] [[Alice in Wonderland:-paragraph-518]] [[Alice in Wonderland:-paragraph-519]] [[Alice in Wonderland:-paragraph-520]] [[Alice in Wonderland:-paragraph-521]] [[Alice in Wonderland:-paragraph-522]] [[Alice in Wonderland:-paragraph-523]] [[Alice in Wonderland:-paragraph-524]] [[Alice in Wonderland:-paragraph-525]] [[Alice in Wonderland:-paragraph-526]] [[Alice in Wonderland:-paragraph-527]] [[Alice in Wonderland:-paragraph-528]] [[Alice in Wonderland:-paragraph-529]] [[Alice in Wonderland:-paragraph-530]] [[Alice in Wonderland:-paragraph-531]] [[Alice in Wonderland:-paragraph-532]] [[Alice in Wonderland:-paragraph-533]] [[Alice in Wonderland:-paragraph-534]] [[Alice in Wonderland:-paragraph-535]] [[Alice in Wonderland:-paragraph-536]] [[Alice in Wonderland:-paragraph-537]] [[Alice in Wonderland:-paragraph-538]] [[Alice in Wonderland:-paragraph-539]] [[Alice in Wonderland:-paragraph-540]] [[Alice in Wonderland:-paragraph-541]] [[Alice in Wonderland:-paragraph-542]] [[Alice in Wonderland:-paragraph-543]] [[Alice in Wonderland:-paragraph-544]] [[Alice in Wonderland:-paragraph-545]] [[Alice in Wonderland:-paragraph-546]] [[Alice in Wonderland:-paragraph-547]] [[Alice in Wonderland:-paragraph-548]] [[Alice in Wonderland:-paragraph-549]] [[Alice in Wonderland:-paragraph-550]] [[Alice in Wonderland:-paragraph-551]] [[Alice in Wonderland:-paragraph-552]] [[Alice in Wonderland:-paragraph-553]] [[Alice in Wonderland:-paragraph-554]] [[Alice in Wonderland:-paragraph-555]] [[Alice in Wonderland:-paragraph-556]] [[Alice in Wonderland:-paragraph-557]] [[Alice in Wonderland:-paragraph-558]] [[Alice in Wonderland:-paragraph-559]] [[Alice in Wonderland:-paragraph-560]] [[Alice in Wonderland:-paragraph-561]] [[Alice in Wonderland:-paragraph-562]] [[Alice in Wonderland:-paragraph-563]] [[Alice in Wonderland:-paragraph-564]] [[Alice in Wonderland:-paragraph-565]] [[Alice in Wonderland:-paragraph-566]] [[Alice in Wonderland:-paragraph-567]] [[Alice in Wonderland:-paragraph-568]] [[Alice in Wonderland:-paragraph-569]] [[Alice in Wonderland:-paragraph-570]] [[Alice in Wonderland:-paragraph-571]] [[Alice in Wonderland:-paragraph-572]] [[Alice in Wonderland:-paragraph-573]] [[Alice in Wonderland:-paragraph-574]] [[Alice in Wonderland:-paragraph-575]] [[Alice in Wonderland:-paragraph-576]]", "tags": "TableOfContents", "text": ""},
|
||||
{"title": "Chapter 10", "tiddler-list": "[[Alice in Wonderland:-paragraph-577]] [[Alice in Wonderland:-paragraph-578]] [[Alice in Wonderland:-paragraph-579]] [[Alice in Wonderland:-paragraph-580]] [[Alice in Wonderland:-paragraph-581]] [[Alice in Wonderland:-paragraph-582]] [[Alice in Wonderland:-paragraph-583]] [[Alice in Wonderland:-paragraph-584]] [[Alice in Wonderland:-paragraph-585]] [[Alice in Wonderland:-paragraph-586]] [[Alice in Wonderland:-paragraph-587]] [[Alice in Wonderland:-paragraph-588]] [[Alice in Wonderland:-paragraph-589]] [[Alice in Wonderland:-paragraph-590]] [[Alice in Wonderland:-paragraph-591]] [[Alice in Wonderland:-paragraph-592]] [[Alice in Wonderland:-paragraph-593]] [[Alice in Wonderland:-paragraph-594]] [[Alice in Wonderland:-paragraph-595]] [[Alice in Wonderland:-paragraph-596]] [[Alice in Wonderland:-paragraph-597]] [[Alice in Wonderland:-paragraph-598]] [[Alice in Wonderland:-paragraph-599]] [[Alice in Wonderland:-paragraph-600]] [[Alice in Wonderland:-paragraph-601]] [[Alice in Wonderland:-paragraph-602]] [[Alice in Wonderland:-paragraph-603]] [[Alice in Wonderland:-paragraph-604]] [[Alice in Wonderland:-paragraph-605]] [[Alice in Wonderland:-paragraph-606]] [[Alice in Wonderland:-paragraph-607]] [[Alice in Wonderland:-paragraph-608]] [[Alice in Wonderland:-paragraph-609]] [[Alice in Wonderland:-paragraph-610]] [[Alice in Wonderland:-paragraph-611]] [[Alice in Wonderland:-paragraph-612]] [[Alice in Wonderland:-paragraph-613]] [[Alice in Wonderland:-paragraph-614]] [[Alice in Wonderland:-paragraph-615]] [[Alice in Wonderland:-paragraph-616]] [[Alice in Wonderland:-paragraph-617]] [[Alice in Wonderland:-paragraph-618]] [[Alice in Wonderland:-paragraph-619]] [[Alice in Wonderland:-paragraph-620]] [[Alice in Wonderland:-paragraph-621]] [[Alice in Wonderland:-paragraph-622]] [[Alice in Wonderland:-paragraph-623]] [[Alice in Wonderland:-paragraph-624]] [[Alice in Wonderland:-paragraph-625]] [[Alice in Wonderland:-paragraph-626]] [[Alice in Wonderland:-paragraph-627]] [[Alice in Wonderland:-paragraph-628]] [[Alice in Wonderland:-paragraph-629]] [[Alice in Wonderland:-paragraph-630]] [[Alice in Wonderland:-paragraph-631]] [[Alice in Wonderland:-paragraph-632]] [[Alice in Wonderland:-paragraph-633]] [[Alice in Wonderland:-paragraph-634]] [[Alice in Wonderland:-paragraph-635]] [[Alice in Wonderland:-paragraph-636]] [[Alice in Wonderland:-paragraph-637]] [[Alice in Wonderland:-paragraph-638]] [[Alice in Wonderland:-paragraph-639]] [[Alice in Wonderland:-paragraph-640]] [[Alice in Wonderland:-paragraph-641]] [[Alice in Wonderland:-paragraph-642]] [[Alice in Wonderland:-paragraph-643]] [[Alice in Wonderland:-paragraph-644]] [[Alice in Wonderland:-paragraph-645]] [[Alice in Wonderland:-paragraph-646]] [[Alice in Wonderland:-paragraph-647]] [[Alice in Wonderland:-paragraph-648]] [[Alice in Wonderland:-paragraph-649]] [[Alice in Wonderland:-paragraph-650]] [[Alice in Wonderland:-paragraph-651]] [[Alice in Wonderland:-paragraph-652]] [[Alice in Wonderland:-paragraph-653]] [[Alice in Wonderland:-paragraph-654]] [[Alice in Wonderland:-paragraph-655]] [[Alice in Wonderland:-paragraph-656]] [[Alice in Wonderland:-paragraph-657]] [[Alice in Wonderland:-paragraph-658]] [[Alice in Wonderland:-paragraph-659]] [[Alice in Wonderland:-paragraph-660]] [[Alice in Wonderland:-paragraph-661]] [[Alice in Wonderland:-paragraph-662]]", "tags": "TableOfContents", "text": ""},
|
||||
{"title": "Chapter 11", "tiddler-list": "[[Alice in Wonderland:-paragraph-663]] [[Alice in Wonderland:-paragraph-664]] [[Alice in Wonderland:-paragraph-665]] [[Alice in Wonderland:-paragraph-666]] [[Alice in Wonderland:-paragraph-667]] [[Alice in Wonderland:-paragraph-668]] [[Alice in Wonderland:-paragraph-669]] [[Alice in Wonderland:-paragraph-670]] [[Alice in Wonderland:-paragraph-671]] [[Alice in Wonderland:-paragraph-672]] [[Alice in Wonderland:-paragraph-673]] [[Alice in Wonderland:-paragraph-674]] [[Alice in Wonderland:-paragraph-675]] [[Alice in Wonderland:-paragraph-676]] [[Alice in Wonderland:-paragraph-677]] [[Alice in Wonderland:-paragraph-678]] [[Alice in Wonderland:-paragraph-679]] [[Alice in Wonderland:-paragraph-680]] [[Alice in Wonderland:-paragraph-681]] [[Alice in Wonderland:-paragraph-682]] [[Alice in Wonderland:-paragraph-683]] [[Alice in Wonderland:-paragraph-684]] [[Alice in Wonderland:-paragraph-685]] [[Alice in Wonderland:-paragraph-686]] [[Alice in Wonderland:-paragraph-687]] [[Alice in Wonderland:-paragraph-688]] [[Alice in Wonderland:-paragraph-689]] [[Alice in Wonderland:-paragraph-690]] [[Alice in Wonderland:-paragraph-691]] [[Alice in Wonderland:-paragraph-692]] [[Alice in Wonderland:-paragraph-693]] [[Alice in Wonderland:-paragraph-694]] [[Alice in Wonderland:-paragraph-695]] [[Alice in Wonderland:-paragraph-696]] [[Alice in Wonderland:-paragraph-697]] [[Alice in Wonderland:-paragraph-698]] [[Alice in Wonderland:-paragraph-699]] [[Alice in Wonderland:-paragraph-700]] [[Alice in Wonderland:-paragraph-701]] [[Alice in Wonderland:-paragraph-702]] [[Alice in Wonderland:-paragraph-703]] [[Alice in Wonderland:-paragraph-704]] [[Alice in Wonderland:-paragraph-705]] [[Alice in Wonderland:-paragraph-706]] [[Alice in Wonderland:-paragraph-707]] [[Alice in Wonderland:-paragraph-708]] [[Alice in Wonderland:-paragraph-709]] [[Alice in Wonderland:-paragraph-710]] [[Alice in Wonderland:-paragraph-711]] [[Alice in Wonderland:-paragraph-712]] [[Alice in Wonderland:-paragraph-713]] [[Alice in Wonderland:-paragraph-714]] [[Alice in Wonderland:-paragraph-715]] [[Alice in Wonderland:-paragraph-716]] [[Alice in Wonderland:-paragraph-717]] [[Alice in Wonderland:-paragraph-718]] [[Alice in Wonderland:-paragraph-719]] [[Alice in Wonderland:-paragraph-720]] [[Alice in Wonderland:-paragraph-721]] [[Alice in Wonderland:-paragraph-722]] [[Alice in Wonderland:-paragraph-723]] [[Alice in Wonderland:-paragraph-724]] [[Alice in Wonderland:-paragraph-725]] [[Alice in Wonderland:-paragraph-726]] [[Alice in Wonderland:-paragraph-727]] [[Alice in Wonderland:-paragraph-728]] [[Alice in Wonderland:-paragraph-729]] [[Alice in Wonderland:-paragraph-730]] [[Alice in Wonderland:-paragraph-731]] [[Alice in Wonderland:-paragraph-732]] [[Alice in Wonderland:-paragraph-733]] [[Alice in Wonderland:-paragraph-734]] [[Alice in Wonderland:-paragraph-735]] [[Alice in Wonderland:-paragraph-736]] [[Alice in Wonderland:-paragraph-737]]", "tags": "TableOfContents", "text": ""},
|
||||
{"title": "Chapter 12", "tiddler-list": "[[Alice in Wonderland:-paragraph-738]] [[Alice in Wonderland:-paragraph-739]] [[Alice in Wonderland:-paragraph-740]] [[Alice in Wonderland:-paragraph-741]] [[Alice in Wonderland:-paragraph-742]] [[Alice in Wonderland:-paragraph-743]] [[Alice in Wonderland:-paragraph-744]] [[Alice in Wonderland:-paragraph-745]] [[Alice in Wonderland:-paragraph-746]] [[Alice in Wonderland:-paragraph-747]] [[Alice in Wonderland:-paragraph-748]] [[Alice in Wonderland:-paragraph-749]] [[Alice in Wonderland:-paragraph-750]] [[Alice in Wonderland:-paragraph-751]] [[Alice in Wonderland:-paragraph-752]] [[Alice in Wonderland:-paragraph-753]] [[Alice in Wonderland:-paragraph-754]] [[Alice in Wonderland:-paragraph-755]] [[Alice in Wonderland:-paragraph-756]] [[Alice in Wonderland:-paragraph-757]] [[Alice in Wonderland:-paragraph-758]] [[Alice in Wonderland:-paragraph-759]] [[Alice in Wonderland:-paragraph-760]] [[Alice in Wonderland:-paragraph-761]] [[Alice in Wonderland:-paragraph-762]] [[Alice in Wonderland:-paragraph-763]] [[Alice in Wonderland:-paragraph-764]] [[Alice in Wonderland:-paragraph-765]] [[Alice in Wonderland:-paragraph-766]] [[Alice in Wonderland:-paragraph-767]] [[Alice in Wonderland:-paragraph-768]] [[Alice in Wonderland:-paragraph-769]] [[Alice in Wonderland:-paragraph-770]] [[Alice in Wonderland:-paragraph-771]] [[Alice in Wonderland:-paragraph-772]] [[Alice in Wonderland:-paragraph-773]] [[Alice in Wonderland:-paragraph-774]] [[Alice in Wonderland:-paragraph-775]] [[Alice in Wonderland:-paragraph-776]] [[Alice in Wonderland:-paragraph-777]] [[Alice in Wonderland:-paragraph-778]] [[Alice in Wonderland:-paragraph-779]] [[Alice in Wonderland:-paragraph-780]] [[Alice in Wonderland:-paragraph-781]] [[Alice in Wonderland:-paragraph-782]] [[Alice in Wonderland:-paragraph-783]] [[Alice in Wonderland:-paragraph-784]] [[Alice in Wonderland:-paragraph-785]] [[Alice in Wonderland:-paragraph-786]] [[Alice in Wonderland:-paragraph-787]] [[Alice in Wonderland:-paragraph-788]] [[Alice in Wonderland:-paragraph-789]] [[Alice in Wonderland:-paragraph-790]] [[Alice in Wonderland:-paragraph-791]] [[Alice in Wonderland:-paragraph-792]] [[Alice in Wonderland:-paragraph-793]] [[Alice in Wonderland:-paragraph-794]] [[Alice in Wonderland:-paragraph-795]] [[Alice in Wonderland:-paragraph-796]] [[Alice in Wonderland:-paragraph-797]] [[Alice in Wonderland:-paragraph-798]] [[Alice in Wonderland:-paragraph-799]] [[Alice in Wonderland:-paragraph-800]] [[Alice in Wonderland:-paragraph-801]] [[Alice in Wonderland:-paragraph-802]] [[Alice in Wonderland:-paragraph-803]] [[Alice in Wonderland:-paragraph-804]] [[Alice in Wonderland:-paragraph-805]] [[Alice in Wonderland:-paragraph-806]] [[Alice in Wonderland:-paragraph-807]] [[Alice in Wonderland:-paragraph-808]] [[Alice in Wonderland:-paragraph-809]] [[Alice in Wonderland:-paragraph-810]]", "tags": "TableOfContents", "text": ""}
|
||||
]
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
@ -27,11 +27,15 @@ Note that it is not recommended to use this setting at the same time as the "Upd
|
||||
|
||||
!! Set tiddler field when visible
|
||||
|
||||
The background task detects when elements with the class `tc-dynaview-set-tiddler-when-visible` scroll into view. The first time that they do, the background task assigns the value in the attribute `data-dynaview-set-value` to the tiddler whose title is in the attribute `data-dynaview-set-tiddler`. This assignment can be tied to a reveal widget to cause content to be displayed when it becomes visible. If the class `tc-dynaview-expand-viewport` is set then the viewport is expanded so that the processing occurs when elements move near the viewport.
|
||||
The background task detects when elements with the class `tc-dynaview-set-tiddler-when-visible` scroll into view. The first time that they do, the background task assigns the value in the attribute `data-dynaview-set-value` to the tiddler whose title is in the attribute `data-dynaview-set-tiddler`.
|
||||
|
||||
!! Unset tiddler field when set visible before but then scrolled out of view
|
||||
This assignment can be tied to a reveal widget to cause content to be displayed when it becomes visible.
|
||||
|
||||
The background task detects when elements with the class `tc-dynaview-set-tiddler-when-visible` scroll out view after they have scrolled into view. When scrolling out of view after they have scrolled in, the background task assigns the value in the attribute `data-dynaview-unset-value` to the tiddler whose title is in the attribute `data-dynaview-unset-tiddler`. This assignment can be tied to a reveal widget to cause content to be hidden when it becomes invisible. If the class `tc-dynaview-expand-viewport` is set then the viewport is expanded so that the processing occurs when elements move near the viewport.
|
||||
If the class `tc-dynaview-expand-viewport` is set then the viewport is expanded so that the processing occurs when elements move near the viewport.
|
||||
|
||||
!!! Unset tiddler field when set visible before but then scrolled out of view
|
||||
|
||||
In addition to the processing described above, if the element also has the attribute `data-dynaview-unset-value` then its value will be assigned to the associated tiddler if the element is out of view and the current value of the tiddler corresponds to the value specified in the `data-dynaview-set-value` attribute.
|
||||
|
||||
!! Update address bar when scrolling
|
||||
|
||||
|
@ -108,10 +108,6 @@ function setZoomClasses() {
|
||||
function checkVisibility() {
|
||||
var elements = document.querySelectorAll(".tc-dynaview-set-tiddler-when-visible");
|
||||
$tw.utils.each(elements,function(element) {
|
||||
// Bail if we've already triggered this element and we're not unsetting a tiddler when this element leaves the viewport
|
||||
if(element.getAttribute("data-dynaview-has-triggered") === "true" && !element.hasAttribute("data-dynaview-unset-tiddler")) {
|
||||
return;
|
||||
}
|
||||
// Calculate whether the element is visible
|
||||
var elementRect = element.getBoundingClientRect(),
|
||||
viewportWidth = window.innerWidth || document.documentElement.clientWidth,
|
||||
@ -122,8 +118,9 @@ function checkVisibility() {
|
||||
top: 0,
|
||||
bottom: viewportHeight
|
||||
},
|
||||
tiddler,
|
||||
value;
|
||||
title = element.getAttribute("data-dynaview-set-tiddler"),
|
||||
setValue = element.getAttribute("data-dynaview-set-value") || "",
|
||||
unsetValue = element.getAttribute("data-dynaview-unset-value") || "";
|
||||
if(element.classList.contains("tc-dynaview-expand-viewport")) {
|
||||
viewportRect.left -= viewportWidth;
|
||||
viewportRect.right += viewportWidth;
|
||||
@ -135,23 +132,15 @@ function checkVisibility() {
|
||||
elementRect.top > viewportRect.bottom ||
|
||||
elementRect.bottom < viewportRect.top) {
|
||||
// Element is not visible
|
||||
// Set the unset tiddler if required and this element has previously been triggered
|
||||
if(element.getAttribute("data-dynaview-has-triggered") === "true" && element.hasAttribute("data-dynaview-unset-tiddler")) {
|
||||
tiddler = element.getAttribute("data-dynaview-unset-tiddler");
|
||||
value = element.getAttribute("data-dynaview-unset-value") || "";
|
||||
if(tiddler && $tw.wiki.getTiddlerText(tiddler) !== value) {
|
||||
$tw.wiki.addTiddler(new $tw.Tiddler({title: tiddler, text: value}));
|
||||
}
|
||||
element.setAttribute("data-dynaview-has-triggered","false");
|
||||
// Set the unset tiddler if required
|
||||
if(title && unsetValue && $tw.wiki.getTiddlerText(title) === setValue) {
|
||||
$tw.wiki.addTiddler(new $tw.Tiddler({title: title, text: unsetValue}));
|
||||
}
|
||||
} else {
|
||||
// Element is visible
|
||||
tiddler = element.getAttribute("data-dynaview-set-tiddler");
|
||||
value = element.getAttribute("data-dynaview-set-value") || "";
|
||||
if(tiddler && $tw.wiki.getTiddlerText(tiddler) !== value) {
|
||||
$tw.wiki.addTiddler(new $tw.Tiddler({title: tiddler, text: value}));
|
||||
if(title && $tw.wiki.getTiddlerText(title) !== setValue) {
|
||||
$tw.wiki.addTiddler(new $tw.Tiddler({title: title, text: setValue}));
|
||||
}
|
||||
element.setAttribute("data-dynaview-has-triggered","true");
|
||||
}
|
||||
});
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user