Targeting a specific html popup

Is there a way to target a specific html popup (in body-end.html) then use the onClose command to change to a specific Camera view, i saw it in action and also it did work on the Shapespark API example, but its for the popup that loads on scene load.

Displaying HTML pop-ups

To display an HTML pop-up use the following function:

Viewer.openPopup(content, options, onClose) - opens a pop-up with content defined by an HTML markup string in the content argument. options is an optional object definining how the pop-up is laid out and

onClose is an optional callback called when the pop-up is closed.

@maiku @tim

Thank you

It’s not possible to listen for “close” events for HTML label extension pop-ups, only for the pop-ups created via the viewer API.

To show a (viewer API) pop-up on an object click take a look at the example in the Node click notifications section of the API documentation.

1 Like