Fixed visual bugs
This commit is contained in:
parent
1a49178330
commit
ad3d6d9a22
@ -622,13 +622,14 @@ onUiLoaded(async() => {
|
|||||||
panSpeed = 3.5;
|
panSpeed = 3.5;
|
||||||
}
|
}
|
||||||
|
|
||||||
elemData[elemId].panX =
|
elemData[elemId].panX += movementX * panSpeed;
|
||||||
elemData[elemId].panX + movementX * panSpeed;
|
elemData[elemId].panY += movementY * panSpeed;
|
||||||
elemData[elemId].panY =
|
|
||||||
elemData[elemId].panY + movementY * panSpeed;
|
|
||||||
|
|
||||||
targetElement.style.transform = `translate(${elemData[elemId].panX}px, ${elemData[elemId].panY}px) scale(${elemData[elemId].zoomLevel})`;
|
// Delayed redraw of an element
|
||||||
toggleOverlap("on");
|
requestAnimationFrame(() => {
|
||||||
|
targetElement.style.transform = `translate(${elemData[elemId].panX}px, ${elemData[elemId].panY}px) scale(${elemData[elemId].zoomLevel})`;
|
||||||
|
toggleOverlap("on");
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
function handleMoveByKey(e) {
|
function handleMoveByKey(e) {
|
||||||
|
Loading…
Reference in New Issue
Block a user