in creating screenshot custom widget - how to insert the html?

2681
17
Jump to solution
07-06-2020 05:40 AM
MichaelLev
Occasional Contributor III

In ArcGIS Web AppBuilder (Developer Edition) 2.16, I have to create in-panel custom widget to make a screenshot, based upon Take a screenshot of a SceneView | ArcGIS API for JavaScript 4.15  

As I'm relatively new to this area, I'd appreciate getting advice in which way to do it? whether by javascript "innerHTML =" sentences, or to create a class like LoadingShelter? And I'd like to get some hints as to how to start doing it.

In short: I don't know the way how can I insert html and css by in-panel widget, into the main scene, which, according to what I understand, is what I need to implement in this case.

0 Kudos
17 Replies
RobertScheitlin__GISP
MVP Emeritus

No this was just an example for Michael of how to take a sample and convert it to a widget.

0 Kudos
AdamGebhart
Occasional Contributor III

Good to know.  Thank you.

0 Kudos
AdamGebhart
Occasional Contributor III

Out of curiosity, Robert Scheitlin, GISP, have you tried it in 2.17?  I can't find the 2.16 SDK and for some reason I'm not seeing it as an option to add to a 2.17 app.

0 Kudos
RobertScheitlin__GISP
MVP Emeritus

Adam,

   This widget is a 3D WAB App widget only. Are you adding it to the [install dir]\client\stemapp3d\widgets folder and creating a 3D app?

AdamGebhart
Occasional Contributor III

Sorry, I didn't realize it was a 3D widget.  I've been trying in a 2D app.  Thanks for answering.

0 Kudos
MichaelLev
Occasional Contributor III

Robert, Thank you very much! now it's perfect!

I wnat only to be sure why in the esri example we don't get multi-events. Is it because there we don't ADD events, but only OVERRIDE the button definition (we do button.onclick = function)? is this the right explanation?

0 Kudos
RobertScheitlin__GISP
MVP Emeritus

Correct, Using Dojo on class means that an event listener is added each time that line is called vs. onclick is a function that is just being overwritten each time.

Don't forget to make your questions as answered once they are. This helps others using the forum find the correct answer.

MichaelLev
Occasional Contributor III

Thank you very much, Robert. As usual, you are so helpful and opening my eyes in this area of custom widgets.

Michael

0 Kudos