I have to make this widget to switch the opacity between layers:
but this widget has data-dojo-type tags, and the WAB shows me an error.
I was reading about _WidgetTemplateMixin, but I do not handle well the documentation yet.
So, how can I make the widget with that appearance, instead this?:
thanks a lot
Solved! Go to Solution.
Rolando,
You create a widget with the manifest.json inPanel set to false.
In-panel and off-panel widgets—Web AppBuilder for ArcGIS (Developer Edition) | ArcGIS for Developers
You can use the ScaleBar widget as an example or the Coordinate widget.
Rolando,
You create a widget with the manifest.json inPanel set to false.
In-panel and off-panel widgets—Web AppBuilder for ArcGIS (Developer Edition) | ArcGIS for Developers
You can use the ScaleBar widget as an example or the Coordinate widget.
Hi Robert,
Where is the closeable property?
Where Can I find it?
Rolando,
That is a property that you add to the manifest.json
Robert, that's it.
But now, I Have a problem.. I've been testing with the Scalebar widget, and it appear when I click the widget, but, when I change the Scalebar to the HorizontalSlider, It doesnt appear.
I'm trying of this way:
Widget.html
<div id="sliderNode"></div>
Widget.js
this.horizontalSlider = new HorizontalSlider({labels: ["1","5","10"]},"sliderNode"); this.horizontalSlider.showButtons = true; domStyle.set("sliderNode",style);
Like I said, when I click in the widget, shows me nothing, only the console print "onOpen", "onClose".
thanks a lot
Rolando,
If you look at all other widget you will notice that the html portions don't use id="sliderNode" they all use data-dojo-attach-point="sliderNode" and then in your Widget.js you use:
this.horizontalSlider = new HorizontalSlider({labels: ["1","5","10"]},this.sliderNode);
Robert, now, I'm trying this:
this.horizontalSlider = new HorizontalSlider({labels: ["1","5","10"]},this.sliderNode); this.horizontalSlider.showButtons = true; domStyle.set(this.sliderNode,style);
<div dojo-attach-point="sliderNode"></div>
but nothing happen ( I'm using
return declare([BaseWidget,_WidgetsInTemplateMixin], {
_WidgetsInTemplateMixin in my Widget.js)
Rolando,
Do you have the HorizontalSlider require in your Widget.js?
yeah Robert, look
define(['dojo/_base/declare', 'jimu/BaseWidget','dijit/form/HorizontalSlider', 'dijit/form/HorizontalRuleLabels','dojo/parser','dijit/form/TextBox','dojo/dom', 'dijit/_TemplatedMixin','dijit/_WidgetsInTemplateMixin','dojo/dom-style','dojo/text!./Template.html', 'dijit/form/Button','esri/dijit/HorizontalSlider','esri/dijit/Scalebar'], function(declare, BaseWidget,HorizSlider,HorzRuleLabels,parser,TextBox,dom,_TemplatedMixin,_WidgetsInTemplateMixin,domStyle, template,Button,HorizontalSlider,Scalebar)
I have dijit form, and esri dijit.
I want to show this:
theres a sliderNode node, but I can't see it.
Rolando,
I don't see where you are calling
this.horizontalSlider.startup();