Perspective - Breakpoint - Get view size

I’m on 8.0.16

I search a way to get wich view is displayed in a page.

I have to launch a popup and want to know wich format use small or large

Anyone have a trick for me ?

Could your two views inside the breakpoint container have a slightly different script on a button that calls a different popup? That way you don’t even need to know which view it is, because you’ve handled it already in the design

My button is in a dock view, so I need to know which breakpoint is displayed to launch the right popup.

I tried sending a message with a docked button and having a different message handler in the Small vs. Large breakpoint view but it seems both message handlers are active even though only one is visible.

I had expected this to work but I’m not very familiar with breakpoint containers and how they work.

Good Luck

I spent some time testing this scenario and found some discrepancies in behaviors. I reached out to Dev and got an explanation that I thought I’d share here.

This can be done by using breakpoint containers, but it requires a very specific setup. @john.glynn suggested Message Handlers in the breakpoints, but you MUST use Embedded Views within the breakpoints, and then the Views you select to use for the Embedded View should have the different logic.

From Dev (paraphrased):

Both of a Breakpoint Container’s children are essentially “running” at all times - even if you can’t see them. However, the Views in use by Embedded Views are not “running” until the View is “mounted” (displayed in the browser).

So the Embedded View solution works with this setup:

Breakpoint Container

Then, EmbeddedView.props.path should be something like “SmallBreakpointListenerView”, and EmbeddeView_0.props.path should be something like LargeBreakpointListenerView".

1 Like

Hello folks,

I wonder if the solution provided by @cmallonee works the same with 8.3

I have a header with a breakpoint container containing two flex children: a small one for phone size, a large one for larger devices. How to send a message to a docked footer so that I can show/hide it depending on the header’s size?

I found a useful thread for listening a message on the docked footer, but how to send it?
Any way to toggle visibility of a Shared Docked View?