Skip to content

Commit

Permalink
v1.2/transparent background color was replaced into white background …
Browse files Browse the repository at this point in the history
…color.
  • Loading branch information
koteitan committed Mar 25, 2018
1 parent fcf4703 commit 626c524
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
2 changes: 1 addition & 1 deletion index.html
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ <h1>Hydra Viewer</h1>
</textarea>
</form>
<address>
Hydra Viewer by Javascript v1.1
Hydra Viewer by Javascript v1.2
programmed by <a href="http://twitter.com/#!/koteitan">koteitan</a><br>
Source code is at <a href="https://github.com/koteitan/hydraviewer/">github</a><br>
</address>
Expand Down
8 changes: 6 additions & 2 deletions main.js
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,10 @@ var drawTree=function(mm){
//resize canvas
outcanvas.width=usedsize[0];
outcanvas.height=usedsize[1];
//draw background
ctx.fillStyle="white";
ctx.fillRect(0,0,outcanvas.width,outcanvas.height);
//draw trees
var root=[psh.marginsall[0][0], psh.marginsall[0][1]];
for(mmi=0;mmi<mm.length;mmi++){
var m=mm[mmi];
Expand All @@ -96,7 +100,7 @@ var drawTree=function(mm){
if(mmi>0)root[1]+=psh.marginmatrices; // margin for matrices
//draw root
var text = "r";
ctx.strokeStyle='black';
ctx.fillStyle='black';
ctx.font = String(psh.fontsize)+'px Segoe UI';
textwidth = ctx.measureText(text).width;
textheight = psh.fontsize;
Expand Down Expand Up @@ -143,7 +147,7 @@ var drawTree=function(mm){

// stroke text
text = String(m[ci][1]);
ctx.strokeStyle='black';
ctx.fillStyle='black';
ctx.font = String(psh.fontsize)+'px Segoe UI';
textwidth = ctx.measureText(text).width;
textheight = psh.fontsize;
Expand Down

0 comments on commit 626c524

Please sign in to comment.