Open nagolli opened 3 years ago
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 ('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);
if ('Current page' === n) return this._printOpertion(n);
Current size is not working with programmatically print.
Call function invokes:
Afterwards, it evals:
if ('CurrentSize' === n) return this._printOpertion(n);
If it does not match, which will never do, it invokes:
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):
My suggestion to solve it within the module:
if ('Current page' === n) return this._printOpertion(n);