susielu / react-annotation

Use react-annotation with built-in annotation types, or extend it to make custom annotations. It is made for annotations in SVG.
http://react-annotation.susielu.com/
Apache License 2.0
396 stars 34 forks source link

Feature: allow percentage-based positioning #34

Open queengooborg opened 4 years ago

queengooborg commented 4 years ago

As a part of our refactoring project, we are overhauling all of the old screenshots, including feature tutorials. During this overhaul, we came up with the idea of using components for our annotations rather than embedding them directly into the images, allowing for better accessibility, localization, and modifications. That's what led us to this package. It appears to have everything we're looking for in an annotation library, and we're excited to implement it into our project.

There's just one little thing that's preventing us from proceeding at the moment. Since we have a responsive layout, pixel-based positioning won't really work. We'd need something more relative, specifically percentage-based positioning. It would be great if this package could accept percentage-based values (and by extension, maybe even all length-based values that SVG elements can accept)!

Since this is a critical feature to our project, my employer has authorized me to write code for this repository. In other words, if desired, I'd be more than happy to write a PR for this!