Select to view content in your preferred language

Change widget direction (horizontal/vertical) within regions

2513
2
08-02-2019 12:25 PM
DavidSchontzler
Occasional Contributor

I am adding widgets to my view like so:

view.add(widget1, "top-left");
view.add(widget2, "bottom-right");‍‍

I noticed that the widgets on the top regions are stacked vertically and the widgets in the bottom regions are laid out horizontally. You can see a sample here: https://codepen.io/dschontz/pen/zgErxO

Questions:

  1. Can you set the flow of widgets on a per-region basis? For example, can I have the bottom-right region stack widgets vertically?
  2. Can I have a region flow in both directions? For example, a couple widgets horizontally placed in the bottom-right corner, and another 2 widgets placed vertically above them so that they form a kind of "corner" on the map _|.
Tags (1)
0 Kudos
2 Replies
Noah-Sager
Esri Regular Contributor

Hi David, great questions. The current behavior you are experiencing is the default behavior, and is by design. We are considering making this a configurable property at a later release.

For now, you can place additional widgets manually using css.

doc

https://developers.arcgis.com/javascript/latest/api-reference/esri-views-ui-UI.html#add

sample in action (using the "manual" position)

https://developers.arcgis.com/javascript/latest/sample-code/timeslider-filter/index.html

YirenWangDesigner
New Contributor

Hi Noah or whom that may concern - 


I have a similar need and wonder if there's an update about this configuration after 4 years? That users can stack widgets added vertically at bottom-right; OR similarly, widgets at top-left with a horizontal layout. 

Thanks in advance.