Closed darkl1ght closed 1 year ago
As you are using TypeScript you'd have to cast the type of these marker states. Something like a ... as mjslive.MarkerBaseState
should do, if your goal is just to get rid of the errors.
Here's an example with your sample state.
I have got the react code from your website https://markerjs.com/ that helped me clear my issues. Just needed to go to debugger and in Sources(tab) > webpack > src > components > frontPageDemo.tsx. Great work on the package.
I am trying to pre-load the annotations on an image using MarkerJS Live in Angular 14. When I am calling
const snapshotEl = document.getElementById("snapshot") as HTMLImageElement;
const markerView = new mjslive.MarkerView(snapshotEl);
markerView.show(this.maState);
the show call gives error that it cannot be assigned in angular as type is not matching. You can check the error in stackblitz demo link