fix(bugs): enhancements and bugs in several areas (#4086)
This commit is contained in:
1 parent
01fe7fab3d
commit
730f434910
19 files changed
+146
-43
No files matched your search
@@ -137,20 +137,8 @@ function CustomizableViewportOverlay({
|
||||
return;
|
||||
}
|
||||
|
||||
const imageData = viewport.getImageData();
|
||||
const scale = viewport.getZoom();
|
||||
|
||||
if (!imageData) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (camera.scale) {
|
||||
setScale(camera.scale);
|
||||
return;
|
||||
}
|
||||
|
||||
const { spacing } = imageData;
|
||||
// convert parallel scale to scale
|
||||
const scale = (element.clientHeight * spacing[0] * 0.5) / camera.parallelScale;
|
||||
setScale(scale);
|
||||
}
|
||||
};
|
||||
|
||||
Reference in new issue
Block a user