[Libreoffice-commits] online.git: loleaflet/src
Mihai Varga
mihai.varga at collabora.com
Fri Oct 30 04:10:04 PDT 2015
loleaflet/src/map/handler/Map.Print.js | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
New commits:
commit 9369b59e25155a289a765dc3578ae541451d8899
Author: Mihai Varga <mihai.varga at collabora.com>
Date: Fri Oct 30 13:07:34 2015 +0200
loleaflet: use the parent window for printing in chrome
We need this because the otherwise created object is not available in
the parent window where the pdf is rendered in the print dialog
diff --git a/loleaflet/src/map/handler/Map.Print.js b/loleaflet/src/map/handler/Map.Print.js
index 9adda5b..c181005 100644
--- a/loleaflet/src/map/handler/Map.Print.js
+++ b/loleaflet/src/map/handler/Map.Print.js
@@ -36,8 +36,8 @@ L.Map.Print = L.Handler.extend({
_onInitPrint: function (e) {
var blob = new Blob([e.response], {type: 'application/pdf'});
- var url = URL.createObjectURL(blob);
- this._printIframe = L.DomUtil.create('iframe', '', document.body);
+ var url = parent.URL.createObjectURL(blob);
+ this._printIframe = L.DomUtil.create('iframe', '', parent.document.body);
this._printIframe.onload = L.bind(this._onIframeLoaded, this);
L.DomUtil.setStyle(this._printIframe, 'visibility', 'hidden');
L.DomUtil.setStyle(this._printIframe, 'position', 'fixed');
More information about the Libreoffice-commits
mailing list