Change perspective popup size after it is opened

Hi,
Like vision I’d like to reside popup from popup itself.

I want to put a button in my popup and when user click it it extend the width of the popup to show some detail info.

Thanks for any help or idea.

There’s no way to directly resize an existing Popup short of manually resizing it. With some fancy logic, you could sort of mimic the concept.

There are several considerations to account for:

  1. overflow of Popup View. If “hidden” then the Popup size could allow for what you want; if any other setting you’re going to have scrollbars present if the Popup’s size is anything other than the default View dimensions, so I’ll assume you are using “hidden” for overflow.
  2. The View used in the Popup will need to account for its own state (opened/closed) via a passed id param. Due to this, the View used in the Popup will need to contain the resize button.
  3. This process is going to open a NEW Popup and close the old Popup, so any state of fields or user-modified info should be stored in session properties.

Steps:
A. Open your small Popup with whatever dimensions you desire (we’ll say 300x300 for this example). Since the View’s overflow is “hidden”, any content outside of the 300x300 square will not be visible or interactive (so make sure the “Expand” button is completely within the visible dimensions). Make sure you supply this Popup an id as part of the Popup Action or Script Action, and make sure that same value is passed as a param to the View being used in the Popup.
B. The “Expand” button should invoke a NEW Popup Action or Script Action which first OPENS a Popup with a MODIFIED id based on the passed id param, and the button should then CLOSE the Popup with the original id value.

You could use the same logic to “collapse” the Popup to its smaller appearance.

2 Likes

Hi @cmallonee
The only problem is remain how I can open my popup in the last exactly position again?
I use to open my popup in the xy related to user mouse click and user may move popup, so when I close and reopen it I need to open it at last top left coordinate again.

1 Like

If you’re using the “relative” positioning options as part of the Popup Action instead of the Script Action you should be able to do this. You would just need two Popup Actions - one to open the new Popup, and one to close the “old” Popup.

So if I open my popup related to mouse position it is not possible at all. :pensive:

Can you just store the coords in a session param before closing and reopening it? . You should only need one set of x/y params for all popups to use (you won’t be expanding/contracting more than one popup at a time)

I have several open popup at the same time.
I mange to pass x and y coordinate as param on each time I open it.
Now I face new problem to solve. If user try to move popup the position change again and I don’t have any idea of new position. So reopening popup doesn’t open at new user position.

My final result. Still having some glitches no match with Vision module but better than nothing.

6 Likes

Unrelated question, but how have you done your pipes? In particular the rounded corners?
(Your work always inspires me)

1 Like

Label with border and border radius. :wink:

2 Likes

Haha not what I was expecting but it works. Thanks.
Hopefully 8.1’s new piping component will offer rounded corners (and I hope the pipe pathing works as expected and is customisable)

Sounds to me like a coordinate container will finally have a great use! Lol

You don’t believe it but I can recreate every response behavior with coordinator container like people use to web development in old days.

So do you use more coordinate or flex containers? I feel like I probably use the following breakdown:

  1. Flex - 80%
  2. Breakpoint - 10%
  3. Column - 5%
  4. Tab - 3%
  5. Coordinate 2%
1 Like
  1. Coordinate - 60%
  2. Flex - 35%
  3. Column - 1%
  4. Tab - 3%
  5. Breakpoint 2%

The tab is not actually a container and you can recreate it by simply using embeded view and horizontal menu.

I guess my question is, why would you do that? For a more customized look and feel?

A common use case for it on my end is to have a tab container embedded on a settings page, so I select a machine on the left hand side, and have multiple tabs worth of settings on the right side of the screen.

I have never used a tab container for an entire view though, only inside of other views

Yes for better look and feel and also increase performance.
Also you are right for common use case.
I also use it for navigation on P&ID of the process.
The rule of thumb, when ever you have overlapping object use coordinate container (any schematic of plant) and for user entry form type view use flex.

1 Like