0
Declined

Position Presets Relative to Right/Bottom Edge?

Carl Folke Henschen Edman 9 ár síðan updated by Ionuț Botizan 9 ár síðan 3

Could we save presets with positions relative to the right/bottom edge, e.g., by giving negative offsets? That would allow you to place, e.g., a window in the top right corners, regardless of resolution?

Answer

Answer
Declined

Sorry, but that's not possible. Negative offsets represent coordinates on multiple monitor setups and I can't change that.


Let's imagine that you have 3 Full-HD monitors (1920 x 1080) and the middle one is the primary monitor. That means the top left corner of that monitor has the coordinates [X: 0, Y: 0]. In that case, if you specify a coordinate of [X: 2000, Y: 300], that means the window will be placed at 80 x 300 on the 3rd monitor while, if you'd use [X: -1000, Y: 300], that would place the window at 920 x 300 on the 1st monitor.


I hope that makes sense; I didn't came up with it, it's just the way computers work. :)


Answer
Declined

Sorry, but that's not possible. Negative offsets represent coordinates on multiple monitor setups and I can't change that.


Let's imagine that you have 3 Full-HD monitors (1920 x 1080) and the middle one is the primary monitor. That means the top left corner of that monitor has the coordinates [X: 0, Y: 0]. In that case, if you specify a coordinate of [X: 2000, Y: 300], that means the window will be placed at 80 x 300 on the 3rd monitor while, if you'd use [X: -1000, Y: 300], that would place the window at 920 x 300 on the 1st monitor.


I hope that makes sense; I didn't came up with it, it's just the way computers work. :)


Could you work around that by finding the co-ordinate space of the monitor the window is currently on, and adjusting relative to the bottom-right of that co-ordinate space?


There's the tricky situation of the window overlapping two monitors, but that's probably best solved by 'snapping' the window onto the monitor that contains the largest area of the window.

No, JavaScript is pretty limited when it comes to multiple monitor support so I couldn't determine the position of the monitor the current window is displayed on (nor its resolution or coordinates space).