Currently we check in many different places whether debug is enabled
prior to raising a debug event.
This changes that to always raise debug, but let the debug.raise()
method only store it on the pattern object if/when debug is
enabled.
## 2.18.0 (2021-09-09)
### core
#### Fixed
- Handle path.offset() of very short curves with control points on the start or end point Closes [#1257](https://github.com/freesewing/freesewing/issues/1257)
### holmes
#### Fixed
- The `brimWidth` option is not a percent option, allowing the pattern to scale properly
### huey
#### Fixed
- Replace cut-on-fold indicator on pocket with a regular grainline indicator Closes [#1265](https://github.com/freesewing/freesewing/issues/1265)
### i18n
#### Added
- Added translations for Yuri
#### Fixed
- Added optional chaining so missing options always lead to clear error message
### simon
#### Fixed
- Avoid paperless depending on a complete pattern
### theo
#### Fixed
- Avoid paperless depending on a complete pattern
### wahid
#### Fixed
- Close Seam Allowance path of front lining Closes [#1267](https://github.com/freesewing/freesewing/issues/1267)
- Support a zero value for the `backScyeDart` option
### yuri
- Handle path.offset() of very short curves with control points on the start or end point Closes [#1257](https://github.com/freesewing/freesewing/issues/1257)
- The `brimWidth` option is not a percent option, allowing the pattern to scale properly
- Replace cut-on-fold indicator on pocket with a regular grainline indicator Closes [#1265](https://github.com/freesewing/freesewing/issues/1265)
- Added translations for Yuri
- Added optional chaining so missing options always lead to clear error message
- Avoid paperless depending on a complete pattern
- Avoid paperless depending on a complete pattern
- Close Seam Allowance path of front lining Closes [#1267](https://github.com/freesewing/freesewing/issues/1267)
- Support a zero value for the `backScyeDart` option
This path.offset method used to travel 2mm along the path to find
out the direction at the start/end of paths.
That caused errors when the curve being offsetted was less then 2mm.
So now, it checks and if it's shorter will use 10% of the path length instead.
This closes#1257
This bug would be triggered by an edge-case where we have a path
that is made up of multiple curves/lines.
If the distance to shift lies just beyond the end of one segment,
yet the remaining distance is smaller than the step (by default
that means smaller than 1/25mm) no point would be returned.
This closes#1140
The Draft react component would load the snippets that are part of our
plugin bundle. However, any additional snippets that are created by
plugins would not not get added to the `defs` section, and thus not
be rendered.
This changes the behavior by doing two things:
- in `core` it adds an SVG object to the renderProps, and makes
sure to run the `preRender` hook on this SVG object prior to
returning the renderProps. This way, svg.defs now holds all
defs, including any that may have been added by custom plugins
- in the `Draft` component, we no longer add a list of predefined
snippets to the defs section, but instead just use the svg.defs
section verbatim. This removes any discrepancies in how SVG
rendering and React rendering handles the defs section of the
SVG document, and thus displays snippets.