1
0
Fork 0

chore(core): Always raise debug

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.
This commit is contained in:
Joost De Cock 2022-01-28 18:18:37 +01:00
parent 34f6d249f3
commit 6dad5ca833
4 changed files with 178 additions and 210 deletions

View file

@ -766,7 +766,9 @@ it("Should overwrite a path attribute", () => {
pattern.parts.a = new pattern.Part();
let a = pattern.parts.a;
a.paths.line = new a.Path()
// Paths from shorthand have the raise method
const { Path } = a.shorthand()
a.paths.line = new Path()
.move(new a.Point(0, 0))
.line(new a.Point(0, 40))
.attr("class", "foo")