I am trying to use the viewer in an Angular app and it works as a charm. However, since I am loading rather large DXFs, I would like to use a web worker.
import {DxfViewer} from "dxf-viewer"
DxfViewer.SetupWorker()
When I try to load a file I get the following error: Unmatched message sequence: 1. What causes this error? My Angular app is set up to use web workers and I also successfully make use of them elsewhere.
I am trying to use the viewer in an Angular app and it works as a charm. However, since I am loading rather large DXFs, I would like to use a web worker.
Here is the code that I use:
My DxfViewerWorker.js-file looks like this:
When I try to load a file I get the following error:
Unmatched message sequence: 1
. What causes this error? My Angular app is set up to use web workers and I also successfully make use of them elsewhere.