-
-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Is there any documentation for using this package? #1
Comments
Thanks for the feedback! Yep, the documentation website is currently a work in progress. Plugin documentation is still missing entirely. The gist: there's a plugin helper component in the import { AnnotoriousPlugin } from '@annotorious/react';
import { mountPlugin as ToolsPlugin } from '@annotorious/plugin-tools';
//...
<AnnotoriousPlugin plugin={ToolsPlugin} /> Things got changed and renamed a bit recently - I still need to test for regressions. But here's a full example of how I've used the ellipse tool in React myself. (Note that this code still uses the old package/function names!). Let me know if you get it working this way. |
i wanted to use the vanilla version in angular project, is there any guideline to add circle as drawing tool? |
Unfortunately, there is no special support for Angular (yet). So you'd need to follow the vanilla JS pattern. Also, there's no documentation for the plugin ;-) But it should be fairly straightforward. See the vanilla JS example here: https://github.com/annotorious/annotorious-plugin-tools/blob/main/test/index.html#L35-L55 |
I think that will be enough, i don't see any problem using the vanilla version with angular as long it doesn't have unnecessary dependencies. But i see the ellipse editor is create in svelte. how it would work with vanilla version? |
looks like it's an early stage of development, just some feedback
|
Oops. Indeed - I renamed the package recently, and managed to mess up some config in the |
Oops. Indeed - I renamed the package recently, and managed to mess up some config in the |
I can build a toolbar to annotate now, the following is my code.
I want to use ellipse, but how to add this line to my code?
After the above code, I think I can use the following code to draw ellipse.
|
Sorry, I didn't have the time to make the tools plugin available for script import yet. |
Got it, still thank you for your awesome tool. I'll try to study the possibility to migrate my product to typescript. |
The library should be ready for script import, so it might just be a matter of tweaking the build config. I'll try to look into it over the weekend if I get the chance. |
I tweaked the build and published a new version. I think this should now work for script import. The CDN URLs are: |
Thanks, I think I need to import this plugin before execute |
If you import via the script tag, you'll get a global variable in your page. It should be |
This is my code, I want to build a small annotation tool on my page.
|
AnnotoriousTools.mountPlugin(anno); |
It works, thanks. |
Firstly, I just started integrating annotorious into my project and am really happy with the project. Thanks for creating this!
I was looking for documentation on adding the ellipse plugin. I imagine we just need to call mountPlugin, but I'm having trouble even importing this library into my react project.
Thanks!
The text was updated successfully, but these errors were encountered: