Limiting 6.3 Fullscreen

Hello,

I’m working on an app styled after the web desktop example, and am attempting to use the new fullscreen functionality. However, I don’t want these windows to cover the startmenu toolbar at the bottom of the page, and I can’t figure out how to tune the behavior to accomplish this.

Are there any tricks I can use to make this work, or do I need to work around this somehow?

Thanks

hi @WhyJS

In fact, webix.fullscreen.set creates a window in fullscreen mode with a widget inside, you can get it via $$(widgetId).getTopParentView(), change resize logic and set the position you need.

example: https://snippet.webix.com/wmhyokef

Thanks @Dima_S this has helped point me in the right direction.

I noticed however that you seem to be using internal methods in your solution, which are causing problems for me in other parts of my code. I also tried replacing them with define(“height”) and the like, but haven’t found them to affect it whatsoever.

Is there another way one could do this? Bonus if the fullscreen button also serves as a resize in both directions, since I can’t rely on the default close button.

@WhyJS

The problem is that setting width and height are ignored by the window in fullscreen mode.

Using custom $getSize logic will not lead to problems in other parts of the code, you change $getSize only of the fullscreen window, not all windows.

The only thing that could lead to problems in my code is the absence of top or bottom toolbar, check this sample, which solves it: https://snippet.webix.com/lozmglwh

Could you please clarify what do you mean by Bonus if the fullscreen button also serves as a resize in both directions, since I can't rely on the default close button.

@Dima_S

I have attempted to replicate my issue as a snippet as best I can, including both your solutions and a kluge I came up with. As it stands, without my kluge the window continues to shrink with each use, which seems to be a problem with internal logic somewhere (my colleagues believe it has to do with garbage collection).

Let me know what you think:

https://snippet.webix.com/cy6ufo13

@WhyJS

Sorry, I misled you, in case of webix.fullscreen.set(window/popup) we use fullscreen property of window/popup (https://docs.webix.com/api__ui.window_fullscreen_config.html), not create a window in fullscreen mode. So in your case we modificate $getSize of the original window/popup. That’s why before exiting from the fullscreen mode you should restore $getSize.

Check improved example:https://snippet.webix.com/foyx4q6t

@Dima_S

I’m having trouble seeing the difference between our examples.

var fullscreenWin = webix.fullscreen.fullscreenWin = $$(view).getTopParentView();

Isn’t this still getting the outside window that fullscreen.set generates?

@WhyJS

As I said, in case of webix.fullscreen.set for window or popup we do not generate new window.

window.getTopParentView() returns itself
https://docs.webix.com/api__link__ui.view_gettopparentview.html