MCPcopy Create free account
hub / github.com/SuperMap/iClient-JavaScript / setOpacity

Method setOpacity

src/openlayers/overlay/HeatMap.js:142–154  ·  view source on GitHub ↗

* @function HeatMap.prototype.setOpacity * @description 设置图层的不透明度,取值范围:[0-1]。 * @param {number} opacity - 不透明度。

(opacity)

Source from the content-addressed store, hash-verified

140 * @param {number} opacity - 不透明度。
141 */
142 setOpacity(opacity) {
143 if (opacity !== this.opacity) {
144 this.opacity = opacity;
145 var element = this.rootCanvas;
146 CommonUtil.modifyDOMElement(element, null, null, null,
147 null, null, null, opacity);
148
149 if (this.map !== null) {
150 // this.dispatchEvent({type: 'changelayer', value: {layer: this, property: "opacity"}});
151 this.changed();
152 }
153 }
154 }
155
156 /**
157 * @function HeatMap.prototype.updateHeatPoints

Callers 15

UFunction · 0.45
GraphSpec.jsFile · 0.45
HeatMapSpec.jsFile · 0.45
ImageMapLayer.jsFile · 0.45
createBaseLayerMethod · 0.45
addLayerMethod · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected