[handle_pixel] better zoom logic
This commit is contained in:
parent
3b5976c334
commit
3f064c3336
1 changed files with 11 additions and 3 deletions
|
@ -38,9 +38,17 @@ document.addEventListener('DOMContentLoaded', () => {
|
||||||
});
|
});
|
||||||
|
|
||||||
$("img.shm-main-image").click(function(e) {
|
$("img.shm-main-image").click(function(e) {
|
||||||
switch(shm_cookie_get("ui-image-zoom")) {
|
var val = $(".shm-zoomer")[0].value;
|
||||||
case "full": zoom("both"); break;
|
var cookie = shm_cookie_get("ui-image-zoom");
|
||||||
default: zoom("full"); break;
|
|
||||||
|
if (val == "full" && cookie == "full"){
|
||||||
|
zoom("both", false);
|
||||||
|
}
|
||||||
|
else if (val != "full"){
|
||||||
|
zoom("full", false);
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
zoom(cookie, false);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
Reference in a new issue