Skip to content

Features, Fixes, and Improvements

Compare
Choose a tag to compare
@fskpf fskpf released this 17 Apr 14:07
· 34 commits to master since this release

v3.0.0

New Features

  • Support for SVGPatternElements which are optionally sketched as well. Can be disabled with the new property sketchPatterns: bool.
  • Hachure fill styles are adjusted based on the shape's size and aspect-ratio to create a more vivid sketch.

Improvements

  • Floating point precision to is set to 3 by default to decrease SVG output file size. Can be overwritten by setting a specific fixedDecimalPlaceDigits in the roughConfig.
  • Removed units-css dependency.
  • HTML canvas output is now created with the SVG rendering and drawn onto canvas eventually. This supports more features than the previous direct canvas rendering.

Fixes

  • Fixed orientation of markers with auto or auto-start-reverse.
  • Fixed rendering of percentage values on presentation attributes (e.g. stroke-width).
  • Clips with SVGPathElement are now applied.
  • Clips on SVGGElements are now considered.
  • IE11: Fixed traversing of element tree when determing inherited presentation attributes.
  • IE11: Fixed missing data-uri images in sketched output.

Incompatible changes

  • Renamed RenderMode to OutputType to better account for its actual effect.
  • Renamed redraw() to sketch() which is now async.
  • Property changes do not automatically trigger repaints. So after changes, sketch() must be called explicitly now.