Fork me on GitHub

OpenSeadragon 6.0.1

Migration From v5 to v6

Version 6 brings a major change of how data is handled to OpenSeadragon. In general, the v6 changes (as drastic as they might seem) bring back system-wide data compatibility and address issues introduced in v5. You should familiarize yourself with the new system of data handling. Below is a list of things that the new system deprecates:

Example usage of new way of data modification:

viewer.addHandler('tile-invalidated', async e => {
    const data = await e.getData('context2d');
    // maybe do some expensive computation here
    if (e.outdated()) return; // maybe check if the event is still valid
    // maybe do some more expensive computation here
    await e.setData(myValue, 'context2d');
});
viewer.requestInvalidate().then(() => console.log("Viewport updated!"));

Cool, right?