Use the className param in ol.layer.Heatmap

This commit is contained in:
Frederic Junod
2020-09-09 14:11:21 +02:00
parent 915bca5114
commit 142fbc0811
5 changed files with 24 additions and 0 deletions

View File

@@ -37,6 +37,7 @@ export const WebGLWorkerMessageType = {
/**
* @typedef {Object} Options
* @property {string} [className='ol-layer'] A CSS class name to set to the canvas element.
* @property {Object.<string,import("../../webgl/Helper").UniformValue>} [uniforms] Uniform definitions for the post process steps
* @property {Array<PostProcessesOptions>} [postProcesses] Post-processes definitions
*/
@@ -65,6 +66,10 @@ class WebGLLayerRenderer extends LayerRenderer {
postProcesses: options.postProcesses,
uniforms: options.uniforms,
});
if (options.className !== undefined) {
this.helper.getCanvas().className = options.className;
}
}
/**