arch-inc/fabricjs-psbrush

Feature Request: fallback value customizable

cytostatic opened this issue · 3 comments

Hallo,
the new PressureManger implementation is really nice and useful. I also like the new fallback strategy al lot. With that I can use your brush nearly as it is. The only thing I have to change is the fallback value to 0.5 by an inherited PressureManger which overwrites the default fallback value.

It would be really helpful if the fallback value would be customizable from outside. Maybe with an extra config object on instantiation or a setter function.

Hi @cytostatic, thanks for your interest and even sending us a PR!

To customize the fallback value, I believe you could simply assign a desirable value to brush.pressureManager.fallback, as shown in the "Usage" section. It's a public property that can be read/written from outside the class.

Hi @arcatdmz, thank you for your reply.

You are right. It is a usable solution. You can close the issue and remove the pull request.

Ok, thanks again for the feedback! Let me close the issue and PR.