Hacky fix safari transparency (#3657)

This PR fixes the missing viewport on Safari. Blending on webgl in
Safari is cursed.

### Change Type

- [x] `sdk` — Changes the tldraw SDK
- [x] `feature` — New feature
This commit is contained in:
Steve Ruiz 2024-04-30 11:47:17 +01:00 committed by GitHub
parent 46a97dfe3d
commit 29b6407cdc
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -276,6 +276,11 @@ export class MinimapManager {
this.gl.prepareTriangles(this.gl.viewport, len)
this.gl.setFillColor(this.colors.viewportFill)
this.gl.drawTrianglesTransparently(len)
if (this.editor.environment.isSafari) {
this.gl.drawTrianglesTransparently(len)
this.gl.drawTrianglesTransparently(len)
this.gl.drawTrianglesTransparently(len)
}
}
drawCollaborators() {