Commit 78440e65 authored by Marc Duez's avatar Marc Duez
Browse files

pdf.js : debug firefox (ff don't support offsetwidth/offsetheight)

parent 8fb2784e
...@@ -176,10 +176,8 @@ PDF.prototype = { ...@@ -176,10 +176,8 @@ PDF.prototype = {
.cloneNode(true); .cloneNode(true);
var opt2 = {}; var opt2 = {};
opt2.scaleX = opt.w / document.getElementById(this.graph_id) opt2.scaleX = opt.w / document.getElementById(this.graph_id).getAttribute("width")
.offsetWidth opt2.scaleY = opt.h / document.getElementById(this.graph_id).getAttribute("height")
opt2.scaleY = opt.h / document.getElementById(this.graph_id)
.offsetHeight
opt2.x_offset = opt.x; opt2.x_offset = opt.x;
opt2.y_offset = opt.y; opt2.y_offset = opt.y;
...@@ -479,10 +477,8 @@ PDF.prototype = { ...@@ -479,10 +477,8 @@ PDF.prototype = {
icon.appendChild(res) icon.appendChild(res)
var opt_icon = {}; var opt_icon = {};
opt_icon.scaleX = w / document.getElementById(this.graph_id) opt_icon.scaleX = w / document.getElementById(this.graph_id).getAttribute("width")
.offsetWidth opt_icon.scaleY = h / document.getElementById(this.graph_id).getAttribute("height")
opt_icon.scaleY = h / document.getElementById(this.graph_id)
.offsetHeight
opt_icon.x_offset = x opt_icon.x_offset = x
opt_icon.y_offset = y; opt_icon.y_offset = y;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment