ailon / markerjs

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

Trigger save event #53

Open laguiar-clgx opened 3 years ago

laguiar-clgx commented 3 years ago

There is any way we can trigger the Ok/save button? i need to implement like a 'autosave'

ailon commented 3 years ago

The literal answer to your question is calling MarkerArea.startRenderAndClose() but thats propbably not what you want for autosave :) This will close the UI.

For autosave you'd want to save the state and restore it later on (if needed). For that there's a getState() method.

Here's an article on saving/restoring state: https://markerjs.com/docs/saving-state

ailon commented 3 years ago

Oh, sorry. Didn't notice this is about marker.js v1. If so, I suggest you switch to marker.js 2 if possible.