mirror of https://github.com/xwiki-labs/cryptpad
Set default size for empty whiteboard
Previously, empty whiteboards were exported as a 0×0 pixel image, which raised an error in fabric.js. To address this issue, the default empty image is set to be a 600×600 pixel transparent png file. Also fix #1267 that is a consequence of the aforementioned issue.
This commit is contained in:
parent
38b20e8417
commit
51abbb484f
|
@ -25,8 +25,9 @@ define([
|
|||
if (c[k].y > h) { h = c[k].y + 1; }
|
||||
});
|
||||
});
|
||||
w = Math.min(w, MAX);
|
||||
h = Math.min(h, MAX);
|
||||
// Empty documents are rendered as a 600x600 transparent PNG image
|
||||
w = w === 0 ? 600 : Math.min(w, MAX);
|
||||
h = h === 0 ? 600 : Math.min(h, MAX);
|
||||
canvas.setWidth(w);
|
||||
canvas.setHeight(h);
|
||||
canvas.calcOffset();
|
||||
|
|
Loading…
Reference in New Issue