Print panel component. Read print capabilities and generate options from it. Be able to print the content on the map, based on the layer tree and the OL map. Have actions on the print mask and on the map (rotation).
Optional
Legacy fix for attrName i18n.
Deserialize an element and set the current element state to the deserialized one
The element serialization as returned by the serialize method
When the component is disconnected from the DOM all the callbacks will be unregistered
Used to know the matching HTML element.
An arbitrary type based on the matching "capabilities" attribute.
The matching attribute in the selected "capabilities" layout.
The render state.
The rotation angle in degrees, from the map.
the current print dpi value.
the current print format value.
the current print scale.
Hide the component (display: none).
Convert the string in parameter with uHtml and return it. This allows to convert a string with html in a right html object. For example, htmlUnsafe('
NOTE REG: We cannot just use truthy here, because javascript comparaison table is really problematic. For example: 0 == false [] == false "" == false And there are cases where we want to check null or undefined, because 0 can be a right value. More here : https://dorey.github.io/JavaScript-Equality-Table/
Removes the print element with the specified itemId from the printList array. Cancel the print if is it not finished.
Set selected dpi format.
Set selected print format.
Sync both rotation inputs and update the map rotation value.
Update the values relative to the layout (attributes, scales, etc.) Set scale and print format in the state. Renders the panel with new info.
On print element clicked:
Set selected scale in the state and update the mask.
Prints the current map state regarding every print options. Can add datasource (based on selection) and a legend. The status will be tracked until finished.
Re-Render the component. The method should be called when the component has already been rendered and needs to be updated.
Render the component regarding its visibility. Fetch the print capabilities at first rendering, then render the print mask too and register to events.
Renders a hidden span with the name of the component. Useful to render a placeholder for not visible component.
Returns the serialization of the current element. This method should be overwritten by child classes
An object describing the current element serialized
Show the component (display: block).
In the templates, sometimes for accessibility reasons, we have to support the KeyDown Event In those case, we often juste want to do the same as the click event when Enter or Space is pressed Then this method can be used : it just calls the click event on the same element
Subscribes with to the state changes made on
Unsubscribe all callbacks
Static
Whitelist the availableLayouts with the given layouts, or allows every of them.
Get the print formats based on the configuration. Removes formats not proposed in the available formats.
Whitelist the availableScales with the given scales, or allows every of them.
a valid default format from an array of print formats.