mirror of
https://github.com/openseadragon/openseadragon.git
synced 2024-11-25 14:46:10 +03:00
Merge pull request #1647 from bandicoot-imaging-sciences/nn-interp
Set image smoothing options on sketch canvas.
This commit is contained in:
commit
229515554c
@ -258,7 +258,7 @@ $.Drawer.prototype = {
|
|||||||
this.sketchCanvas.width = sketchCanvasSize.x;
|
this.sketchCanvas.width = sketchCanvasSize.x;
|
||||||
this.sketchCanvas.height = sketchCanvasSize.y;
|
this.sketchCanvas.height = sketchCanvasSize.y;
|
||||||
}
|
}
|
||||||
this._updateImageSmoothingEnabled();
|
this._updateImageSmoothingEnabled(this.context);
|
||||||
}
|
}
|
||||||
this._clear();
|
this._clear();
|
||||||
}
|
}
|
||||||
@ -343,6 +343,7 @@ $.Drawer.prototype = {
|
|||||||
self.sketchCanvas.height = sketchCanvasSize.y;
|
self.sketchCanvas.height = sketchCanvasSize.y;
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
this._updateImageSmoothingEnabled(this.sketchContext);
|
||||||
}
|
}
|
||||||
context = this.sketchContext;
|
context = this.sketchContext;
|
||||||
}
|
}
|
||||||
@ -624,14 +625,13 @@ $.Drawer.prototype = {
|
|||||||
setImageSmoothingEnabled: function(imageSmoothingEnabled){
|
setImageSmoothingEnabled: function(imageSmoothingEnabled){
|
||||||
if ( this.useCanvas ) {
|
if ( this.useCanvas ) {
|
||||||
this._imageSmoothingEnabled = imageSmoothingEnabled;
|
this._imageSmoothingEnabled = imageSmoothingEnabled;
|
||||||
this._updateImageSmoothingEnabled();
|
this._updateImageSmoothingEnabled(this.context);
|
||||||
this.viewer.forceRedraw();
|
this.viewer.forceRedraw();
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
// private
|
// private
|
||||||
_updateImageSmoothingEnabled: function(){
|
_updateImageSmoothingEnabled: function(context){
|
||||||
var context = this.context;
|
|
||||||
context.mozImageSmoothingEnabled = this._imageSmoothingEnabled;
|
context.mozImageSmoothingEnabled = this._imageSmoothingEnabled;
|
||||||
context.webkitImageSmoothingEnabled = this._imageSmoothingEnabled;
|
context.webkitImageSmoothingEnabled = this._imageSmoothingEnabled;
|
||||||
context.msImageSmoothingEnabled = this._imageSmoothingEnabled;
|
context.msImageSmoothingEnabled = this._imageSmoothingEnabled;
|
||||||
|
Loading…
Reference in New Issue
Block a user