<?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 Customizing the Draw widget in ArcGIS Web AppBuilder Questions</title>
    <link>https://community.esri.com/t5/arcgis-web-appbuilder-questions/customizing-the-draw-widget/m-p/81660#M2300</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I plan to customize the Draw widget that default from web AppBuilder, I plan to do is copy code from &lt;A href="https://developers.arcgis.com/javascript/jssamples/gp_clipasync.html" title="https://developers.arcgis.com/javascript/jssamples/gp_clipasync.html"&gt;Clip and ship | ArcGIS API for JavaScript&lt;/A&gt; to the existing Draw widget, however, I didn't make it working.&lt;/P&gt;&lt;P&gt;How can I add the function in the "require" (from the HTML) into the "function" (stemapp\widgets\Draw\Widget.html), I tried to add them in the front, however, I kept getting the message "can not create widget" when re-starting the app. Has anyone have experiences?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I looked at the page from the tutorial: &lt;A href="https://developers.arcgis.com/web-appbuilder/sample-code/create-custom-in-panel-widget.htm" title="https://developers.arcgis.com/web-appbuilder/sample-code/create-custom-in-panel-widget.htm"&gt;Create a custom in-panel widget—Web AppBuilder for ArcGIS (Developer Edition) | ArcGIS for Developers&lt;/A&gt; ,&lt;/P&gt;&lt;P&gt;Is there a better way to show my change for the application? currently I am doing is first remove the draw widget from the edit and then add a new one, however, it is kind of slow.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Look forward to hearing from you.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Peter&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 19 May 2015 21:53:52 GMT</pubDate>
    <dc:creator>PingYang</dc:creator>
    <dc:date>2015-05-19T21:53:52Z</dc:date>
    <item>
      <title>Customizing the Draw widget</title>
      <link>https://community.esri.com/t5/arcgis-web-appbuilder-questions/customizing-the-draw-widget/m-p/81660#M2300</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I plan to customize the Draw widget that default from web AppBuilder, I plan to do is copy code from &lt;A href="https://developers.arcgis.com/javascript/jssamples/gp_clipasync.html" title="https://developers.arcgis.com/javascript/jssamples/gp_clipasync.html"&gt;Clip and ship | ArcGIS API for JavaScript&lt;/A&gt; to the existing Draw widget, however, I didn't make it working.&lt;/P&gt;&lt;P&gt;How can I add the function in the "require" (from the HTML) into the "function" (stemapp\widgets\Draw\Widget.html), I tried to add them in the front, however, I kept getting the message "can not create widget" when re-starting the app. Has anyone have experiences?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I looked at the page from the tutorial: &lt;A href="https://developers.arcgis.com/web-appbuilder/sample-code/create-custom-in-panel-widget.htm" title="https://developers.arcgis.com/web-appbuilder/sample-code/create-custom-in-panel-widget.htm"&gt;Create a custom in-panel widget—Web AppBuilder for ArcGIS (Developer Edition) | ArcGIS for Developers&lt;/A&gt; ,&lt;/P&gt;&lt;P&gt;Is there a better way to show my change for the application? currently I am doing is first remove the draw widget from the edit and then add a new one, however, it is kind of slow.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Look forward to hearing from you.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Peter&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 19 May 2015 21:53:52 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-web-appbuilder-questions/customizing-the-draw-widget/m-p/81660#M2300</guid>
      <dc:creator>PingYang</dc:creator>
      <dc:date>2015-05-19T21:53:52Z</dc:date>
    </item>
    <item>
      <title>Re: Customizing the Draw widget</title>
      <link>https://community.esri.com/t5/arcgis-web-appbuilder-questions/customizing-the-draw-widget/m-p/81661#M2301</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Before you start creating a custom draw widget, have you looked to see what is already out there?&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.esri.com/docs/DOC-3256"&gt;Enhanced Draw Widget&lt;/A&gt; &lt;/P&gt;&lt;P&gt;&lt;A href="https://community.esri.com/thread/122331"&gt;eDraw widget&lt;/A&gt; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Also, check out &lt;A href="https://community.esri.com/migration-blogpost/2580"&gt;Web AppBuilder Developer Edition – Customization Resource List&lt;/A&gt;​ for a list of other custom widgets and links to help docs for creating your own custom widgets.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 19 May 2015 22:05:01 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-web-appbuilder-questions/customizing-the-draw-widget/m-p/81661#M2301</guid>
      <dc:creator>RebeccaStrauch__GISP</dc:creator>
      <dc:date>2015-05-19T22:05:01Z</dc:date>
    </item>
    <item>
      <title>Re: Customizing the Draw widget</title>
      <link>https://community.esri.com/t5/arcgis-web-appbuilder-questions/customizing-the-draw-widget/m-p/81662#M2302</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Ping, I download your Widget.html.zip file.&lt;/P&gt;&lt;P&gt;&lt;IMG alt="QQ截图20150520140634.png" class="image-1 jive-image" src="https://community.esri.com/legacyfs/online/101508_QQ截图20150520140634.png" style="width: 620px; height: 202px;" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Widget.html is the template file of Widget. You should follow the&amp;nbsp; spec about how to develop template-based dijit.&lt;/P&gt;&lt;P&gt;1. You edit Widget.html, but it is not intact. The whole Widget.html should in only one root element, such as &amp;lt;div&amp;gt; tag. In your Widget.html, it begins with &amp;lt;div&amp;gt; tag, but it doesn't end with &amp;lt;/div&amp;gt;. So It is an invalid Widget.html and dojo can't parse it.&lt;/P&gt;&lt;P&gt;2. You should not write any JavaScript in Widget.html. So &amp;lt;script&amp;gt; tag is forbidden in Widget.html. You should migrate the JavaScript into Widget.js.&lt;/P&gt;&lt;P&gt;3. &amp;lt;button id="extract" data-dojo-type="dijit/form/Button" onclick="extractData()"&amp;gt;Extract Data&amp;lt;/button&amp;gt;&lt;/P&gt;&lt;P&gt;This code also has some issues. You should uses data-dojo-attach-point instead of id in Widget.html. You should uses data-dojo-attach-point="click:extractData" instead of onclick="extractData()" and add a new method 'extractData' in Widget.js. At last, make sure you requre 'dijit/form/Button' in your Widget.js.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 20 May 2015 06:23:21 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-web-appbuilder-questions/customizing-the-draw-widget/m-p/81662#M2302</guid>
      <dc:creator>QunSun</dc:creator>
      <dc:date>2015-05-20T06:23:21Z</dc:date>
    </item>
    <item>
      <title>Re: Customizing the Draw widget</title>
      <link>https://community.esri.com/t5/arcgis-web-appbuilder-questions/customizing-the-draw-widget/m-p/81663#M2303</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;A href="https://community.esri.com/migrated-users/103493"&gt;Qun Sun&lt;/A&gt;​&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I checked the resources that from the &lt;A _jive_internal="true" data-containerid="1294" data-containertype="700" data-objectid="122331" data-objecttype="1" href="https://community.esri.com/thread/122331"&gt;eDraw widget&lt;/A&gt;&lt;/P&gt;&lt;P&gt;and follow your suggestions, however, I still have the problem.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;How can I the follow the spec that you mentioned(where can I find them, for e.g., if I want to add a button to the widget, how many step I should go through)?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 21 May 2015 17:08:42 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-web-appbuilder-questions/customizing-the-draw-widget/m-p/81663#M2303</guid>
      <dc:creator>PingYang</dc:creator>
      <dc:date>2015-05-21T17:08:42Z</dc:date>
    </item>
    <item>
      <title>Re: Customizing the Draw widget</title>
      <link>https://community.esri.com/t5/arcgis-web-appbuilder-questions/customizing-the-draw-widget/m-p/81664#M2304</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Never mind, &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I think now it is working, instead use button, I copied from the eDraw example&lt;/P&gt;&lt;P&gt;&amp;lt;input type="button" class="jimu-input blue-button" value="${nls.extract}" data-dojo-attach-event="ondijitclick:extractData"/&amp;gt;&lt;/P&gt;&lt;P&gt;and add the extratData function in the Widget.js but I didn't included &lt;SPAN style="font-size: 10.5pt; font-family: 'Helvetica',sans-serif; color: #666666;"&gt;'dijit/form/Button' because there is no require keywork anymore.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10.5pt; font-family: 'Helvetica',sans-serif; color: #666666;"&gt;I am kind of still struggling in simplifying the eDraw example widget this time. What I plan to do is not that complex but:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10.5pt; font-family: 'Helvetica',sans-serif; color: #666666;"&gt;1) Draw polygon on the map&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10.5pt; font-family: 'Helvetica',sans-serif; color: #666666;"&gt;2)Turn the draw result (graphics) into feature set(I have seen some code like this:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10.5pt; font-family: 'Helvetica',sans-serif; color: #666666;"&gt;&lt;SPAN class="kwd"&gt;var&lt;/SPAN&gt;&lt;SPAN class="pln"&gt; featureSet &lt;/SPAN&gt;&lt;SPAN class="pun"&gt;=&lt;/SPAN&gt;&lt;SPAN class="pln"&gt; &lt;/SPAN&gt;&lt;SPAN class="kwd"&gt;new&lt;/SPAN&gt;&lt;SPAN class="pln"&gt; &lt;/SPAN&gt;&lt;SPAN class="typ"&gt;FeatureSet&lt;/SPAN&gt;&lt;SPAN class="pun"&gt;();&lt;/SPAN&gt;&lt;SPAN class="pln"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN class="kwd"&gt;var&lt;/SPAN&gt;&lt;SPAN class="pln"&gt; features &lt;/SPAN&gt;&lt;SPAN class="pun"&gt;=&lt;/SPAN&gt;&lt;SPAN class="pln"&gt; &lt;/SPAN&gt;&lt;SPAN class="pun"&gt;[];&lt;/SPAN&gt;&lt;SPAN class="pln"&gt;&lt;BR /&gt;features&lt;/SPAN&gt;&lt;SPAN class="pun"&gt;.&lt;/SPAN&gt;&lt;SPAN class="pln"&gt;push&lt;/SPAN&gt;&lt;SPAN class="pun"&gt;(&lt;/SPAN&gt;&lt;SPAN class="pln"&gt;map&lt;/SPAN&gt;&lt;SPAN class="pun"&gt;.&lt;/SPAN&gt;&lt;SPAN class="pln"&gt;graphics&lt;/SPAN&gt;&lt;SPAN class="pun"&gt;.&lt;/SPAN&gt;&lt;SPAN class="pln"&gt;graphics&lt;/SPAN&gt;&lt;SPAN class="pun"&gt;[&lt;/SPAN&gt;&lt;SPAN class="lit"&gt;0&lt;/SPAN&gt;&lt;SPAN class="pun"&gt;]);&lt;/SPAN&gt;&lt;SPAN class="pln"&gt;&lt;BR /&gt;featureSet&lt;/SPAN&gt;&lt;SPAN class="pun"&gt;.&lt;/SPAN&gt;&lt;SPAN class="pln"&gt;features &lt;/SPAN&gt;&lt;SPAN class="pun"&gt;=&lt;/SPAN&gt;&lt;SPAN class="pln"&gt; features&lt;/SPAN&gt;&lt;SPAN class="pun"&gt;;&lt;/SPAN&gt;&lt;SPAN class="pln"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10.5pt; font-family: 'Helvetica',sans-serif; color: #666666;"&gt;&lt;SPAN class="pun"&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10.5pt; font-family: 'Helvetica',sans-serif; color: #666666;"&gt;&lt;SPAN class="pun"&gt;However I couldn't figure out how can I accommodate this code into the existing example.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10.5pt; font-family: 'Helvetica',sans-serif; color: #666666;"&gt;&lt;SPAN class="pun"&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10.5pt; font-family: 'Helvetica',sans-serif; color: #666666;"&gt;&lt;SPAN class="pun"&gt;Has anyone done this before?&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10.5pt; font-family: 'Helvetica',sans-serif; color: #666666;"&gt;&lt;SPAN class="pun"&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10.5pt; font-family: 'Helvetica',sans-serif; color: #666666;"&gt;&lt;SPAN class="pun"&gt;Thank you all for so many help.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 22 May 2015 16:17:36 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-web-appbuilder-questions/customizing-the-draw-widget/m-p/81664#M2304</guid>
      <dc:creator>PingYang</dc:creator>
      <dc:date>2015-05-22T16:17:36Z</dc:date>
    </item>
  </channel>
</rss>

