Merge pull request #186 from knownasilya/patch-1

Add getOpacity/setOpacity to canvaslayer
This commit is contained in:
Francisco Dans 2015-05-14 11:47:55 +02:00
commit 321258a891

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