galexandrade / react-image-marker

It allows to be able to set markers on an image
MIT License
48 stars 12 forks source link

Ability to pass custom image component. And ability to mark any type of div. #4

Open dipeshparashar opened 3 years ago

dipeshparashar commented 3 years ago

Great Module. It simply works. But it will be great if you can consider the following;

  1. I was trying to add some css to my image "object-fit-contain". But couldn't. It is important because certain vertical images are being cut out which fails the entire purpose. It would be great if we can pass an component into it which it can use rather than creating itself.
  2. The Marker div can mark any element inside it ie. text, gif, any media or layout if it becomes a container. This will be very very useful.

Please let me know about it and if i will be able to use the following changes soon. Thank you.

dipeshparashar commented 3 years ago

@galexandrade After changing css to

.image-marker {
  width: inherit;
  height: inherit;
}

.image-marker__image {
  object-fit:contain !important;
  width: inherit;
  height: inherit;
}

Image-marker size surpasses image bounds https://imgur.com/a/ZQCJ2oa