Skip to content

Commit 2281347

Browse files
authored
Merge pull request #1372 from RobertOrthofer/avoid-createMockDIV-import
avoid createMockDiv import
2 parents e565653 + ebae33a commit 2281347

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

src/apply.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@ License: https://raw.githubusercontent.com/openlayers/ol-mapbox-style/master/LIC
77
import {derefLayers} from '@maplibre/maplibre-gl-style-spec';
88
import Map from 'ol/Map.js';
99
import View from 'ol/View.js';
10-
import {createMockDiv} from 'ol/dom.js';
1110
import {getCenter, getTopLeft} from 'ol/extent.js';
1211
import GeoJSON from 'ol/format/GeoJSON.js';
1312
import MVT from 'ol/format/MVT.js';
@@ -639,7 +638,7 @@ function getBackgroundColor(glLayer, resolution, options, functionCache) {
639638
*/
640639
function setupBackgroundLayer(glLayer, options, functionCache) {
641640
const div = WORKER_OFFSCREEN_CANVAS
642-
? createMockDiv()
641+
? /** @type { HTMLDivElement } */ ({style: {}})
643642
: document.createElement('div');
644643
div.className = 'ol-mapbox-style-background';
645644
div.style.position = 'absolute';

0 commit comments

Comments
 (0)