Commit 6b38be1
authored
fix(editor): make CORS requests for 2D guide images for 3D image cache
Add the crossOrigin="anonymous" attribute to the <image> SVG tag used to load the floor plan guide image in the 2D editor. This ensures we get CORS headers back from the server. While they aren't required to display the image in the 2D editor, they are required in the 3D editor, where the image is loaded as a texture. If we don't make a CORS request in 2D and we load the image there first, the response is cached in the browser without the necessary headers. Then, when the 3D editor loads the same URL for the texture, it gets the cached response back without the necessary headers and blows up with a CORS error.1 parent 75566d5 commit 6b38be1
2 files changed
Lines changed: 6 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2828 | 2828 | | |
2829 | 2829 | | |
2830 | 2830 | | |
| 2831 | + | |
2831 | 2832 | | |
2832 | 2833 | | |
2833 | 2834 | | |
| |||
0 commit comments