WorkerTileLoader uses obsolete path #2
Labels
No Label
Bug
Enhancement
No Milestone
No Assignees
2 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: IWMBrowser/iwmlib#2
Loading…
Reference in New Issue
Block a user
No description provided.
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
The worker in Pixi.deepzoom.loader.WorkerTileLoader uses a WebWorker with an old relative path that no longer works if the iwmlib is used with node_modules:
../../lib/pixi/deepzoom/tileloader.js
Should this be changed as follows or is there a better way without assuming that the iwmlib is always used within node_modules?
../../node_modules/iwmlib/lib/pixi/deepzoom/tileloader.js
Doesn't work a relative path to the same directory?
let worker = this.worker = new Worker("./tileloader.js")
Changed the option "preferWorker" to "useWorker" (class DeepZoomImage). If a WebWorker should be used, the "useWorker" option must be given a path relative from the HTML document to the worker, e.g. useWorker: '../tileloader.js' (see https://zzz.buzz/2017/03/14/relative-uris-in-web-development/#the-worker-constructor).