WorkerTileLoader uses obsolete path #2

Closed
opened 2019-04-12 15:04:45 +02:00 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 2019-05-16 09:12:15 +02:00
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).
Sign in to join this conversation.
No Label
Bug
Enhancement
No Milestone
No Assignees
2 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: IWMBrowser/iwmlib#2
No description provided.