Skip to content

Commit

Permalink
updating docs for v3.2
Browse files Browse the repository at this point in the history
  • Loading branch information
chanind committed Jul 12, 2021
1 parent bdb969f commit 7fc4ae9
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 2 deletions.
2 changes: 1 addition & 1 deletion _includes/head.html
Original file line number Diff line number Diff line change
Expand Up @@ -18,5 +18,5 @@
ga('send', 'pageview');
</script>
<script src="https://cdn.polyfill.io/v2/polyfill.min.js"></script>
<script type="application/javascript" src="https://cdn.jsdelivr.net/npm/hanzi-writer@3.0/dist/hanzi-writer.min.js"></script>
<script type="application/javascript" src="https://cdn.jsdelivr.net/npm/hanzi-writer@3.2/dist/hanzi-writer.min.js"></script>
</head>
11 changes: 11 additions & 0 deletions cn/docs.html
Original file line number Diff line number Diff line change
Expand Up @@ -1078,6 +1078,17 @@ <h4>writer.hideOutline(options = {})</h4>
</ul>
</p>

<h4>writer.updateDimensions(options = {})</h4>
<p>Update the size of the writer instance</p>
<p>
<code>options</code> object containing additional configuration options. Full options include:
<ul>
<li><code>width:</code> number, optional, the new width in px</li>
<li><code>height:</code> number, optional, the new height in px</li>
<li><code>padding:</code> number, optional, the new padding in px</li>
</ul>
</p>

<h4>writer.updateColor(colorName, colorVal, options = {})</h4>
<p>颜色设置更新</p>
<p>
Expand Down
13 changes: 12 additions & 1 deletion docs.html
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ <h2 id="script-loading-link">Loading Hanzi Writer in a script tag</h2>
<p>
The simplest option is to load the Hanzi Writer JS directly from the jsdelivr CDN. Just put the following in the head of your webpage:
{% highlight html %}
<script src="https://cdn.jsdelivr.net/npm/hanzi-writer@3.0/dist/hanzi-writer.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/hanzi-writer@3.2/dist/hanzi-writer.min.js"></script>
{% endhighlight %}
</p>
<p>
Expand Down Expand Up @@ -958,6 +958,17 @@ <h4>writer.hideOutline(options = {})</h4>
<li><code>duration:</code> number, optional. How long the hiding animation should take to complete. If not provided then <code>strokeFadeDuration</code> is used. Passing 0 will make the operation instant.</li>
</ul>
</p>

<h4>writer.updateDimensions(options = {})</h4>
<p>Update the size of the writer instance</p>
<p>
<code>options</code> object containing additional configuration options. Full options include:
<ul>
<li><code>width:</code> number, optional, the new width in px</li>
<li><code>height:</code> number, optional, the new height in px</li>
<li><code>padding:</code> number, optional, the new padding in px</li>
</ul>
</p>

<h4>writer.updateColor(colorName, colorVal, options = {})</h4>
<p>Update a color setting.</p>
Expand Down

0 comments on commit 7fc4ae9

Please sign in to comment.