File tree Expand file tree Collapse file tree 1 file changed +7
-3
lines changed
src/views/graphPage/controllers Expand file tree Collapse file tree 1 file changed +7
-3
lines changed Original file line number Diff line number Diff line change @@ -98,12 +98,16 @@ export const GridController: FC<{ size: number; opacity: number; color: string }
98
98
const canvas = canvasRef . current ;
99
99
if ( ! canvas ) return ;
100
100
101
- const { width, height } = sigma . getDimensions ( ) ;
101
+ let { width, height } = sigma . getDimensions ( ) ;
102
102
const pixelRatio = getPixelRatio ( ) ;
103
+
104
+ width *= pixelRatio ;
105
+ height *= pixelRatio ;
106
+
103
107
canvas . style . width = width + "px" ;
104
108
canvas . style . height = height + "px" ;
105
- canvas . setAttribute ( "width" , width * pixelRatio + "px" ) ;
106
- canvas . setAttribute ( "height" , height * pixelRatio + "px" ) ;
109
+ canvas . setAttribute ( "width" , width + "px" ) ;
110
+ canvas . setAttribute ( "height" , height + "px" ) ;
107
111
} , [ sigma ] ) ;
108
112
109
113
useEffect ( ( ) => {
You can’t perform that action at this time.
0 commit comments