Skip to content

v1.0.0

Compare
Choose a tag to compare
@chanind chanind released this 30 Sep 16:50
· 62 commits to master since this release

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.