Snap in PiP widget when content changed (#9797)
This commit is contained in:
parent
7db2ee749f
commit
1614674ca9
3 changed files with 112 additions and 0 deletions
|
@ -85,6 +85,10 @@ export default class PictureInPictureDragger extends React.Component<IProps> {
|
|||
UIStore.instance.off(UI_EVENTS.Resize, this.onResize);
|
||||
}
|
||||
|
||||
public componentDidUpdate(prevProps: Readonly<IProps>): void {
|
||||
if (prevProps.children !== this.props.children) this.snap(true);
|
||||
}
|
||||
|
||||
private animationCallback = () => {
|
||||
if (
|
||||
!this.moving &&
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue