zoom on wheel
This commit is contained in:
		
							
								
								
									
										12
									
								
								js/app.js
									
									
									
									
									
								
							
							
						
						
									
										12
									
								
								js/app.js
									
									
									
									
									
								
							| @ -279,6 +279,7 @@ screenRow.onmousedown = function(event) { | ||||
| screenRow.onmousemove = function(event) { | ||||
| 	if (mousedown) { | ||||
|         event.preventDefault() | ||||
|         event.stopPropagation() | ||||
|         rX = (rX0 - event.clientY + clientY0 + 360) % 360 | ||||
|         screenRow.style.setProperty("--rX", rX + "deg") | ||||
|         if (rX <= 180) { | ||||
| @ -300,6 +301,15 @@ screenRow.onmousemove = function(event) { | ||||
|     } | ||||
| } | ||||
|  | ||||
| screenRow.onmouseup = function(event) { | ||||
| screenRow.onmouseup = screenRow.onmouseleave = function(event) { | ||||
|     mousedown = false | ||||
| } | ||||
|  | ||||
| screenRow.onwheel = function(event) { | ||||
|     event.preventDefault() | ||||
|     event.stopPropagation() | ||||
|     let zoom = parseInt(getComputedStyle(screenRow).getPropertyValue("--tZ")) | ||||
|     zoom += event.deltaY | ||||
|     screenRow.style.setProperty("--tZ", zoom + "px") | ||||
|     console.log(zoom) | ||||
| } | ||||
		Reference in New Issue
	
	Block a user