mirror of
https://github.com/openseadragon/openseadragon.git
synced 2024-11-24 06:06:09 +03:00
only redraw after setImageSmoothingEnabled() when changed
This commit is contained in:
parent
4163a46a24
commit
02805226d4
@ -489,15 +489,12 @@
|
|||||||
* @param {Boolean} enabled If true, uses gl.LINEAR as the TEXTURE_MIN_FILTER and TEXTURE_MAX_FILTER, otherwise gl.NEAREST.
|
* @param {Boolean} enabled If true, uses gl.LINEAR as the TEXTURE_MIN_FILTER and TEXTURE_MAX_FILTER, otherwise gl.NEAREST.
|
||||||
*/
|
*/
|
||||||
setImageSmoothingEnabled(enabled){
|
setImageSmoothingEnabled(enabled){
|
||||||
const changed = this._imageSmoothingEnabled !== enabled;
|
if( this._imageSmoothingEnabled !== enabled ){
|
||||||
this._imageSmoothingEnabled = enabled;
|
this._imageSmoothingEnabled = enabled;
|
||||||
if( changed ){
|
|
||||||
// We need to unload all existing textures so they can be recreated with the new filter
|
|
||||||
this._unloadTextures();
|
this._unloadTextures();
|
||||||
}
|
|
||||||
// trigger a re-draw
|
|
||||||
this.viewer.world.draw();
|
this.viewer.world.draw();
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Draw a rect onto the output canvas for debugging purposes
|
* Draw a rect onto the output canvas for debugging purposes
|
||||||
|
Loading…
Reference in New Issue
Block a user