Skip to content

Commit

Permalink
Use all space when no axes
Browse files Browse the repository at this point in the history
  • Loading branch information
paulmasson committed May 27, 2022
1 parent 0e921f7 commit fe4872e
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 0 deletions.
7 changes: 7 additions & 0 deletions build/mathcell.js
Original file line number Diff line number Diff line change
Expand Up @@ -2550,6 +2550,13 @@ function svg( id, data, config ) {
yTotal = height + 2.5*ext + yLabel + 1.5*yOffset;
}

if ( !axes ) {
xShift = 0;
yShift = 0;
xTotal = width;
yTotal = height;
}

var svg = `
<svg width="${ width }" height="${ height }" preserveAspectRatio="none"
viewBox="${ -xShift } ${ -yShift } ${ xTotal } ${ yTotal }"
Expand Down
7 changes: 7 additions & 0 deletions src/render/svg.js
Original file line number Diff line number Diff line change
Expand Up @@ -162,6 +162,13 @@ function svg( id, data, config ) {
yTotal = height + 2.5*ext + yLabel + 1.5*yOffset;
}

if ( !axes ) {
xShift = 0;
yShift = 0;
xTotal = width;
yTotal = height;
}

var svg = `
<svg width="${ width }" height="${ height }" preserveAspectRatio="none"
viewBox="${ -xShift } ${ -yShift } ${ xTotal } ${ yTotal }"
Expand Down

0 comments on commit fe4872e

Please sign in to comment.