fix: wrap main canvas application around div to fix cursor problems
This commit is contained in:
parent
0b6f044982
commit
2501adebd2
1 changed files with 40 additions and 36 deletions
|
|
@ -496,6 +496,9 @@ function Canvas() {
|
|||
if (loading) return null;
|
||||
|
||||
return (
|
||||
// Relative for canvas information
|
||||
<div className="relative">
|
||||
{/* Wrap application around div to use events */}
|
||||
<div
|
||||
ref={stageContainerRef}
|
||||
tabIndex={0}
|
||||
|
|
@ -507,7 +510,7 @@ function Canvas() {
|
|||
onPointerUp={onPointerUp}
|
||||
onWheel={onWheel}
|
||||
style={{ cursor: cssCursor }}
|
||||
className="relative"
|
||||
className="size-full"
|
||||
>
|
||||
<Application resizeTo={stageContainerRef} ref={appRef} backgroundAlpha={0} className="touch-none select-none">
|
||||
<Blocks blocks={visibleBlocks} missingTexture={missingTexture} textures={textures} coords={coords} scale={scale} version={version} />
|
||||
|
|
@ -534,6 +537,7 @@ function Canvas() {
|
|||
</pixiContainer>
|
||||
)}
|
||||
</Application>
|
||||
</div>
|
||||
|
||||
<CursorInformation mouseCoords={mouseCoords} />
|
||||
<CanvasInformation />
|
||||
|
|
|
|||
Loading…
Reference in a new issue