Skip to content

Commit

Permalink
Make slide work after Android device rotation.
Browse files Browse the repository at this point in the history
Quick fix for issue 1369
  • Loading branch information
ChristianMayer committed Oct 1, 2023
1 parent 7388e4d commit 53b7e69
Showing 1 changed file with 9 additions and 7 deletions.
16 changes: 9 additions & 7 deletions source/class/cv/ui/structure/pure/Slide.js
Expand Up @@ -36,13 +36,15 @@ qx.Class.define('cv.ui.structure.pure.Slide', {
super(props);
this.__animator = new cv.util.LimitedRateUpdateAnimator(this.__updateHandlePosition, this);

this.__pageSizeListener = cv.ui.structure.pure.layout.ResizeHandler.states.addListener(
'changePageSizeInvalid',
() => {
this.__invalidateScreensize();
}
);

this.__pageSizeListener = cv.ui.structure.pure.layout.ResizeHandler.states.addListener('changePageSizeInvalid', () => {
// Quick fix for issue https://github.com/CometVisu/CometVisu/issues/1369
// make sure that the `__invalidateScreensize` is delayed so that
// reading the available spaces is valid.
// Just to be sure, wait for two frames
window.requestAnimationFrame(() => {
window.requestAnimationFrame(this.__invalidateScreensize.bind(this));
});
});
this.__lastBusValue = {};
},
/*
Expand Down

0 comments on commit 53b7e69

Please sign in to comment.