Merge pull request #186 from knownasilya/patch-1
Add getOpacity/setOpacity to canvaslayer
This commit is contained in:
commit
321258a891
@ -287,6 +287,24 @@ CanvasLayer.prototype.setPaneName = function(paneName) {
|
|||||||
this.setPane_();
|
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.
|
* @return {string} The name of the current container pane.
|
||||||
*/
|
*/
|
||||||
|
Loading…
Reference in New Issue
Block a user