Export render from ol/control/OverviewMap

This commit is contained in:
Tim Schaub
2018-02-18 22:41:09 -07:00
parent 6af726e72b
commit fc0af19b59

View File

@@ -157,11 +157,9 @@ const OverviewMap = function(opt_options) {
element.appendChild(this.ovmapDiv_); element.appendChild(this.ovmapDiv_);
element.appendChild(button); element.appendChild(button);
const render = options.render ? options.render : OverviewMap.render;
Control.call(this, { Control.call(this, {
element: element, element: element,
render: render, render: options.render || render,
target: options.target target: options.target
}); });
@@ -306,10 +304,10 @@ OverviewMap.prototype.handleRotationChanged_ = function() {
* @this {ol.control.OverviewMap} * @this {ol.control.OverviewMap}
* @api * @api
*/ */
OverviewMap.render = function(mapEvent) { export function render(mapEvent) {
this.validateExtent_(); this.validateExtent_();
this.updateBox_(); this.updateBox_();
}; }
/** /**