Skip to content

Commit

Permalink
updating docs for v3.5.0
Browse files Browse the repository at this point in the history
  • Loading branch information
chanind committed Feb 9, 2023
1 parent 7fc4ae9 commit 9a7c04a
Show file tree
Hide file tree
Showing 3 changed files with 29 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.2/dist/hanzi-writer.min.js"></script>
<script type="application/javascript" src="https://cdn.jsdelivr.net/npm/hanzi-writer@3.5/dist/hanzi-writer.min.js"></script>
</head>
18 changes: 18 additions & 0 deletions cn/docs.html
Original file line number Diff line number Diff line change
Expand Up @@ -1004,6 +1004,12 @@ <h4>新建 HanziWriter(element, options)</h4>
<li><code>showHintAfterMisses:</code> 整数, 默认 3
中风高亮提示之前的未命中数被给予用户。 设置为 false 以禁用。 创建测验时也可以设置此项。
</li>
<li><code>markStrokeCorrectAfterMisses:</code> integer, default disabled. The number of misses before forcing the stroke
to be marked correct. This can also be set when creating a quiz.</li>
<li><code>quizStartStrokeNum:</code> integer, default 0. This can be set to start the quiz at a stroke other than the
first stroke. This can also be set when creating a quiz.</li>
<li><code>acceptBackwardsStrokes:</code> boolean, default false. Allow stroke to be drawn backwards during quizzing.
This can also be set when creating a quiz.</li>
<li><code>highlightOnComplete:</code> 布尔值, 默认 true。
控制当用户完成绘制整个字符时,测验是否会短暂突出显示字符。 创建测验时也可以设置此项。
</li>
Expand Down Expand Up @@ -1222,6 +1228,12 @@ <h4>writer.quiz(options)</h4>
设置 false 禁用。
这也可以在创建编写器实例时设置。
</li>
<li><code>markStrokeCorrectAfterMisses:</code> integer, default disabled. The number of misses before forcing the stroke
to be marked correct.</li>
<li><code>quizStartStrokeNum:</code> integer, default 0. This can be set to start the quiz at a stroke other than the
first stroke.</li>
<li><code>acceptBackwardsStrokes:</code> boolean, default false. Allow stroke to be drawn backwards during quizzing.
</li>
<li><code>leniency:</code> 浮点数, 默认 1.0。
这可以设置为使笔划分级或多或少地宽松。 越接近于0,测验的评分就越严格。
</li>
Expand Down Expand Up @@ -1296,6 +1308,12 @@ <h4>HanziWriter.create(element, character, options)</h4>
<li><code>showHintAfterMisses:</code> 整数, 默认 3。
中风高亮提示之前的未命中数被给予用户。 设置为 false 以禁用。 创建测验时也可以设置此项。
</li>
<li><code>markStrokeCorrectAfterMisses:</code> integer, default disabled. The number of misses before forcing the stroke
to be marked correct. This can also be set when creating a quiz.</li>
<li><code>quizStartStrokeNum:</code> integer, default 0. This can be set to start the quiz at a stroke other than the
first stroke. This can also be set when creating a quiz.</li>
<li><code>acceptBackwardsStrokes:</code> boolean, default false. Allow stroke to be drawn backwards during quizzing.
This can also be set when creating a quiz.</li>
<li><code>highlightOnComplete:</code> 布尔值, 默认 true。
控制当用户完成绘制整个角色时,测验是否会短暂突出显示角色。 创建测验时也可以设置此项。
</li>
Expand Down
11 changes: 10 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.2/dist/hanzi-writer.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/hanzi-writer@3.5/dist/hanzi-writer.min.js"></script>
{% endhighlight %}
</p>
<p>
Expand Down Expand Up @@ -910,6 +910,9 @@ <h4>new HanziWriter(element, options)</h4>
<li><code>drawingColor:</code> hex string, default '#333'. The color of the lines drawn by users during quizzing.</li>
<li><code>drawingWidth:</code> number, default 4. The width of the lines drawn by users during quizzing in px.</li>
<li><code>showHintAfterMisses:</code> integer, default 3. The number of misses before a stroke highlight hint is given to the user. Set to false to disable. This can also be set when creating a quiz.</li>
<li><code>markStrokeCorrectAfterMisses:</code> integer, default disabled. The number of misses before forcing the stroke to be marked correct. This can also be set when creating a quiz.</li>
<li><code>quizStartStrokeNum:</code> integer, default 0. This can be set to start the quiz at a stroke other than the first stroke. This can also be set when creating a quiz.</li>
<li><code>acceptBackwardsStrokes:</code> boolean, default false. Allow stroke to be drawn backwards during quizzing. This can also be set when creating a quiz.</li>
<li><code>highlightOnComplete:</code> boolean, default true. Controls whether a quiz briefly highlights the character when the user finishes drawing the whole character. This can also be set when creating a quiz.</li>
<li><code>highlightCompleteColor:</code> hex string, default null. The color to use when highlighting the character on complete in quizzes. If not set, <code>highlightColor</code> will be used instead. Only relevant if <code>highlightOnComplete</code> is <code>true</code>.</li>
<li><code>charDataLoader:</code> function. Custom function to load charater data. See the section on <a href="#loading-character-data-link">Loading character data</a> for more info on usage.</li>
Expand Down Expand Up @@ -1081,6 +1084,9 @@ <h4>writer.quiz(options)</h4>
</ul>
</li>
<li><code>showHintAfterMisses:</code> integer, default 3. The number of misses before a stroke highlight hint is given to the user. Set to false to disable. This can also be set when creating the writer instance.</li>
<li><code>markStrokeCorrectAfterMisses:</code> integer, default disabled. The number of misses before forcing the stroke to be marked correct.</li>
<li><code>quizStartStrokeNum:</code> integer, default 0. This can be set to start the quiz at a stroke other than the first stroke.</li>
<li><code>acceptBackwardsStrokes:</code> boolean, default false. Allow stroke to be drawn backwards during quizzing.</li>
<li><code>leniency:</code> float, default 1.0. This can be set to make stroke grading more or less lenient. The closer this is to 0 the more strictly the quiz is graded.</li>
<li><code>highlightOnComplete:</code> boolean, default true. Controls whether a quiz briefly highlights the character when the user finishes drawing the whole character. This can also be set when creating the writer instance.</li>
</ul>
Expand Down Expand Up @@ -1118,6 +1124,9 @@ <h4>HanziWriter.create(element, character, options)</h4>
<li><code>drawingColor:</code> hex string, default '#333'. The color of the lines drawn by users during quizzing.</li>
<li><code>drawingWidth:</code> number, default 4. The width of the lines drawn by users during quizzing in px.</li>
<li><code>showHintAfterMisses:</code> integer, default 3. The number of misses before a stroke highlight hint is given to the user. Set to false to disable. This can also be set when creating a quiz.</li>
<li><code>markStrokeCorrectAfterMisses:</code> integer, default disabled. The number of misses before forcing the stroke to be marked correct. This can also be set when creating a quiz.</li>
<li><code>quizStartStrokeNum:</code> integer, default 0. This can be set to start the quiz at a stroke other than the first stroke. This can also be set when creating a quiz.</li>
<li><code>acceptBackwardsStrokes:</code> boolean, default false. Allow stroke to be drawn backwards during quizzing. This can also be set when creating a quiz.</li>
<li><code>highlightOnComplete:</code> boolean, default true. Controls whether a quiz briefly highlights the character when the user finishes drawing the whole character. This can also be set when creating a quiz.</li>
<li><code>highlightCompleteColor:</code> hex string, default null. The color to use when highlighting the character on complete in quizzes. If not set, <code>highlightColor</code> will be used instead. Only relevant if <code>highlightOnComplete</code> is <code>true</code>.</li>
<li><code>charDataLoader:</code> function. Custom function to load charater data. See the section on <a href="#loading-character-data-link">Loading character data</a> for more info on usage.</li>
Expand Down

0 comments on commit 9a7c04a

Please sign in to comment.