Web:Components:Viewer:Sub-Components:Mobile-Viewer Refactoring and rendering optimization
This commit is contained in:
parent
748e454224
commit
0ce8de9143
@ -45,6 +45,7 @@ function MobileViewer({
|
|||||||
width: width,
|
width: width,
|
||||||
height: height,
|
height: height,
|
||||||
touchAction: "none",
|
touchAction: "none",
|
||||||
|
willChange: "transform, opacity, contents",
|
||||||
}));
|
}));
|
||||||
React.useEffect(() => {
|
React.useEffect(() => {
|
||||||
const point = maybeAdjustImage({
|
const point = maybeAdjustImage({
|
||||||
@ -218,7 +219,6 @@ function MobileViewer({
|
|||||||
const x = memo[0] - (mScale - 1) * memo[2];
|
const x = memo[0] - (mScale - 1) * memo[2];
|
||||||
const y = memo[1] - (mScale - 1) * memo[3];
|
const y = memo[1] - (mScale - 1) * memo[3];
|
||||||
|
|
||||||
setScale(style.scale.get());
|
|
||||||
api.start({
|
api.start({
|
||||||
x,
|
x,
|
||||||
y,
|
y,
|
||||||
|
Loading…
Reference in New Issue
Block a user