-
Notifications
You must be signed in to change notification settings - Fork 4
Open
Description
Current size is not working with programmatically print.
Call function invokes:
{
key: 'printMap',
value: function (t, e) {
this.leafletElement.printMap(t + ' page', e); //Being t+' page' = n
},
},
Afterwards, it evals:
if ('CurrentSize' === n) return this._printOpertion(n);
If it does not match, which will never do, it invokes:
(i.style.width = e.originalState.mapWidth),
(i.style.height = e.originalState.mapHeight),
where i.style.width (nor height) is not defined for Current Size.
My workaround from outside of the module, (due to my code: printControl.current is a react reference):
if (!printControl.current.printCurrentMap) {
printControl.current.printCurrentMap = function printMap(filename: string) {
this.leafletElement.printMap('CurrentSize', filename);
};
}
printControl.current.printCurrentMap('MyFileName');
My suggestion to solve it within the module:
if ('Current page' === n) return this._printOpertion(n);
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels