Change widget direction (horizontal/vertical) within regions

819
1
08-02-2019 12:25 PM
DavidSchontzler
New Contributor III

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
1 Reply
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