Skip to content

Commit

Permalink
wip: The layout should store the calculated sizes of the elements #925
Browse files Browse the repository at this point in the history
  • Loading branch information
cnouguier committed Aug 9, 2024
1 parent f3eb5cb commit 8793484
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion core/client/components/layout/KWindow.vue
Original file line number Diff line number Diff line change
Expand Up @@ -295,6 +295,7 @@ function refresh (newState, oldState) {
}
function setPinnedGeometry () {
const size = computeResponsiveSize(currentWindow.sizePolicy.pinned)
console.log(size)
let x, y
if (props.placement === 'top' || props.placement === 'bottom') {
x = $q.screen.width / 2 - size[0] / 2
Expand Down Expand Up @@ -383,7 +384,7 @@ const onResized = _.throttle((event) => {
updateGeometry(currentWindow.position, newSize)
if (event.isFinal) storeGeometry()
}
}, 10)
}, 5)
const onScreenResized = _.throttle(() => {
if (currentWindow.state === 'pinned') setPinnedGeometry()
else if (currentWindow.state === 'maximized') setMaximizedGeometry()
Expand Down

0 comments on commit 8793484

Please sign in to comment.