# \[IGN-6743\] system.perspective.alterDock can only resize one dock at a time?

**URL:** <https://forum.inductiveautomation.com/t/ign-6743-system-perspective-alterdock-can-only-resize-one-dock-at-a-time/65306>\
**Category:** Ignition\
**Tags:** perspective, scripting, ignition81\
**Created:** [October 17, 2022, 7:26pm UTC](https://forum.inductiveautomation.com/t/ign-6743-system-perspective-alterdock-can-only-resize-one-dock-at-a-time/65306 "2022-10-17T19:26:14Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![John\_Lauritzen](https://avatars.discourse-cdn.com/v4/letter/j/ed655f/32.png) [@John\_Lauritzen](https://forum.inductiveautomation.com/u/John_Lauritzen)\
**Post date:** [October 17, 2022, 7:26pm UTC](https://forum.inductiveautomation.com/t/ign-6743-system-perspective-alterdock-can-only-resize-one-dock-at-a-time/65306/1 "2022-10-17T19:26:14Z")

</div>

I recently started doing some testing to resize docks using the new system.perspective.alterDock function, and it seems that it can only be applied to one dock at a time when I tested it on 8.1.21. Is this expected behavior, or is there some way to get the size change to stick?

The environment I'm testing in has left, top, and right docks, and I'd like to be able to specify sizes for all 3 at the same time depending on the situation.

---

<div class="post-metadata">

**Author:** ![code\_skin](https://avatars.discourse-cdn.com/v4/letter/c/43a26b/32.png) [@code\_skin](https://forum.inductiveautomation.com/u/code_skin)\
**Post date:** [October 17, 2022, 7:57pm UTC](https://forum.inductiveautomation.com/t/ign-6743-system-perspective-alterdock-can-only-resize-one-dock-at-a-time/65306/2 "2022-10-17T19:57:13Z")

</div>

alterDock takes a dockID as a required parameter. Are your docks the same ID and only 1 is being affected? If this is your case, I would create 3 unique dockIDs and call the function 3 times.

ex.

```auto
dockConfig = {}
system.perspective.alterDock(leftDock, dockConfig)
system.perspective.alterDock(rightDock, dockConfig)
system.perspective.alterDock(topDock, dockConfig)

```

---

<div class="post-metadata">

**Author:** ![John\_Lauritzen](https://avatars.discourse-cdn.com/v4/letter/j/ed655f/32.png) [@John\_Lauritzen](https://forum.inductiveautomation.com/u/John_Lauritzen)\
**Post date:** [October 17, 2022, 8:01pm UTC](https://forum.inductiveautomation.com/t/ign-6743-system-perspective-alterdock-can-only-resize-one-dock-at-a-time/65306/3 "2022-10-17T20:01:49Z")

</div>

Each dock has it's own unique ID. Here's an example of the script I'm trying to run:

```auto
def runAction(self, event):
	system.perspective.alterDock('topMenu', {'size':100})
	system.perspective.alterDock('leftMenu', {'size':640})
	system.perspective.alterDock('settings', {'size':500})

```

When the button with this script assigned is pressed you can barely catch a glimpse of the first two docks resizing before returning to their original size and only the last dock called retains the change.

---

<div class="post-metadata">

**Author:** ![code\_skin](https://avatars.discourse-cdn.com/v4/letter/c/43a26b/32.png) [@code\_skin](https://forum.inductiveautomation.com/u/code_skin)\
**Post date:** [October 17, 2022, 8:32pm UTC](https://forum.inductiveautomation.com/t/ign-6743-system-perspective-alterdock-can-only-resize-one-dock-at-a-time/65306/4 "2022-10-17T20:32:53Z")

</div>

This is also happening in 8.1.20. Only 1 dock changes. ( the last alterDock line is the one that works as expected)

---

<div class="post-metadata">

**Author:** ![cmallonee](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/cmallonee/32/6416_2.png) [@cmallonee](https://forum.inductiveautomation.com/u/cmallonee)\
**Post date:** [October 17, 2022, 8:40pm UTC](https://forum.inductiveautomation.com/t/ign-6743-system-perspective-alterdock-can-only-resize-one-dock-at-a-time/65306/5 "2022-10-17T20:40:38Z")

</div>

Before I even begin trying to replicate this, I need more information about the layout within the session.

Are all of these docks on the same side? Two on the left and one on the top? Is any dock open/expanded when this is invoked? Which dock is expanded? What are the dimensions of the docks _before_ you attempt to modify them? All of these docks are all attached to the current page, correct? Did you leave the page and then navigate back to it?

---

<div class="post-metadata">

**Author:** ![John\_Lauritzen](https://avatars.discourse-cdn.com/v4/letter/j/ed655f/32.png) [@John\_Lauritzen](https://forum.inductiveautomation.com/u/John_Lauritzen)\
**Post date:** [October 17, 2022, 8:58pm UTC](https://forum.inductiveautomation.com/t/ign-6743-system-perspective-alterdock-can-only-resize-one-dock-at-a-time/65306/6 "2022-10-17T20:58:11Z")

</div>

The docks are on different sides, each dock is configured on Shared settings so they are attached to all pages, and leaving the page causes the one dock that had the size increased return to its previous size. Here are the original specifics of each dock:

Dock ID: leftMenu  
Dock Location: left side  
Display: auto  
Resizable?: false  
Content: push  
Size: 320  
Auto Breakpoint 1,600  
Handle: hide

Dock ID: topMenu  
Dock Location: top side  
Display: visible  
Resizable?: false  
Content: push  
Size: 50  
Handle: hide

Dock ID: settings  
Dock Location: right side  
Display: onDemand  
Resizable?: false  
Modal?: false  
Content: cover  
Size: 250  
Handle: hide

---

<div class="post-metadata">

**Author:** ![cmallonee](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/cmallonee/32/6416_2.png) [@cmallonee](https://forum.inductiveautomation.com/u/cmallonee)\
**Post date:** [October 17, 2022, 9:40pm UTC](https://forum.inductiveautomation.com/t/ign-6743-system-perspective-alterdock-can-only-resize-one-dock-at-a-time/65306/7 "2022-10-17T21:40:07Z")

</div>

I've opened a ticket to get this resolved.

---

<div class="post-metadata">

**Author:** ![mazeyrat](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/mazeyrat/32/10955_2.png) [@mazeyrat](https://forum.inductiveautomation.com/u/mazeyrat)\
**Post date:** [October 19, 2022, 3:14pm UTC](https://forum.inductiveautomation.com/t/ign-6743-system-perspective-alterdock-can-only-resize-one-dock-at-a-time/65306/8 "2022-10-19T15:14:37Z")

</div>

**Ignition 8.1.21**  
I have the same issue with alter dock when I try to alter **viewParams** of multiple docks

---

<div class="post-metadata">

**Author:** ![mazeyrat](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/mazeyrat/32/10955_2.png) [@mazeyrat](https://forum.inductiveautomation.com/u/mazeyrat)\
**Post date:** [March 24, 2023, 7:43am UTC](https://forum.inductiveautomation.com/t/ign-6743-system-perspective-alterdock-can-only-resize-one-dock-at-a-time/65306/9 "2023-03-24T07:43:48Z")

</div>

Is there any progress on this ticket ?

---

<div class="post-metadata">

**Author:** ![cmallonee](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/cmallonee/32/6416_2.png) [@cmallonee](https://forum.inductiveautomation.com/u/cmallonee)\
**Post date:** [March 24, 2023, 2:38pm UTC](https://forum.inductiveautomation.com/t/ign-6743-system-perspective-alterdock-can-only-resize-one-dock-at-a-time/65306/10 "2023-03-24T14:38:12Z")

</div>

No, not at this time.

---

<div class="post-metadata">

**Author:** ![mazeyrat](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/mazeyrat/32/10955_2.png) [@mazeyrat](https://forum.inductiveautomation.com/u/mazeyrat)\
**Post date:** [June 9, 2023, 8:49pm UTC](https://forum.inductiveautomation.com/t/ign-6743-system-perspective-alterdock-can-only-resize-one-dock-at-a-time/65306/11 "2023-06-09T20:49:03Z")

</div>

I Hope this could be fixed soon. Most of our application need to alter multiple docks.  
As a workaround we have to copy some dock settings for lots of view, but it's not very smart, readable and simple to maintain.

---

<div class="post-metadata">

**Author:** ![mazeyrat](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/mazeyrat/32/10955_2.png) [@mazeyrat](https://forum.inductiveautomation.com/u/mazeyrat)\
**Post date:** [January 31, 2024, 8:04pm UTC](https://forum.inductiveautomation.com/t/ign-6743-system-perspective-alterdock-can-only-resize-one-dock-at-a-time/65306/12 "2024-01-31T20:04:57Z")

</div>

Any move forward for this ticket. Any chance it will be in 8.1 version ?

---

<div class="post-metadata">

**Author:** ![cmallonee](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/cmallonee/32/6416_2.png) [@cmallonee](https://forum.inductiveautomation.com/u/cmallonee)\
**Post date:** [February 1, 2024, 2:29am UTC](https://forum.inductiveautomation.com/t/ign-6743-system-perspective-alterdock-can-only-resize-one-dock-at-a-time/65306/13 "2024-02-01T02:29:09Z")

</div>

No movement and no target version.

---

<div class="post-metadata">

**Author:** ![tupanaster](https://avatars.discourse-cdn.com/v4/letter/t/5daacb/32.png) [@tupanaster](https://forum.inductiveautomation.com/u/tupanaster)\
**Post date:** [April 8, 2024, 12:11pm UTC](https://forum.inductiveautomation.com/t/ign-6743-system-perspective-alterdock-can-only-resize-one-dock-at-a-time/65306/14 "2024-04-08T12:11:26Z")

</div>

Hi @cmallonee,

Since alterDock can only target one side of the page, what was the original intention of having this function? Was it to alter everything? Just one dock/side?

During my tests today, in version 8.1.33, it is possible to change all docks from one side of the page. If I change two sides, left and right in my case, only the last one remains.

---

<div class="post-metadata">

**Author:** ![cmallonee](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/cmallonee/32/6416_2.png) [@cmallonee](https://forum.inductiveautomation.com/u/cmallonee)\
**Post date:** [April 8, 2024, 3:13pm UTC](https://forum.inductiveautomation.com/t/ign-6743-system-perspective-alterdock-can-only-resize-one-dock-at-a-time/65306/15 "2024-04-08T15:13:30Z")

</div>

> [@tupanaster](#):
>
> Was it to alter everything?

Of course the goal is to alter any docked View, for any side of the page. The referenced bug was opened due to exactly the behavior you're seeing: any Docked View can be altered, but once you alter a second Docked View the changes to the first are reverted.

---

<div class="post-metadata">

**Author:** ![tupanaster](https://avatars.discourse-cdn.com/v4/letter/t/5daacb/32.png) [@tupanaster](https://forum.inductiveautomation.com/u/tupanaster)\
**Post date:** [April 8, 2024, 3:28pm UTC](https://forum.inductiveautomation.com/t/ign-6743-system-perspective-alterdock-can-only-resize-one-dock-at-a-time/65306/16 "2024-04-08T15:28:39Z")

</div>

When using mobile versions docked views are in the way. If one holde the phone vertically, those docked views take up space. Sometimes there is only one dock but in some pages there are many. If any of docked views are opened then it will cover the entire screen.  
Is there a way to solve that?

---

<div class="post-metadata">

**Author:** ![cmallonee](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/cmallonee/32/6416_2.png) [@cmallonee](https://forum.inductiveautomation.com/u/cmallonee)\
**Post date:** [April 8, 2024, 3:48pm UTC](https://forum.inductiveautomation.com/t/ign-6743-system-perspective-alterdock-can-only-resize-one-dock-at-a-time/65306/17 "2024-04-08T15:48:07Z")

</div>

We have a separate, unrelated ticket to allow for better configuration of Docked View breakpoints. In early Perspective development, the decision was made that the breakpoint property of Docked Views should mean "if the viewport is wider than X, display this Docked View". But that logic severely restricts how Docked Views can be used. The logged feature would allow for

1. Specifying a breakpoint value.
2. Specifying whether that value should be used as a lesser-than or greater-than value.
3. Specifying whether the Docked View should expand or collapse based on your condition.

The implementation of such a feature has not been fully described, so these settings may just get wrapped into an expression field in the end.

All of that to say: sorry, but there's no good solution to "altering" Docked Views on mobile. The "best" solution is to use a change script on the relevant page props and just close all Docked Views for mobile users in certain scenarios.

---

<div class="post-metadata">

**Author:** ![tupanaster](https://avatars.discourse-cdn.com/v4/letter/t/5daacb/32.png) [@tupanaster](https://forum.inductiveautomation.com/u/tupanaster)\
**Post date:** [April 9, 2024, 1:54pm UTC](https://forum.inductiveautomation.com/t/ign-6743-system-perspective-alterdock-can-only-resize-one-dock-at-a-time/65306/18 "2024-04-09T13:54:03Z")

</div>

Is this a ticket that should be in canny?

---

<div class="post-metadata">

**Author:** ![cmallonee](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/cmallonee/32/6416_2.png) [@cmallonee](https://forum.inductiveautomation.com/u/cmallonee)\
**Post date:** [April 9, 2024, 2:25pm UTC](https://forum.inductiveautomation.com/t/ign-6743-system-perspective-alterdock-can-only-resize-one-dock-at-a-time/65306/19 "2024-04-09T14:25:46Z")

</div>

I don't think it will hurt, as there's no way to track customer interest aside from the forums and the Ideas portal.

---

<div class="post-metadata">

**Author:** ![tupanaster](https://avatars.discourse-cdn.com/v4/letter/t/5daacb/32.png) [@tupanaster](https://forum.inductiveautomation.com/u/tupanaster)\
**Post date:** [April 15, 2024, 8:29pm UTC](https://forum.inductiveautomation.com/t/ign-6743-system-perspective-alterdock-can-only-resize-one-dock-at-a-time/65306/20 "2024-04-15T20:29:16Z")

</div>

Link to canny:

[https://inductiveautomation.canny.io/ignition-features-and-ideas/p/ign-6743-systemperspectivealterdock](https://inductiveautomation.canny.io/ignition-features-and-ideas/p/ign-6743-systemperspectivealterdock)

[Next page](https://forum.inductiveautomation.com/t/ign-6743-system-perspective-alterdock-can-only-resize-one-dock-at-a-time/65306.md?page=2)
