Merge remote-tracking branch 'upstream/dev' into dev

This commit is contained in:
thororen1234 2024-10-24 11:14:22 +00:00
commit a824dd0518
5 changed files with 63 additions and 34 deletions

View file

@ -179,6 +179,11 @@ export default definePlugin({
{
match: /componentWillUnmount\(\){/,
replace: "$&$self.unMountMagnifier();"
},
{
match: /componentDidUpdate\(\i\){/,
replace: "$&$self.updateMagnifier(this);"
}
]
}
@ -215,6 +220,11 @@ export default definePlugin({
}
},
updateMagnifier(instance) {
this.unMountMagnifier();
this.renderMagnifier(instance);
},
unMountMagnifier() {
this.root?.unmount();
this.currentMagnifierElement = null;