os-js / osjs-client

OS.js Client Module
https://manual.os-js.org/
Other
31 stars 31 forks source link

Change position of application window by desktop resizing #135

Closed mahsashadi closed 3 years ago

mahsashadi commented 3 years ago

Hi I am developing an application in Osjs. I need the window position to be changed by resizing the desktop. Currently position of all windows remained fixed as the desktop resizes.

andersevenrud commented 3 years ago

I need the window position to be changed by resizing the desktop

Reading this, I'm not sure if you want to make all windows clamp to the viewport or just the one you're developing.

There's a method called win.clampToViewport() that does exactly what you need, that can be used for this purpose. I can add it so this is automatically called when the viewport is resized for all windows.

mahsashadi commented 3 years ago

I need to have this functionality for applications and also for developed widgets.

andersevenrud commented 3 years ago

Going to assume you meant windows there. OK, I'll look into this.

andersevenrud commented 3 years ago

Could you open an issue in osjs-widgets about this as well ? I cannot implement that behavior in this repo.

andersevenrud commented 3 years ago

PR: https://github.com/os-js/osjs-client/pull/136

andersevenrud commented 3 years ago

I've published osjs-client 3.2.0 which contains this change and is enabled by default.

Let me know how it works out :)

mahsashadi commented 3 years ago

Thank you, now it works as I need :)

andersevenrud commented 3 years ago

Great!