end of day
This commit is contained in:
+16
-11
@@ -106,7 +106,7 @@
|
||||
|
||||
|
||||
|
||||
<h4 class="name" id=".fontScale"><span class="type-signature">(static) </span>fontScale<span class="signature">(element, width)</span><span class="type-signature"> → {Promise.<Int>}</span></h4>
|
||||
<h4 class="name" id=".fontScale"><span class="type-signature">(static) </span>fontScale<span class="signature">(element, maxHeight)</span><span class="type-signature"> → {Number}</span></h4>
|
||||
|
||||
|
||||
|
||||
@@ -114,7 +114,12 @@
|
||||
|
||||
|
||||
<div class="description">
|
||||
<p>Scale an element's font size to fit inside the given width.</p>
|
||||
<p>Scale an element's font size so that it doesn't overflow the viewport.
|
||||
Note that some css may be required for this to work,
|
||||
for example setting <code>display: flex;</code> on the parent element,
|
||||
and this function relies on the element being visible.
|
||||
If you want to keep your element invisible until font scaling finishes,
|
||||
use <code>opacity: 0;</code></p>
|
||||
</div>
|
||||
|
||||
|
||||
@@ -166,20 +171,20 @@
|
||||
|
||||
|
||||
|
||||
<td class="description last"></td>
|
||||
<td class="description last"><p>the element to be scaled</p></td>
|
||||
</tr>
|
||||
|
||||
|
||||
|
||||
<tr>
|
||||
|
||||
<td class="name"><code>width</code></td>
|
||||
<td class="name"><code>maxHeight</code></td>
|
||||
|
||||
|
||||
<td class="type">
|
||||
|
||||
|
||||
<span class="param-type">Int</span>
|
||||
<span class="param-type">Number</span>
|
||||
|
||||
|
||||
|
||||
@@ -189,7 +194,7 @@
|
||||
|
||||
|
||||
|
||||
<td class="description last"><p>defaults to <code>window.innerWidth</code></p></td>
|
||||
<td class="description last"><p>maximum font size (which is equivalent to pixel hight)</p></td>
|
||||
</tr>
|
||||
|
||||
|
||||
@@ -230,7 +235,7 @@
|
||||
|
||||
<dt class="tag-source">Source:</dt>
|
||||
<dd class="tag-source"><ul class="dummy"><li>
|
||||
<a href="fontScale.mjs.html">fontScale.mjs</a>, <a href="fontScale.mjs.html#line9">line 9</a>
|
||||
<a href="fontScale.mjs.html">fontScale.mjs</a>, <a href="fontScale.mjs.html#line14">line 14</a>
|
||||
</li></ul></dd>
|
||||
|
||||
|
||||
@@ -259,7 +264,7 @@
|
||||
|
||||
|
||||
<div class="param-desc">
|
||||
<p>resulting font size in px</p>
|
||||
<p>the resulting font size</p>
|
||||
</div>
|
||||
|
||||
|
||||
@@ -270,7 +275,7 @@
|
||||
</dt>
|
||||
<dd>
|
||||
|
||||
<span class="param-type">Promise.<Int></span>
|
||||
<span class="param-type">Number</span>
|
||||
|
||||
|
||||
</dd>
|
||||
@@ -298,13 +303,13 @@
|
||||
</div>
|
||||
|
||||
<nav>
|
||||
<h2><a href="index.html">Home</a></h2><h3>Modules</h3><ul><li><a href="module-CSSRandom.html">CSSRandom</a></li><li><a href="module-FileReaderAsync.html">FileReaderAsync</a></li><li><a href="module-FormDataDeep.html">FormDataDeep</a></li><li><a href="module-fontScale.html">fontScale</a></li></ul><h3>Classes</h3><ul><li><a href="module-FileReaderAsync.FileReaderAsync.html">FileReaderAsync</a></li><li><a href="module-FormDataDeep.FormDataDeep.html">FormDataDeep</a></li></ul>
|
||||
<h2><a href="index.html">Home</a></h2><h3>Modules</h3><ul><li><a href="module-AssetLoader.html">AssetLoader</a></li><li><a href="module-CSSRandom.html">CSSRandom</a></li><li><a href="module-FileReaderAsync.html">FileReaderAsync</a></li><li><a href="module-FormDataDeep.html">FormDataDeep</a></li><li><a href="module-fontScale.html">fontScale</a></li></ul><h3>Classes</h3><ul><li><a href="module-FileReaderAsync.FileReaderAsync.html">FileReaderAsync</a></li><li><a href="module-FormDataDeep.FormDataDeep.html">FormDataDeep</a></li></ul>
|
||||
</nav>
|
||||
|
||||
<br class="clear">
|
||||
|
||||
<footer>
|
||||
Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 4.0.0</a> on Wed Dec 07 2022 13:47:25 GMT+0000 (Coordinated Universal Time)
|
||||
Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 4.0.0</a> on Thu Dec 08 2022 17:50:32 GMT+0000 (Coordinated Universal Time)
|
||||
</footer>
|
||||
|
||||
<script> prettyPrint(); </script>
|
||||
|
||||
Reference in New Issue
Block a user