🎨 Flat, simple, multi-themed, responsive and hackable Color-Picker library. No dependencies, no jQuery. Compatible with all CSS Frameworks e.g. Bootstrap, Materialize. Supports alpha channel, rgba, hsla, hsva and more!
The 'change' event coming from the preview fires many times per second. This doesn't allow to add an event listener that takes long to run >30ms, otherwise the preview gets blocked. So any heavy calculation has to go to 'changestop' event and only light calculations on 'change'.
The problem is that 'changestop' won't fire from the input, so I cannot fire any heavy calculation when the user changes the input.
Adding extra events like 'inputChange', 'previewChange' or 'swatchChange' feels like duplicating functionality.
Adding an extra parameter to the event callback will break things since it will look like (color, changeSource, instance) and the instance parameter would change from the second to the third position.
So the fastest and non-breaking solution was adding an extra property to pickr
I also changed the dev url to the current one. localhost:8080 doesn't work anymore.
Thank you for your efforts, as in #193 I'll fire changestop on user-input too and add a source-property to the eventy. Adding another property is too specific for a single use case and might be confusing.
Based on this issue.
The 'change' event coming from the preview fires many times per second. This doesn't allow to add an event listener that takes long to run >30ms, otherwise the preview gets blocked. So any heavy calculation has to go to 'changestop' event and only light calculations on 'change'. The problem is that 'changestop' won't fire from the input, so I cannot fire any heavy calculation when the user changes the input.
Adding extra events like
'inputChange'
,'previewChange'
or'swatchChange'
feels like duplicating functionality. Adding an extra parameter to the event callback will break things since it will look like(color, changeSource, instance)
and the instance parameter would change from the second to the third position.So the fastest and non-breaking solution was adding an extra property to
pickr
I also changed the dev url to the current one.
localhost:8080
doesn't work anymore.