@@ -225,7 +225,7 @@ const InternalCanvas: FC<CanvasProps & { ref?: Ref<CanvasRef> }> = forwardRef(({
225225 {
226226 onDrag : ( { movement : [ mx , my ] } ) => {
227227 // Update container scroll position during drag
228- if ( containerRef . current ) {
228+ if ( containerRef . current && ! canvasDragNode ) {
229229 containerRef . current . scrollLeft = panStartScrollPosition . current . x - mx ;
230230 containerRef . current . scrollTop = panStartScrollPosition . current . y - my ;
231231 }
@@ -292,7 +292,7 @@ const InternalCanvas: FC<CanvasProps & { ref?: Ref<CanvasRef> }> = forwardRef(({
292292 style = { { height, width } }
293293 className = { classNames ( css . container , className , {
294294 [ css . pannable ] : pannable ,
295- [ css . hideScrollbars ] : panType === 'drag'
295+ [ css . draggable ] : panType === 'drag'
296296 } ) }
297297 ref = { ( el ) => {
298298 // Really not a fan of this API change...
@@ -327,17 +327,17 @@ const InternalCanvas: FC<CanvasProps & { ref?: Ref<CanvasRef> }> = forwardRef(({
327327 scale : zoom ,
328328 transition : animated
329329 ? {
330- velocity : 100 ,
331- translateX : { duration : mount . current ? 0.3 : 0 } ,
332- translateY : { duration : mount . current ? 0.3 : 0 } ,
333- opacity : { duration : 0.8 } ,
334- when : 'beforeChildren'
335- }
330+ velocity : 100 ,
331+ translateX : { duration : mount . current ? 0.3 : 0 } ,
332+ translateY : { duration : mount . current ? 0.3 : 0 } ,
333+ opacity : { duration : 0.8 } ,
334+ when : 'beforeChildren'
335+ }
336336 : {
337- type : false ,
338- duration : 0 ,
339- when : 'beforeChildren'
340- }
337+ type : false ,
338+ duration : 0 ,
339+ when : 'beforeChildren'
340+ }
341341 } }
342342 >
343343 { layout ?. children ?. map ( ( { children, ...n } ) => {
0 commit comments