riatelab / dicopal.js

Discrete color palettes (hundreds of them!) for JavaScript
https://npmjs.com/package/dicopal
Apache License 2.0
32 stars 0 forks source link

Balanced asymmetric not respecting number of 'right' classes when 'left' is less than 'right' and central class is false #7

Closed joewdavies closed 9 months ago

joewdavies commented 9 months ago

I think i might have found a bug:

Balanced asymmetric schemes appear to not respect the number of specified classes right when left is less than right:

For example here: there should be 4 classes to the right but there are only 3:

image

All the best! Joe

mthh commented 9 months ago

Indeed. But only when central class is false it seems (so I took the liberty to edit your issue title).

I do really need to refactor this code and add tests... Will do all of this this week I guess.

Thanks for the report !

mthh commented 9 months ago

This should be fixed by https://github.com/riatelab/dicopal.js/commit/1e2f76c02bf1a44df7024d950562282c54d1e808 but I want to strengthen the test suite a bit before making a new release.

mthh commented 9 months ago

I've released 0.7.0.

Thanks for all your reports.

And sorry you had to pay the piper a bit with dicopal! I've integrated dicopal into an app we're developing but the place where users can build their palettes isn't really functional yet (and we don't expect to release the application for a few months yet) so I haven't had a chance to run into all the bugs you ran into.

joewdavies commented 9 months ago

Thank you for such quick fixes!