Closed brianakidd closed 2 years ago
I'm not sure, but a test site would help. Might be related to an older version, you sure you're up to date?
Anyways, I'm planning to add Cypress testing suite to SVGPathCommander and remove any remaining bugs. Perhaps sooner than expected.
@thednp I'm getting the same error, using the skypack version (https://www.skypack.dev/view/svg-path-commander)
The bug is in line 205 in svg-path-commander.js
If origin is not passed to any .transform() operation (also flipX/Y etc.) the transform function spreads origin
to an object instead of an array -
} else {
transform.origin = {...this.origin};
}
should be :
} else {
transform.origin = [...this.origin];
}
I created a pr https://github.com/thednp/svg-path-commander/pull/10
Having the same problem in React but this doesn't fix it:
} else {
transform.origin = [...this.origin];
}
@lordanubi have a minute to produce a test repo.
@brianakidd I can confirm the fix is solid for me. I'm ready to push v0.1.26 to the cloud.
V0.2.0 will feature Cypress testing.
@thednp Sounds great. Thanks
@lordanubi we're waiting for your confirmation.
@brianakidd @lordanubi @tombigel please test latest master and let me know how it goes, Cypress testing is added to the main class, later to add for all statics, have fun!
@brianakidd @lordanubi @tombigel should we close this?
I'm not getting the error anymore with last version but I noticed that flipX() and flipY() do the same thing have you checked that? Anyway thanks for your hard work! Keep it up :)
@lordanubi perhaps your shape is a square or a circle?
whooops sorry it was my setup buggin as fuck, it works like a charm! Thanks again you can definitely close this
sorry, was on holiday.
I'm simply trying to execute the example code:
but receive console error "origin is not iterable." Is this related to executing inside a Vue component? On the demo page (https://thednp.github.io/svg-path-commander/index.html), I can paste my data in, perform transformations, and receive expected output.