@eeacms/volto-arcgis-block
Advanced tools
Comparing version 0.1.304 to 0.1.305
{ | ||
"name": "@eeacms/volto-arcgis-block", | ||
"version": "0.1.304", | ||
"version": "0.1.305", | ||
"description": "volto-arcgis-block: Volto add-on", | ||
@@ -5,0 +5,0 @@ "main": "src/index.js", |
@@ -89,2 +89,10 @@ import React, { createRef } from 'react'; | ||
} | ||
waitForContainer(mapdiv) { | ||
while (mapdiv === null) { | ||
new Promise((resolve) => setTimeout(resolve, 100)); // wait for 100ms | ||
} | ||
return mapdiv; | ||
} | ||
/** | ||
@@ -94,2 +102,3 @@ * This method is executed after the rener method is executed | ||
await this.loader(); | ||
this.waitForContainer(this.container.current); | ||
this.props.view.ui.add(this.container.current, 'top-right'); | ||
@@ -96,0 +105,0 @@ this.props.view.on('click', (e) => { |
@@ -56,3 +56,11 @@ import React, { createRef } from 'react'; | ||
waitForContainer(mapdiv) { | ||
while (mapdiv === null) { | ||
new Promise((resolve) => setTimeout(resolve, 100)); // wait for 100ms | ||
} | ||
return mapdiv; | ||
} | ||
async componentDidMount() { | ||
this.waitForContainer(this.props.view); | ||
this.props.view.when(() => { | ||
@@ -59,0 +67,0 @@ this.props.view.ui.add(this.container.current, 'manual'); |
@@ -69,2 +69,10 @@ import React, { createRef } from 'react'; | ||
} | ||
waitForContainer(mapdiv) { | ||
while (mapdiv === null) { | ||
new Promise((resolve) => setTimeout(resolve, 100)); // wait for 100ms | ||
} | ||
return mapdiv; | ||
} | ||
/** | ||
@@ -75,3 +83,5 @@ * This method is executed after the rener method is executed | ||
await this.loader(); | ||
this.waitForContainer(this.container.current); | ||
this.props.view.ui.add(this.container.current, 'top-right'); | ||
this.waitForContainer(this.container.current.querySelector('.print-panel')); | ||
this.print = new Print({ | ||
@@ -78,0 +88,0 @@ view: this.props.view, |
@@ -29,2 +29,9 @@ import React, { createRef } from 'react'; | ||
waitForContainer(mapdiv) { | ||
while (mapdiv === null) { | ||
new Promise((resolve) => setTimeout(resolve, 100)); // wait for 100ms | ||
} | ||
return mapdiv; | ||
} | ||
/** | ||
@@ -35,2 +42,3 @@ * This method is executed after the rener method is executed | ||
await this.loader(); | ||
this.waitForContainer(this.props.view); | ||
this.scaleBar = new ScaleBar({ | ||
@@ -37,0 +45,0 @@ view: this.props.view, |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
11054400
16015