WorkerTileLoader uses obsolete path #2

Closed
opened 4 years ago by uoestermeier · 2 comments
Owner

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

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
Owner

Doesn't work a relative path to the same directory?

let worker = this.worker = new Worker("./tileloader.js")

Doesn't work a relative path to the same directory? let worker = this.worker = new Worker("./tileloader.js")
skupke added the
Bug
label 4 years ago
Owner

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).

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).
skupke closed this issue 3 years ago
Sign in to join this conversation.
No Milestone
No Assignees
2 Participants
Notifications
Due Date

No due date set.

Dependencies

This issue currently doesn't have any dependencies.

Loading…
There is no content yet.