Skip to content

Commit 89fdc18

Browse files
Guide: add documentation for resize-behavior pub var
1 parent a1412d1 commit 89fdc18

File tree

1 file changed

+29
-0
lines changed

1 file changed

+29
-0
lines changed

doc/guide/publisher/publication-file.xml

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -917,6 +917,35 @@
917917
</cd>
918918
element can have an attribute <attr>design-width</attr> with an integer value. This will be used as the base value for converting the percentage based widths of an interactive into a pixel values when that is required. The default value is <c>600</c> (100% width is 600px).
919919
</p>
920+
921+
<p>
922+
The
923+
<cd>
924+
<cline>/publication/html/interactives</cline>
925+
</cd>
926+
element can have an attribute <attr>resize-behavior</attr> that is used to control how interactives respond to window resizing. Possible values are:
927+
<ul>
928+
<li><c>fixed-height</c> (default): interactives will maintain their initial height as the window size changes. When the content becomes too wide to display, a horizontal scrollbar will appear.</li>
929+
<li><c>responsive</c>: interactives will resize dynamically as the window size changes to maintain their aspect ratio.</li>
930+
</ul>
931+
In addition to this global setting, you can add child elemements to
932+
<cd>
933+
<cline>/publication/html/interactives</cline>
934+
</cd>
935+
to set the resize behavior for specific types of interactives. Each child element should be named after the interactive type (e.g. <c>geogebra</c> or <c>desmos</c>) and have a <attr>resize-behavior</attr> attribute with the same possible values as above. Settings on these child elements will override the global setting for that specific interactive type. Known interactive types that can be specified this way are:
936+
<ul>
937+
<li>calcplot3d</li>
938+
<li>circuitjs</li>
939+
<li>d3</li>
940+
<li>desmos</li>
941+
<li>doenetml</li>
942+
<li>geogebra</li>
943+
<li>iframe</li>
944+
<li>javascript</li>
945+
<li>jsxgraph</li>
946+
<li>sage</li>
947+
</ul>
948+
</p>
920949
</subsection>
921950
</section>
922951

0 commit comments

Comments
 (0)