ailon / markerjs

[Deprecated - use markerjs2]: Let your users annotate and mark images
https://markerjs.com
MIT License
103 stars 32 forks source link

Can we give multiple markerjs main color option to user? #39

Closed er-arun-mishra closed 4 years ago

er-arun-mishra commented 4 years ago

Hii there, I have given a color palette in the markerjs-toolbar to give multiple color options to users.Like if I add arrow on image with red color then next time when I choose blue color and take the second arrow there should now be two arrow with blue and red color. For that I use the saveState option(to render the initial red color arrow) as you can see below: mark = new markerjs.MarkerArea(document.getElementById('imagePreview'),{ previousState: savedState, markerColors: { mainColor: color }}); but what happens here is the savedState gets rendered but the previously used color(red color arrow) gets changed to the newly selected color(blue). How can I achieve this functionality of using multicolor to edit/annotate.? Hoping for help soon.. Thanks

ailon commented 4 years ago

This can't be done in the current version as the overall foreground color is changed and there's no way to set individual marker colors, unfortunately.