Hide some of the drawing options in the Draw Widget

568
2
Jump to solution
07-13-2020 04:35 AM
MattPohl
Occasional Contributor II

I am looking for a way to remove some of the drawing options available when the Draw Widget loads. I saw this: Draw widget - configure available draw modes  as an idea/suggestion, but wondering if there is way to get the job done using some css in the html file as seen here in this post for the Screening Widget: Hide tools in Screening Widget. I am looking to hide most of the drawing options except the Polygon, Freehand Polygon, and text option. I attached a image showing which tools I am looking to hide. Any help is greatly appreciated. 

0 Kudos
1 Solution

Accepted Solutions
RobertScheitlin__GISP
MVP Emeritus

Matt,

   A css rule would be the simplest way:

.jimu-widget-draw .draw-item.point-icon,
.jimu-widget-draw .draw-item.line-icon,
.jimu-widget-draw .draw-item.polyline-icon,
.jimu-widget-draw .draw-item.freehand-polyline-icon,
.jimu-widget-draw .draw-item.arrow-icon,
.jimu-widget-draw .draw-item.triangle-icon,
.jimu-widget-draw .draw-item.extent-icon,
.jimu-widget-draw .draw-item.circle-icon,
.jimu-widget-draw .draw-item.ellipse-icon {
  display: none!important;
}

Add this to the bottom of the widgets style.css 

View solution in original post

2 Replies
RobertScheitlin__GISP
MVP Emeritus

Matt,

   A css rule would be the simplest way:

.jimu-widget-draw .draw-item.point-icon,
.jimu-widget-draw .draw-item.line-icon,
.jimu-widget-draw .draw-item.polyline-icon,
.jimu-widget-draw .draw-item.freehand-polyline-icon,
.jimu-widget-draw .draw-item.arrow-icon,
.jimu-widget-draw .draw-item.triangle-icon,
.jimu-widget-draw .draw-item.extent-icon,
.jimu-widget-draw .draw-item.circle-icon,
.jimu-widget-draw .draw-item.ellipse-icon {
  display: none!important;
}

Add this to the bottom of the widgets style.css 

MattPohl
Occasional Contributor II

That worked perfect. Thanks Robert. As always, much appreciated.

0 Kudos