# Dynamically change docked view from push to cover?

**URL:** <https://forum.inductiveautomation.com/t/dynamically-change-docked-view-from-push-to-cover/73206>\
**Category:** Ignition\
**Tags:** perspective\
**Created:** [May 3, 2023, 2:15pm UTC](https://forum.inductiveautomation.com/t/dynamically-change-docked-view-from-push-to-cover/73206 "2023-05-03T14:15:30Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Ryan\_Allen](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/ryan_allen/32/47013_2.png) [@Ryan\_Allen](https://forum.inductiveautomation.com/u/Ryan_Allen)\
**Post date:** [May 3, 2023, 2:15pm UTC](https://forum.inductiveautomation.com/t/dynamically-change-docked-view-from-push-to-cover/73206/1 "2023-05-03T14:15:30Z")

</div>

Is it possible to use a binding or a script to change a docked view from push to cover based on something like the viewport width?

---

<div class="post-metadata">

**Author:** ![YF129701](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/yf129701/32/60498_2.png) [@YF129701](https://forum.inductiveautomation.com/u/YF129701)\
**Post date:** [May 3, 2023, 2:30pm UTC](https://forum.inductiveautomation.com/t/dynamically-change-docked-view-from-push-to-cover/73206/2 "2023-05-03T14:30:39Z")

</div>

I believe if you're on v8.1.19+, you can use the `system.perspective.alterDock` function and pass in a `content` property (`push`, `cover` or `auto`).

How you would determine the viewport width, I'm not sure of that... I could have sworn there was an update that included a viewport width property, but I couldn't find it in the designer or in the Ignition release notes. Maybe @victordcq can help us...

---

<div class="post-metadata">

**Author:** ![Ryan\_Allen](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/ryan_allen/32/47013_2.png) [@Ryan\_Allen](https://forum.inductiveautomation.com/u/Ryan_Allen)\
**Post date:** [May 3, 2023, 2:43pm UTC](https://forum.inductiveautomation.com/t/dynamically-change-docked-view-from-push-to-cover/73206/3 "2023-05-03T14:43:49Z")

</div>

The viewport width can be found from here: self.page.props.dimensions.viewport.width. I'll try the alter dock function, thanks!

---

<div class="post-metadata">

**Author:** ![YF129701](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/yf129701/32/60498_2.png) [@YF129701](https://forum.inductiveautomation.com/u/YF129701)\
**Post date:** [May 3, 2023, 2:49pm UTC](https://forum.inductiveautomation.com/t/dynamically-change-docked-view-from-push-to-cover/73206/4 "2023-05-03T14:49:04Z")

</div>

I knew it was somewhere! Thank you for giving me that information.
