Skip to content

Commit

Permalink
feature: make the central print component available externally (#1673)
Browse files Browse the repository at this point in the history
  • Loading branch information
Grammostola committed Feb 17, 2023
1 parent d05a48c commit 663156b
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/controls/print/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -63,9 +63,13 @@ const Print = function Print(options = {}) {
let screenButton;
let mapMenu;
let menuItem;
let printComponent;

const getPrintComponent = () => printComponent;

return Component({
name: 'print',
getPrintComponent,
onInit() {
if ('visible' in northArrow) {
showNorthArrow = northArrow.visible;
Expand All @@ -76,7 +80,7 @@ const Print = function Print(options = {}) {
},
onAdd(evt) {
viewer = evt.target;
const printComponent = PrintComponent({
printComponent = PrintComponent({
logo,
northArrow,
printLegend,
Expand Down

0 comments on commit 663156b

Please sign in to comment.