Releases: chanind/hanzi-writer
Releases · chanind/hanzi-writer
v1.1.0
Adding a writer.updateColor(colorName, colorVal, options)
method which can be used to change any color options on a writer instance. Ex: writer.updateColor('strokeColor', '#123', { duration: 300 })
.
v1.0.0
Implementing a new way of setting up a HanziWriter
instance to avoid having the constructor doing too much work, as described in #55. The previous method of new HanziWriter(elm, char, options)
will still work but with a deprecation warning. Instead, the following methods are encouraged:
var writer = HanziWriter.create(elm, char, options)
This works identically to the way the old constructor used to work and is a drop-in replacement.
var writer = new HanziWriter(elm, options); writer.setCharacter(char)
This can be used to set the character later after the writer instance has been created.
Thanks to @vaab and @Mikurox for the input on this.
v0.12.0
This release includes #85 by @kkroid which explicitly sets SVG height and width instead of using height="100%"
and width="100%"
.
v0.11.1
This release uses SVG matrixTransform
as described in #84 and #83 for getting mouse and touch positions during quizzing. This should make quizzing more reliable in some environments, such as in Anki.
v0.11.0
Adding 2 static helper methods to make it easier to load and work with raw character data.
HanziWriter.loadCharacterData(character, options = {})
HanziWriter.getScalingTransform(width, height, padding = 0)
v0.10.1
Fixing a bug where setting duration: 0
in show/hide methods was being ignored #75
v0.10.0
Adding a highlightCompleteColor
option, which can be used to control the color that the quiz flashes after it has been successfully completed if desired. If not set, the quiz will continue to use the highlightColor
instead.
v0.9.2
Slight improvements to stroke matching:
- a minimum length metric was added
- the full character is taken into account during matching, so it's better at judging if a user was trying to draw a nearby stroke in the wrong order
v0.9.1
Fixing a regression on #43, where strokes become partially visible if the user draws strokes very quickly during quizzing.
v0.9.0
This release improves stroke matching, and adds a leniency
param which can be set to increase or decrease the leniency of the stroke matcher in quizzes.