@@ -1931,8 +1931,8 @@ export class WorkspaceSvg
19311931 // The scrollX and scrollY still need to have absoluteLeft and absoluteTop
19321932 // subtracted from them, but we'll leave that for setScale so that they're
19331933 // correctly updated for the new flyout size if we have a simple toolbox.
1934- this . scrollX = matrix . e ;
1935- this . scrollY = matrix . f ;
1934+ this . scrollX = Math . round ( matrix . e ) ;
1935+ this . scrollY = Math . round ( matrix . f ) ;
19361936 this . setScale ( newScale ) ;
19371937 }
19381938
@@ -2118,6 +2118,7 @@ export class WorkspaceSvg
21182118 * @param newScale Zoom factor. Units: (pixels / workspaceUnit).
21192119 */
21202120 setScale ( newScale : number ) {
2121+ newScale = Math . round ( newScale * 1000 ) / 1000 ;
21212122 if (
21222123 this . options . zoomOptions . maxScale &&
21232124 newScale > this . options . zoomOptions . maxScale
@@ -2255,8 +2256,8 @@ export class WorkspaceSvg
22552256 metrics . scrollHeight - metrics . viewHeight ,
22562257 ) ;
22572258 const maxYScroll = metrics . scrollTop + maxYDisplacement ;
2258- x = Math . max ( x , - maxXScroll ) ;
2259- y = Math . max ( y , - maxYScroll ) ;
2259+ x = Math . round ( Math . max ( x , - maxXScroll ) ) ;
2260+ y = Math . round ( Math . max ( y , - maxYScroll ) ) ;
22602261 this . scrollX = x ;
22612262 this . scrollY = y ;
22622263
0 commit comments