Releases: chanind/hanzi-writer
Releases · chanind/hanzi-writer
v1.3.0
- fixes a bug where calling
setCharacter()
would reset character opacity and outline opacity to their original values when the writer instance was created. Thanks @lolaswift for pointing this out. More info in #101.
v1.2.1
Improving stroke shape detection in stroke matching. Thanks @peterolson! More info in #94 #95
v1.2.0
- improves stroke matching leniency when there are small strokes close to each other #92 (#90)
- adds a
writer.animateStroke(strokeNum, options = {})
method for animating individual strokes #93 (#91)
Thanks @lengyuan and @peterolson!
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.