Comments (9)
Good point. Maybe a clearAnnotations
method would be nice.
As far as functionality is concerned: you should get the same effect by setting setAnnotations([])
. The empty array should replace the existing annotations if I remember correctly. But I'll double check...
from annotorious-openseadragon.
Yikes. I'm realizing that API-wise, the OpenSeadragon plugin lags further behind the standard version as I thought.
getAnnotations
was indeed broken. I just fixed this in the master branch.setAnnotations
did not remove existing annotations. I fixed this, too. You can now usesetAnnotations
to clear the annotation layer, and it's also ok to call it without argument. I.e. both this works:
anno.setAnnotations([]);
anno.setAnnotations();
from annotorious-openseadragon.
Also thanks, I'll check about getAnnotations
.
from annotorious-openseadragon.
P.S. I think in terms of API semantics, calling setAnnotations
with empty or no argument feels sufficient, and there's maybe no need for an extra clearAnnotations
method. But I'm happy to hear dissenting opinions :-)
from annotorious-openseadragon.
P.P.S: that webview client looks awesome! Looking forward to trying this out myself once you've published it.
from annotorious-openseadragon.
fixing getAnnotations()
has solved the problem, i've not looked deeply the code but i don't need to setAnnotations[]
empty
a quick demo: https://docuver.se/tmp/annotorius.app.mp4
(i'll fix some things on building and packaging and i will publish)
from annotorious-openseadragon.
Fantastic! Both using getAnnotations
and then looping through the annotations using removeAnnotation
will work. Although, technically, a call to setAnnotations()
will be marginally faster, if you are being super-picky about it ;-)
from annotorious-openseadragon.
sorry, i explain better: after your fix of yesterday i don't need anymore to remove the previous annotations on canvas change.
https://github.com/atomotic/annotorius-desktop/blob/master/public/index.html#L34-L43
i published here https://github.com/atomotic/annotorius-desktop
is very very raw and incomplete, i spent on this just a couple of hours
from annotorious-openseadragon.
Ah - of course! Because setAnnotations
now properly resets as it should. Thanks for the link! I'll try to install & test drive myself tonight :-)
from annotorious-openseadragon.
Related Issues (20)
- Having a little trouble with widgets in React HOT 2
- Angular 15 import HOT 7
- openseadragon package error with Vite HOT 2
- Annotations can be moved HOT 6
- .getSelectedImageSnippet() error HOT 8
- Drawing tools stuck after single click HOT 4
- Autosave annotations when widget closes HOT 1
- Modify the size of the annotations edit points when zoomed out HOT 1
- Accessing annotation state in headless mode HOT 8
- setAnnotations throws an error HOT 2
- Disable hotkey altogether HOT 1
- annotorious-OSD in vue 3 HOT 1
- Set the viewport position and zoom HOT 2
- Annotorious selection box and OSD rotation HOT 1
- The AnnotationLayer class is console logging
- Is it possible to add a constraint when resizing annotations outside the image? HOT 1
- Adding two separate distinct svg Annotations HOT 1
- When can the editor support customization?
- How does the annotorious toolbar plugin detect button switching events?
- When the gigapixelMode property is enabled in annotorious-openseadragon, there is an error when drawing lines, I don't know what is the reason
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from annotorious-openseadragon.