Add getOpacity/setOpacity to canvaslayer

This commit is contained in:
Ilya Radchenko 2015-05-12 11:57:46 -04:00
parent feccf2809b
commit bc953b1185

View File

@ -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.
*/