mirror of
https://github.com/tiennm99/WPlace-AutoBOT.git
synced 2026-10-14 18:18:16 +00:00
please work man
This commit is contained in:
1 parent
b8a634b654
commit
9cc7f502da
1 file changed
+11
-5
+11
-5
@@ -4837,13 +4837,19 @@
|
||||
const aspectRatio = width / height;
|
||||
|
||||
const rs = state.resizeSettings;
|
||||
const initialW = rs && rs.baseWidth === width && rs.baseHeight === height ? (rs.width || width) : width;
|
||||
const initialH = rs && rs.baseWidth === width && rs.baseHeight === height ? (rs.height || height) : height;
|
||||
|
||||
widthSlider.value = initialW;
|
||||
heightSlider.value = initialH;
|
||||
widthSlider.max = width * 2;
|
||||
heightSlider.max = height * 2;
|
||||
let initialW = width;
|
||||
let initialH = height;
|
||||
if (rs && Number.isFinite(rs.width) && Number.isFinite(rs.height) && rs.width > 0 && rs.height > 0) {
|
||||
initialW = rs.width;
|
||||
initialH = rs.height;
|
||||
}
|
||||
// Clamp to slider ranges
|
||||
initialW = Math.max(parseInt(widthSlider.min, 10) || 10, Math.min(initialW, parseInt(widthSlider.max, 10)));
|
||||
initialH = Math.max(parseInt(heightSlider.min, 10) || 10, Math.min(initialH, parseInt(heightSlider.max, 10)));
|
||||
widthSlider.value = initialW;
|
||||
heightSlider.value = initialH;
|
||||
widthValue.textContent = initialW;
|
||||
heightValue.textContent = initialH;
|
||||
zoomSlider.value = 1;
|
||||
|
||||
Reference in new issue
Block a user