<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic in creating screenshot custom widget - how to insert the html? in Web AppBuilder Custom Widgets Questions</title>
    <link>https://community.esri.com/t5/web-appbuilder-custom-widgets-questions/in-creating-screenshot-custom-widget-how-to-insert/m-p/876883#M13631</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;In ArcGIS Web AppBuilder (Developer Edition) 2.16, I have to create in-panel custom widget to make a screenshot, based upon&amp;nbsp;&lt;A class="link-titled" href="https://developers.arcgis.com/javascript/latest/sample-code/sceneview-screenshot/index.html" title="https://developers.arcgis.com/javascript/latest/sample-code/sceneview-screenshot/index.html"&gt;Take a screenshot of a SceneView | ArcGIS API for JavaScript 4.15&lt;/A&gt;&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;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&amp;nbsp;class like LoadingShelter? And I'd like to get some hints as to how to start doing it.&lt;/P&gt;&lt;P&gt;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.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 06 Jul 2020 12:40:52 GMT</pubDate>
    <dc:creator>MichaelLev</dc:creator>
    <dc:date>2020-07-06T12:40:52Z</dc:date>
    <item>
      <title>in creating screenshot custom widget - how to insert the html?</title>
      <link>https://community.esri.com/t5/web-appbuilder-custom-widgets-questions/in-creating-screenshot-custom-widget-how-to-insert/m-p/876883#M13631</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;In ArcGIS Web AppBuilder (Developer Edition) 2.16, I have to create in-panel custom widget to make a screenshot, based upon&amp;nbsp;&lt;A class="link-titled" href="https://developers.arcgis.com/javascript/latest/sample-code/sceneview-screenshot/index.html" title="https://developers.arcgis.com/javascript/latest/sample-code/sceneview-screenshot/index.html"&gt;Take a screenshot of a SceneView | ArcGIS API for JavaScript 4.15&lt;/A&gt;&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;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&amp;nbsp;class like LoadingShelter? And I'd like to get some hints as to how to start doing it.&lt;/P&gt;&lt;P&gt;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.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 06 Jul 2020 12:40:52 GMT</pubDate>
      <guid>https://community.esri.com/t5/web-appbuilder-custom-widgets-questions/in-creating-screenshot-custom-widget-how-to-insert/m-p/876883#M13631</guid>
      <dc:creator>MichaelLev</dc:creator>
      <dc:date>2020-07-06T12:40:52Z</dc:date>
    </item>
    <item>
      <title>Re: in creating screenshot custom widget - how to insert the html?</title>
      <link>https://community.esri.com/t5/web-appbuilder-custom-widgets-questions/in-creating-screenshot-custom-widget-how-to-insert/m-p/876884#M13632</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Michael,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; See if you can learn the principles from this. I took the sample you referenced and created a widget from it. See attached widget.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 06 Jul 2020 17:21:08 GMT</pubDate>
      <guid>https://community.esri.com/t5/web-appbuilder-custom-widgets-questions/in-creating-screenshot-custom-widget-how-to-insert/m-p/876884#M13632</guid>
      <dc:creator>RobertScheitlin__GISP</dc:creator>
      <dc:date>2020-07-06T17:21:08Z</dc:date>
    </item>
    <item>
      <title>Re: in creating screenshot custom widget - how to insert the html?</title>
      <link>https://community.esri.com/t5/web-appbuilder-custom-widgets-questions/in-creating-screenshot-custom-widget-how-to-insert/m-p/876885#M13633</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Dear Robert,&lt;/P&gt;&lt;P&gt;Thank you so much!&lt;/P&gt;&lt;P&gt;Now it's late here. I'll inform you after trying tomorrow. Today I tried something myself, but have not succeeded yet, so I hope to learn the right way to do it from what you sent.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 06 Jul 2020 19:42:43 GMT</pubDate>
      <guid>https://community.esri.com/t5/web-appbuilder-custom-widgets-questions/in-creating-screenshot-custom-widget-how-to-insert/m-p/876885#M13633</guid>
      <dc:creator>MichaelLev</dc:creator>
      <dc:date>2020-07-06T19:42:43Z</dc:date>
    </item>
    <item>
      <title>Re: in creating screenshot custom widget - how to insert the html?</title>
      <link>https://community.esri.com/t5/web-appbuilder-custom-widgets-questions/in-creating-screenshot-custom-widget-how-to-insert/m-p/876886#M13634</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you, Robert, it works for me!&lt;/P&gt;&lt;P&gt;I have a few questions. most important&amp;nbsp;-&lt;/P&gt;&lt;P&gt;If I activate your widget, I get multiple explorer download dialogs... (from the 2nd case, I get two one after another). This does not happen in esri app. I "bypassed" this problem, but I am eager to understand why the app does not have this problem, only the widget - so waht is the cause of it, and how to solve it?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The other questions (less important, but needed for me in order to understand the process of converting app to widget) -&lt;/P&gt;&lt;P&gt;1. why do we need and what does the line "this.inherited(arguments);" ?&lt;BR /&gt;2. In the file style.css, why the prefix "jimu-widget-screenshot" not needed for all items?&lt;BR /&gt;3. screenshotBtn have class "esri-widget" both in esri app and in your widget. why? what does it do?&lt;BR /&gt;4. in the app, the div "viewDiv" that contains the scene and the button, also has class "esri-widget". again, why and what it does?&lt;/P&gt;&lt;P&gt;Thank you&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 07 Jul 2020 17:01:18 GMT</pubDate>
      <guid>https://community.esri.com/t5/web-appbuilder-custom-widgets-questions/in-creating-screenshot-custom-widget-how-to-insert/m-p/876886#M13634</guid>
      <dc:creator>MichaelLev</dc:creator>
      <dc:date>2020-07-07T17:01:18Z</dc:date>
    </item>
    <item>
      <title>Re: in creating screenshot custom widget - how to insert the html?</title>
      <link>https://community.esri.com/t5/web-appbuilder-custom-widgets-questions/in-creating-screenshot-custom-widget-how-to-insert/m-p/876887#M13635</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Michael,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;BLOCKQUOTE class="jive_macro_quote jive-quote jive_text_macro"&gt;&lt;P&gt;If I activate your widget, I get multiple explorer download dialogs... (from the 2nd case, I get two one after another). This does not happen in esri app. I "bypassed" this problem, but I am eager to understand why the app does not have this problem, only the widget - so what is the cause of it, and how to solve it?&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;Hmm.. I don't see this on my end. Are you using an non-modern browser like IE?&lt;/P&gt;&lt;P&gt;&lt;SPAN style="background-color: #ffffff;"&gt;1. why do we need and what does the line "this.inherited(arguments);" ?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;A. This is a line of code that tells the function to perform the normal things that this function does if it is inherited from some other class.&lt;BR style="background-color: #ffffff;" /&gt;&lt;SPAN style="background-color: #ffffff;"&gt;2. In the file style.css, why the prefix "jimu-widget-screenshot" not needed for all items?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;A. It is best to have higher class specificity by using&amp;nbsp;&lt;SPAN style="background-color: #ffffff;"&gt;"jimu-widget-screenshot". But sometimes coders just get lazy.&lt;/SPAN&gt;&lt;BR style="background-color: #ffffff;" /&gt;&lt;SPAN style="background-color: #ffffff;"&gt;3. screenshotBtn have class "esri-widget" both in esri app and in your widget. why? what does it do?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;A. esri-widget is a&amp;nbsp;css rule that adds some style to the element.&lt;BR style="background-color: #ffffff;" /&gt;&lt;SPAN style="background-color: #ffffff;"&gt;4. in the app, the div "viewDiv" that contains the scene and the button, also has class "esri-widget". again, why and what it does?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="background-color: #ffffff;"&gt;A. Same as last question.&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 07 Jul 2020 17:23:12 GMT</pubDate>
      <guid>https://community.esri.com/t5/web-appbuilder-custom-widgets-questions/in-creating-screenshot-custom-widget-how-to-insert/m-p/876887#M13635</guid>
      <dc:creator>RobertScheitlin__GISP</dc:creator>
      <dc:date>2020-07-07T17:23:12Z</dc:date>
    </item>
    <item>
      <title>Re: in creating screenshot custom widget - how to insert the html?</title>
      <link>https://community.esri.com/t5/web-appbuilder-custom-widgets-questions/in-creating-screenshot-custom-widget-how-to-insert/m-p/876888#M13636</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Dear Robert,&lt;/P&gt;&lt;P&gt;I assume you have not succeeded to reproduce the problem.&lt;/P&gt;&lt;P&gt;I always run on an updated chrome...&lt;/P&gt;&lt;P&gt;I assume you just created single screenshot,&amp;nbsp;and indeed If you activate the widget once, it is OK.&lt;/P&gt;&lt;P&gt;But...&lt;/P&gt;&lt;P&gt;When you create 2nd screenshot, it saves AGAIN the 1st, then the 2nd.&lt;/P&gt;&lt;P&gt;When you activate 3rd time, it saves AGAIN the 1st, then AGAIN the 2nd, then the 3rd...&lt;/P&gt;&lt;P&gt;and so on and on.&lt;/P&gt;&lt;P&gt;This is a serious problem. I have not succeeded yet to solve it&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 08 Jul 2020 06:23:40 GMT</pubDate>
      <guid>https://community.esri.com/t5/web-appbuilder-custom-widgets-questions/in-creating-screenshot-custom-widget-how-to-insert/m-p/876888#M13636</guid>
      <dc:creator>MichaelLev</dc:creator>
      <dc:date>2020-07-08T06:23:40Z</dc:date>
    </item>
    <item>
      <title>Re: in creating screenshot custom widget - how to insert the html?</title>
      <link>https://community.esri.com/t5/web-appbuilder-custom-widgets-questions/in-creating-screenshot-custom-widget-how-to-insert/m-p/876889#M13637</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Michael,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; OK, that explains the issue better. So here is the code fix.&lt;/P&gt;&lt;P&gt;The issue was an on click event was being added each time a screen shot was being made (thus multiple event being fired).&lt;/P&gt;&lt;OL&gt;&lt;LI&gt;Add line 10 to startup&lt;/LI&gt;&lt;LI&gt;Add new downloadClick function lines 13-30&lt;/LI&gt;&lt;LI&gt;Line 86 is where the on click for the download button use to be. It has been removed and replaced with the single line on 86.&lt;/LI&gt;&lt;/OL&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;CODE&gt;      startup&lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt; &lt;SPAN class="keyword token"&gt;function&lt;/SPAN&gt; &lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt; &lt;SPAN class="punctuation token"&gt;{&lt;/SPAN&gt;
        &lt;SPAN class="keyword token"&gt;this&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;&lt;SPAN class="token function"&gt;inherited&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;arguments&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;
        &lt;SPAN class="keyword token"&gt;this&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;element &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; document&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;&lt;SPAN class="token function"&gt;createElement&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;"div"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;
        &lt;SPAN class="keyword token"&gt;this&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;element&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;&lt;SPAN class="token function"&gt;setAttribute&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;'class'&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;'hide screenshotCursor maskDiv'&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;
        &lt;SPAN class="keyword token"&gt;this&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;sceneView&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;container&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;&lt;SPAN class="token function"&gt;appendChild&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="keyword token"&gt;this&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;element&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;
        &lt;SPAN class="token function"&gt;on&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="keyword token"&gt;this&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;closeBtn&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;"click"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; lang&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;&lt;SPAN class="token function"&gt;hitch&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="keyword token"&gt;this&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; &lt;SPAN class="keyword token"&gt;function&lt;/SPAN&gt; &lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt; &lt;SPAN class="punctuation token"&gt;{&lt;/SPAN&gt;
          &lt;SPAN class="keyword token"&gt;this&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;screenshotDiv&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;classList&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;&lt;SPAN class="token function"&gt;add&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;"hide"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;
        &lt;SPAN class="punctuation token"&gt;}&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;
        &lt;SPAN class="token function"&gt;on&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="keyword token"&gt;this&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;screenshotBtn&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;"click"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; lang&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;&lt;SPAN class="token function"&gt;hitch&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="keyword token"&gt;this&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; &lt;SPAN class="keyword token"&gt;this&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;captureScene&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;
        &lt;SPAN class="token function"&gt;on&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="keyword token"&gt;this&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;downloadBtn&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;"click"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; lang&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;&lt;SPAN class="token function"&gt;hitch&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="keyword token"&gt;this&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; &lt;SPAN class="keyword token"&gt;this&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;downloadClick&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;
      &lt;SPAN class="punctuation token"&gt;}&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt;

      downloadClick&lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt; &lt;SPAN class="keyword token"&gt;function&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;{&lt;/SPAN&gt;
        &lt;SPAN class="keyword token"&gt;const&lt;/SPAN&gt; text &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; &lt;SPAN class="keyword token"&gt;this&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;textInput&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;value&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;
        &lt;SPAN class="comment token"&gt;// if a text exists, then add it to the image&lt;/SPAN&gt;
        &lt;SPAN class="keyword token"&gt;if&lt;/SPAN&gt; &lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;text&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt; &lt;SPAN class="punctuation token"&gt;{&lt;/SPAN&gt;
          &lt;SPAN class="keyword token"&gt;const&lt;/SPAN&gt; dataUrl &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; &lt;SPAN class="keyword token"&gt;this&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;&lt;SPAN class="token function"&gt;getImageWithText&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="keyword token"&gt;this&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;screenshot&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; text&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;
          &lt;SPAN class="keyword token"&gt;this&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;&lt;SPAN class="token function"&gt;downloadImage&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;
            &lt;SPAN class="keyword token"&gt;this&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;sceneView&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;map&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;portalItem&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;title &lt;SPAN class="operator token"&gt;+&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;".png"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt;
            dataUrl
          &lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;
        &lt;SPAN class="punctuation token"&gt;}&lt;/SPAN&gt;
        &lt;SPAN class="comment token"&gt;// otherwise download only the webscene screenshot&lt;/SPAN&gt;
        &lt;SPAN class="keyword token"&gt;else&lt;/SPAN&gt; &lt;SPAN class="punctuation token"&gt;{&lt;/SPAN&gt;
          &lt;SPAN class="keyword token"&gt;this&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;&lt;SPAN class="token function"&gt;downloadImage&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;
            &lt;SPAN class="keyword token"&gt;this&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;sceneView&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;map&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;portalItem&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;title &lt;SPAN class="operator token"&gt;+&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;".png"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt;
            &lt;SPAN class="keyword token"&gt;this&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;screenshot&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;dataUrl
          &lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;
        &lt;SPAN class="punctuation token"&gt;}&lt;/SPAN&gt;
      &lt;SPAN class="punctuation token"&gt;}&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt;‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍

      captureScene&lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt; &lt;SPAN class="keyword token"&gt;function&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;{&lt;/SPAN&gt;
        &lt;SPAN class="keyword token"&gt;this&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;screenshotBtn&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;classList&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;&lt;SPAN class="token function"&gt;add&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;"active"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;
        &lt;SPAN class="keyword token"&gt;this&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;sceneView&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;container&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;classList&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;&lt;SPAN class="token function"&gt;add&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;"screenshotCursor"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;

        &lt;SPAN class="keyword token"&gt;let&lt;/SPAN&gt; area &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; &lt;SPAN class="keyword token"&gt;null&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;

        &lt;SPAN class="comment token"&gt;// listen for drag events and compute the selected area&lt;/SPAN&gt;
        &lt;SPAN class="keyword token"&gt;const&lt;/SPAN&gt; dragHandler &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; &lt;SPAN class="keyword token"&gt;this&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;sceneView&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;&lt;SPAN class="token function"&gt;on&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;"drag"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; lang&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;&lt;SPAN class="token function"&gt;hitch&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="keyword token"&gt;this&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; &lt;SPAN class="keyword token"&gt;function&lt;/SPAN&gt; &lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;event&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt; &lt;SPAN class="punctuation token"&gt;{&lt;/SPAN&gt;
          &lt;SPAN class="comment token"&gt;// prevent navigation in the view&lt;/SPAN&gt;
          event&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;&lt;SPAN class="token function"&gt;stopPropagation&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;

          &lt;SPAN class="comment token"&gt;// when the user starts dragging or is dragging&lt;/SPAN&gt;
          &lt;SPAN class="keyword token"&gt;if&lt;/SPAN&gt; &lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;event&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;action &lt;SPAN class="operator token"&gt;!==&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;"end"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt; &lt;SPAN class="punctuation token"&gt;{&lt;/SPAN&gt;
            &lt;SPAN class="comment token"&gt;// calculate the extent of the area selected by dragging the cursor&lt;/SPAN&gt;
            &lt;SPAN class="keyword token"&gt;const&lt;/SPAN&gt; xmin &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; &lt;SPAN class="token function"&gt;clamp&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;
              Math&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;&lt;SPAN class="token function"&gt;min&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;event&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;origin&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;x&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; event&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;x&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt;
              &lt;SPAN class="number token"&gt;0&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt;
              &lt;SPAN class="keyword token"&gt;this&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;sceneView&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;width
            &lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;
            &lt;SPAN class="keyword token"&gt;const&lt;/SPAN&gt; xmax &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; &lt;SPAN class="token function"&gt;clamp&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;
              Math&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;&lt;SPAN class="token function"&gt;max&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;event&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;origin&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;x&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; event&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;x&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt;
              &lt;SPAN class="number token"&gt;0&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt;
              &lt;SPAN class="keyword token"&gt;this&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;sceneView&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;width
            &lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;
            &lt;SPAN class="keyword token"&gt;const&lt;/SPAN&gt; ymin &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; &lt;SPAN class="token function"&gt;clamp&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;
              Math&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;&lt;SPAN class="token function"&gt;min&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;event&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;origin&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;y&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; event&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;y&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt;
              &lt;SPAN class="number token"&gt;0&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt;
              &lt;SPAN class="keyword token"&gt;this&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;sceneView&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;height
            &lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;
            &lt;SPAN class="keyword token"&gt;const&lt;/SPAN&gt; ymax &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; &lt;SPAN class="token function"&gt;clamp&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;
              Math&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;&lt;SPAN class="token function"&gt;max&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;event&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;origin&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;y&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; event&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;y&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt;
              &lt;SPAN class="number token"&gt;0&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt;
              &lt;SPAN class="keyword token"&gt;this&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;sceneView&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;height
            &lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;
            area &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; &lt;SPAN class="punctuation token"&gt;{&lt;/SPAN&gt;
              x&lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt; xmin&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt;
              y&lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt; ymin&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt;
              width&lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt; xmax &lt;SPAN class="operator token"&gt;-&lt;/SPAN&gt; xmin&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt;
              height&lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt; ymax &lt;SPAN class="operator token"&gt;-&lt;/SPAN&gt; ymin
            &lt;SPAN class="punctuation token"&gt;}&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;
            &lt;SPAN class="comment token"&gt;// set the position of the div element that marks the selected area&lt;/SPAN&gt;
            &lt;SPAN class="token function"&gt;setMaskPosition&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;area&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; &lt;SPAN class="keyword token"&gt;this&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;element&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;
          &lt;SPAN class="punctuation token"&gt;}&lt;/SPAN&gt;
          &lt;SPAN class="comment token"&gt;// when the user stops dragging&lt;/SPAN&gt;
          &lt;SPAN class="keyword token"&gt;else&lt;/SPAN&gt; &lt;SPAN class="punctuation token"&gt;{&lt;/SPAN&gt;
            &lt;SPAN class="comment token"&gt;// remove the drag event listener from the SceneView&lt;/SPAN&gt;
            dragHandler&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;&lt;SPAN class="token function"&gt;remove&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;
            &lt;SPAN class="comment token"&gt;// the screenshot of the selected area is taken&lt;/SPAN&gt;
            &lt;SPAN class="keyword token"&gt;this&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;sceneView
              &lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;&lt;SPAN class="token function"&gt;takeScreenshot&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;{&lt;/SPAN&gt;
                area&lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt; area&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt;
                format&lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;"png"&lt;/SPAN&gt;
              &lt;SPAN class="punctuation token"&gt;}&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;
              &lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;&lt;SPAN class="token function"&gt;then&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;lang&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;&lt;SPAN class="token function"&gt;hitch&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="keyword token"&gt;this&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; &lt;SPAN class="keyword token"&gt;function&lt;/SPAN&gt; &lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;screenshot&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt; &lt;SPAN class="punctuation token"&gt;{&lt;/SPAN&gt;
                &lt;SPAN class="keyword token"&gt;this&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;screenshot &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; screenshot&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;
                &lt;SPAN class="comment token"&gt;// display a preview of the image&lt;/SPAN&gt;
                &lt;SPAN class="keyword token"&gt;this&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;&lt;SPAN class="token function"&gt;showPreview&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;screenshot&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;
                &lt;SPAN class="keyword token"&gt;this&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;sceneView&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;container&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;classList&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;&lt;SPAN class="token function"&gt;remove&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;"screenshotCursor"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;
                &lt;SPAN class="token function"&gt;setMaskPosition&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="keyword token"&gt;null&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; &lt;SPAN class="keyword token"&gt;this&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;element&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;
              &lt;SPAN class="punctuation token"&gt;}&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;
          &lt;SPAN class="punctuation token"&gt;}&lt;/SPAN&gt;
        &lt;SPAN class="punctuation token"&gt;}&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 12 Dec 2021 11:00:23 GMT</pubDate>
      <guid>https://community.esri.com/t5/web-appbuilder-custom-widgets-questions/in-creating-screenshot-custom-widget-how-to-insert/m-p/876889#M13637</guid>
      <dc:creator>RobertScheitlin__GISP</dc:creator>
      <dc:date>2021-12-12T11:00:23Z</dc:date>
    </item>
    <item>
      <title>Re: in creating screenshot custom widget - how to insert the html?</title>
      <link>https://community.esri.com/t5/web-appbuilder-custom-widgets-questions/in-creating-screenshot-custom-widget-how-to-insert/m-p/876890#M13638</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Robert, Thank you very much! now it's perfect!&lt;/P&gt;&lt;P&gt;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?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 08 Jul 2020 16:35:33 GMT</pubDate>
      <guid>https://community.esri.com/t5/web-appbuilder-custom-widgets-questions/in-creating-screenshot-custom-widget-how-to-insert/m-p/876890#M13638</guid>
      <dc:creator>MichaelLev</dc:creator>
      <dc:date>2020-07-08T16:35:33Z</dc:date>
    </item>
    <item>
      <title>Re: in creating screenshot custom widget - how to insert the html?</title>
      <link>https://community.esri.com/t5/web-appbuilder-custom-widgets-questions/in-creating-screenshot-custom-widget-how-to-insert/m-p/876891#M13639</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;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.&lt;/P&gt;&lt;P&gt;Don't forget to make your questions as answered once they are. This helps others using the forum find the correct answer.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 08 Jul 2020 16:43:06 GMT</pubDate>
      <guid>https://community.esri.com/t5/web-appbuilder-custom-widgets-questions/in-creating-screenshot-custom-widget-how-to-insert/m-p/876891#M13639</guid>
      <dc:creator>RobertScheitlin__GISP</dc:creator>
      <dc:date>2020-07-08T16:43:06Z</dc:date>
    </item>
    <item>
      <title>Re: in creating screenshot custom widget - how to insert the html?</title>
      <link>https://community.esri.com/t5/web-appbuilder-custom-widgets-questions/in-creating-screenshot-custom-widget-how-to-insert/m-p/876892#M13640</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you very much, Robert. As usual, you are so helpful and opening my eyes in this area of custom widgets.&lt;/P&gt;&lt;P&gt;Michael&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 08 Jul 2020 19:53:19 GMT</pubDate>
      <guid>https://community.esri.com/t5/web-appbuilder-custom-widgets-questions/in-creating-screenshot-custom-widget-how-to-insert/m-p/876892#M13640</guid>
      <dc:creator>MichaelLev</dc:creator>
      <dc:date>2020-07-08T19:53:19Z</dc:date>
    </item>
    <item>
      <title>Re: in creating screenshot custom widget - how to insert the html?</title>
      <link>https://community.esri.com/t5/web-appbuilder-custom-widgets-questions/in-creating-screenshot-custom-widget-how-to-insert/m-p/876893#M13641</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi &lt;A href="https://community.esri.com/migrated-users/3101"&gt;Robert Scheitlin, GISP&lt;/A&gt;‌.&amp;nbsp; I'm trying to test your widget but I'm apparently doing something wrong.&amp;nbsp; This is what I see when I open the widget.&amp;nbsp; Should I be seeing a button of some sort?&amp;nbsp; FYI, I'm in 2.13 in case it matters.&amp;nbsp; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG class="image-1 jive-image" height="345" src="https://community.esri.com/legacyfs/online/501522_pastedImage_1.png" width="308" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Per your instructions for Michael, I've made the following changes to widget.js (note the line #s are not the same as what you posted above):&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Added line 31 &amp;amp;34-51&lt;/P&gt;&lt;P&gt;&lt;IMG class="image-2 jive-image" src="https://community.esri.com/legacyfs/online/501536_pastedImage_2.png" /&gt;&lt;/P&gt;&lt;P&gt;Added line 107, commented lines 111-129 (in your example it looked like the end result is my line 109, then 131).&lt;/P&gt;&lt;P&gt;&lt;IMG class="image-3 jive-image" src="https://community.esri.com/legacyfs/online/501537_pastedImage_3.png" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Did I miss something or make a mistake along the way?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 28 Jul 2020 14:56:01 GMT</pubDate>
      <guid>https://community.esri.com/t5/web-appbuilder-custom-widgets-questions/in-creating-screenshot-custom-widget-how-to-insert/m-p/876893#M13641</guid>
      <dc:creator>AdamGebhart</dc:creator>
      <dc:date>2020-07-28T14:56:01Z</dc:date>
    </item>
    <item>
      <title>Re: in creating screenshot custom widget - how to insert the html?</title>
      <link>https://community.esri.com/t5/web-appbuilder-custom-widgets-questions/in-creating-screenshot-custom-widget-how-to-insert/m-p/876894#M13642</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Adam,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; The widget was developed for 2.16.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 28 Jul 2020 15:03:23 GMT</pubDate>
      <guid>https://community.esri.com/t5/web-appbuilder-custom-widgets-questions/in-creating-screenshot-custom-widget-how-to-insert/m-p/876894#M13642</guid>
      <dc:creator>RobertScheitlin__GISP</dc:creator>
      <dc:date>2020-07-28T15:03:23Z</dc:date>
    </item>
    <item>
      <title>Re: in creating screenshot custom widget - how to insert the html?</title>
      <link>https://community.esri.com/t5/web-appbuilder-custom-widgets-questions/in-creating-screenshot-custom-widget-how-to-insert/m-p/876895#M13643</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hmmm, you're going to make me upgrade. I usually avoid that as much as possible.&amp;nbsp; ;&amp;gt;)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Do you have an app or demo site with that widget?&amp;nbsp; I'd love to test or see it before I jump into it.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 28 Jul 2020 15:13:23 GMT</pubDate>
      <guid>https://community.esri.com/t5/web-appbuilder-custom-widgets-questions/in-creating-screenshot-custom-widget-how-to-insert/m-p/876895#M13643</guid>
      <dc:creator>AdamGebhart</dc:creator>
      <dc:date>2020-07-28T15:13:23Z</dc:date>
    </item>
    <item>
      <title>Re: in creating screenshot custom widget - how to insert the html?</title>
      <link>https://community.esri.com/t5/web-appbuilder-custom-widgets-questions/in-creating-screenshot-custom-widget-how-to-insert/m-p/876896#M13644</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;No this was just an example for Michael of how to take a sample and convert it to a widget.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 28 Jul 2020 15:28:19 GMT</pubDate>
      <guid>https://community.esri.com/t5/web-appbuilder-custom-widgets-questions/in-creating-screenshot-custom-widget-how-to-insert/m-p/876896#M13644</guid>
      <dc:creator>RobertScheitlin__GISP</dc:creator>
      <dc:date>2020-07-28T15:28:19Z</dc:date>
    </item>
    <item>
      <title>Re: in creating screenshot custom widget - how to insert the html?</title>
      <link>https://community.esri.com/t5/web-appbuilder-custom-widgets-questions/in-creating-screenshot-custom-widget-how-to-insert/m-p/876897#M13645</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Good to know.&amp;nbsp; Thank you.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 28 Jul 2020 15:30:41 GMT</pubDate>
      <guid>https://community.esri.com/t5/web-appbuilder-custom-widgets-questions/in-creating-screenshot-custom-widget-how-to-insert/m-p/876897#M13645</guid>
      <dc:creator>AdamGebhart</dc:creator>
      <dc:date>2020-07-28T15:30:41Z</dc:date>
    </item>
    <item>
      <title>Re: in creating screenshot custom widget - how to insert the html?</title>
      <link>https://community.esri.com/t5/web-appbuilder-custom-widgets-questions/in-creating-screenshot-custom-widget-how-to-insert/m-p/876898#M13646</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Out of curiosity, &lt;A href="https://community.esri.com/migrated-users/3101"&gt;Robert Scheitlin, GISP&lt;/A&gt;, have you tried it in 2.17?&amp;nbsp; 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.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG class="image-1 jive-image" src="https://community.esri.com/legacyfs/online/501553_pastedImage_1.png" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG class="image-2 jive-image" src="https://community.esri.com/legacyfs/online/501566_pastedImage_2.png" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 28 Jul 2020 18:46:06 GMT</pubDate>
      <guid>https://community.esri.com/t5/web-appbuilder-custom-widgets-questions/in-creating-screenshot-custom-widget-how-to-insert/m-p/876898#M13646</guid>
      <dc:creator>AdamGebhart</dc:creator>
      <dc:date>2020-07-28T18:46:06Z</dc:date>
    </item>
    <item>
      <title>Re: in creating screenshot custom widget - how to insert the html?</title>
      <link>https://community.esri.com/t5/web-appbuilder-custom-widgets-questions/in-creating-screenshot-custom-widget-how-to-insert/m-p/876899#M13647</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Adam,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp;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?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 28 Jul 2020 19:50:16 GMT</pubDate>
      <guid>https://community.esri.com/t5/web-appbuilder-custom-widgets-questions/in-creating-screenshot-custom-widget-how-to-insert/m-p/876899#M13647</guid>
      <dc:creator>RobertScheitlin__GISP</dc:creator>
      <dc:date>2020-07-28T19:50:16Z</dc:date>
    </item>
    <item>
      <title>Re: in creating screenshot custom widget - how to insert the html?</title>
      <link>https://community.esri.com/t5/web-appbuilder-custom-widgets-questions/in-creating-screenshot-custom-widget-how-to-insert/m-p/876900#M13648</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Sorry, I didn't realize it was a 3D widget.&amp;nbsp; I've been trying in a 2D app.&amp;nbsp; Thanks for answering.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 28 Jul 2020 19:55:02 GMT</pubDate>
      <guid>https://community.esri.com/t5/web-appbuilder-custom-widgets-questions/in-creating-screenshot-custom-widget-how-to-insert/m-p/876900#M13648</guid>
      <dc:creator>AdamGebhart</dc:creator>
      <dc:date>2020-07-28T19:55:02Z</dc:date>
    </item>
  </channel>
</rss>

