Closed mynhidwotz closed 1 year ago
For Live there's nothing special needed from the marker.js side to open an annotation in a popup. Just do whatever is the most "natural" way to create a popup in your application and use marker.js Live in it. I don't envision any issues.
Hello, I must say that I ran into issues in popup.
I get this error:
MarkerView.ts:71 Error: <image> attribute width: Expected length, "NaN". t.setAttributes @ MarkerView.ts:71 i.setDrawingImage @ MarkerView.ts:71 i.scale @ MarkerView.ts:71 (anonymous) @ MarkerView.ts:71 t.scaleMarkers @ MarkerView.ts:71 t.resize @ MarkerView.ts:71 (anonymous) @ MarkerView.ts:71
Problem occurs when I close and then again open modal (popup). First open of modal works just fine.
@KovaZg I'd need some more details or better yet a repro to be able to suggest anything specific or identify a bug. Are you closing marker.js when you close your modal and then reopening it? If not, I'd try that first.
The demo on the markerjs.com front page is closing the Live demo when you press the "Edit" button and then reopens it when "ok" is clicked in the marker.js 2.
Thanks @ailon Issue was with 2 functions (1 when modal is opened and other when closed, I had to declare some variables global), now when I made global and I call show / close, it works like a charm! Thank you for your support.
Code that helped me a lot is:
if (markerView === undefined || !markerView.isOpen) { markerView.show(maState); }else{ markerView.close(); }
Thank you for this library and all the effort you put into it.
Quick question: is there a good way to implement popup similar to marker.js ?