Skip to content

Commit

Permalink
Apply selected settings to second popup
Browse files Browse the repository at this point in the history
  • Loading branch information
HelloYuiYui committed Aug 21, 2024
1 parent 299c77d commit 5d29d31
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions examples/popup/map.fixedpopup.html
Original file line number Diff line number Diff line change
Expand Up @@ -135,18 +135,18 @@ <h2>Options:</h2>
<option value="tooltips">tooltips</option>
</select>
<br />
<input id="ck" type="checkbox" onchange="if (this.checked) popup.addPopupClass('shadow'); else popup.removePopupClass('shadow');" />
<input id="ck" type="checkbox" onchange="this.checked ? popup.addPopupClass('shadow') & popup2.addPopupClass('shadow') : popup.removePopupClass('shadow') & popup2.removePopupClass('shadow')" />
<label for="ck">shadow</label>
<br />
<input id="cb" type="checkbox" checked onchange="popup.setClosebox(this.checked);" />
<input id="cb" type="checkbox" checked onchange="popup.setClosebox(this.checked); popup2.setClosebox(this.checked);" />
<label for="cb">hasclosebox</label>
<br />
<label>
<input name="fix" type="radio" checked onchange="popup.setHook('viewport');" />
<input name="fix" type="radio" checked onchange="popup.setHook('viewport'); popup2.setHook('viewport')" />
hook on viewport
</label>
<label>
<input name="fix" type="radio" onchange="popup.setHook('map');" />
<input name="fix" type="radio" onchange="popup.setHook('map'); popup2.setHook('map')" />
hook on map
</label>
</div>
Expand All @@ -160,12 +160,14 @@ <h2>Options:</h2>
var popup = new ol.Overlay.FixedPopup ({
popupClass: "default", //"tooltips", "warning" "black" "default", "tips", "shadow",
// anim: true,
closeBox: true
closeBox: true,
fixedPosition: true,
});
var popup2 = new ol.Overlay.FixedPopup ({
popupClass: "default", //"tooltips", "warning" "black" "default", "tips", "shadow",
// anim: true,
closeBox: true
closeBox: true,
fixedPosition: true,
});

// The map
Expand Down

0 comments on commit 5d29d31

Please sign in to comment.