Add getOpacity/setOpacity to canvaslayer
This commit is contained in:
parent
feccf2809b
commit
bc953b1185
@ -287,6 +287,24 @@ CanvasLayer.prototype.setPaneName = function(paneName) {
|
||||
this.setPane_();
|
||||
};
|
||||
|
||||
/**
|
||||
* Set the opacity for the canvas.
|
||||
*
|
||||
* @param {number} opacity The opacity of the canvas
|
||||
* /
|
||||
CanvasLayer.prototype.setOpacity = function (opacity) {
|
||||
this.canvas.style.opacity = opacity;
|
||||
};
|
||||
|
||||
/**
|
||||
* Get the canvases opacity.
|
||||
*
|
||||
* @return {number} The opacity of the canvas
|
||||
* /
|
||||
CanvasLayer.prototype.getOpacity = function () {
|
||||
return this.canvas.style.opacity;
|
||||
};
|
||||
|
||||
/**
|
||||
* @return {string} The name of the current container pane.
|
||||
*/
|
||||
|
Loading…
Reference in New Issue
Block a user