CoastalResilienceNetwork / GeositeFramework

Mapping Framework powering TNC Coastal Resilience programs
http://maps.coastalresilience.org/network/
GNU General Public License v3.0
13 stars 10 forks source link

Event listener on plugin-print class delayed in single app mode #1173

Closed cschneebeck closed 5 years ago

cschneebeck commented 5 years ago

A user reported the print feature wasn't working in the Hawaii region. This is a single plugin mode region that displays the ecological-effects-slc app. For users to initiate print, I added a button with the class plugin-print. The framework has an event listener that triggers the print function when there is a click on this class. The event listener doesn't recognize any clicks on this class when it is first opened. When I clicked twice on the grey minimize button pictured below, the event listener started to recognize clicks on plugin-print. To fix the problem, I triggered two clicks on the minimize button (id='toggle-plugin-container') at app startup and now print works right away.

image

We need to figure out why it is necessary to minimize and expand the app window for this event listener to work. To test this issue, host the Hawaii region code on local sandbox and comment out lines 177-178 of main.js (..\hawaii\plugins\ecological-effects-slc\main.js).