Ehanced draw widget for WebApp Builder for Arcgis
UPDATE 2018/05/09 (new Release v2.8.1) :
(Direct zip link : https://github.com/magis-nc/esri-webappbuilder-widget-eDraw/releases/download/v2.8.1/eDraw.zip )
Demo : https://apps.magis.nc/demo/eDraw/
Github :
https://github.com/magis-nc/esri-webappbuilder-widget-eDraw
Wigdet's Features (improvments of standard Draw widget) :
This message was updated by Jeremie Cornet (New Release)
Solved! Go to Solution.
Hi Kevin,
I cannot reproduce this.
Tested on Firefox, Chrome and IE.
Could you tell me more about your context ? (browser, WAB version, WAB theme...)
@others Do you have this bug ? In which context ?
Jeremie Cornet I created a blank new app in WAB12 (Default theme all defaults). Added new eDraw 1.3.3 10/22. After adding a Text, the Point doesn't work. Actually clicking it brings up the Draw tab in fact.
So, then I just took an existing demo site (a test site built with WAB 1.2 to show my Query), then I duplicated it and changed the folder name on my server. So, a complete WAB site. Then, I deleted the eDraw widget folder (which was your pre-release eDraw 1.3.3 version you asked us to try earlier in the thread..I'll call it September 1.3.3 eDraw..) I then copied in your new eDraw 1.3.3 10/22. And... it seems to work! Just fine.
I even copied the new config.json from this one that works, to the first one above, and it still didn't fix it.
So... I guess for now, I'll just manually copy in your eDraw to new WAB sites I build, after I download it out of WebApp Builder. It's probably not your code, given all this. Something's probably gotten messed up in my WAB. Anyway, since no one else sees it, and I can fix it with this workaround for now, I will assume it's my WAB or something specific to my settings with eDraw and not worry about it or test it further, unless you would like me to do something specific. Maybe I will build a completely fresh WAB folder, the next time ESRI updates (1.3).
update: Actually this is a problem. The real site I am building is internal. Just copying fresh 1.3.3. eDraw in didn't change anything. I noticed a difference. For the site that eDraw works, it has a eDraw folder in the site "configs" folder. I.e. if the site is named MySite it's MySite/configs/eDraw/config_Draw.json However removing that file breaks the widget it won't initialize. But the weird thing is, the site where eDraw works doesn't have the file or folder in Configs. And yet.. it works just fine. Sorry if this is confusing. I will try to figure it out.
The config file comes from WAB.
When you add a widget in builder, WAB uses the default configuration of the widget (config.json in widget's folder).
But if you edit the widget's configuration in builder, WAB create a config file in /configs/widgetName/
So eDraw doesn't work because it doesn't like your old config file (MySite/configs/eDraw/config_Draw.json).
Could you send me it ? I want the widget to be capable to use "old" config's file.
Hi Jeremie,
This one does not work - http://sagiscloud.thempc.org/eDraw_133_WAB12.zip
this one works - http://sagiscloud.thempc.org/eDrawDemo.zip
Not sure why, what do you think? The problem, is that whatever I do, when I the new eDraw to a third site (an internal one I am building), the Text/Point bug persists. Removing the json config file in Configs folder simply breaks the whole widget. So I guess it has something wrong in it? Note.. I haven't edited it manually or anything, just always configured it normally in side WAB 1.2.
I thought hm maybe it is one of the settings. But no luck, I copied the new 10/22 edraw and the config file the WORKED in the other site into my internal viewer. I changed operationallayer to false from true, geometryservice local and not, etc nothing fixed the bug. Which is weird, it seems like maybe it is something else in the site and not the eDraw widget itself?
I have also experienced the kind of Text-Point errors that Kevin was talking about. Plus I found another bug that prevents from adding a point. When choosing Add symbol -> Point -> Cancel -> Text -> Cancel -> Point -> Add point to map, text will be added to map. Any ideas, what could cause this?
EDIT: And after this, adding points is completely impossible.
exactly. the Text kills the Point's click handler. Even if cancelled. As soon as you get to Text the Point click handler has been killed.
I download a fresh copy of the widget in to a fresh new WAB1.2 site it is ok. But my darn current site, the internal one, I can not get to work. I download the 10/22 and put it in and as above this bug persists. As in my two links above. I could not figure it out.
For me, it's the line in the editorSymbolChooserConfigure function:
//Force editorSymbolChooser _init to walk around jimu.js bug (initTextSection doesn't pass symbol to _initTextSettings) this.editorSymbolChooser._initTextSettings(symbol);
After removing this, things seem to be working fine. Is this really necessary?
Hi Jeremie,
Thanks for the widget, great !!.
Is it possible to change the icon for Point symbol? or Loading my own symbols?
Regards,
Thanks Stan, It is exactly what I was looking for. Excellent
You saved my day