projects
/
brackets.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
692ff64
)
Draw artist in direction based on group
author
Jacob Casper
<dev@jacobcasper.com>
Sun, 19 Apr 2020 04:21:00 +0000
(23:21 -0500)
committer
Jacob Casper
<dev@jacobcasper.com>
Sun, 19 Apr 2020 04:21:00 +0000
(23:21 -0500)
frontend/index.js
patch
|
blob
|
blame
|
history
diff --git
a/frontend/index.js
b/frontend/index.js
index
c45341a
..
d49372f
100644
(file)
--- a/
frontend/index.js
+++ b/
frontend/index.js
@@
-77,7
+77,6
@@
const drawBranchFrom = (ctx, x, y, xDist, yDist, left, up) => {
const drawArtistOnCtx = (ctx, artistName, x, y) => {
ctx.font = "1em sans serif";
const drawArtistOnCtx = (ctx, artistName, x, y) => {
ctx.font = "1em sans serif";
- ctx.direction = "ltr";
ctx.strokeText(artistName, x, y);
}
ctx.strokeText(artistName, x, y);
}
@@
-91,6
+90,7
@@
const drawMatchup = (canvas, x, y, iter, maxIter, left, artists, baseCallback) =
return baseCallback(x, y);
}
const ctx = canvas.getContext("2d");
return baseCallback(x, y);
}
const ctx = canvas.getContext("2d");
+ ctx.direction = left === -1 ? "ltr" : "rtl";
const [width, height] = getDimensions(canvas);
const drawBranchUp = (xDist, yDist) => drawBranchFrom(ctx, x, y, xDist, yDist, left, -1);
const [width, height] = getDimensions(canvas);
const drawBranchUp = (xDist, yDist) => drawBranchFrom(ctx, x, y, xDist, yDist, left, -1);
@@
-122,7
+122,6
@@
const drawMatchup = (canvas, x, y, iter, maxIter, left, artists, baseCallback) =
artists,
drawArtist2,
);
artists,
drawArtist2,
);
- ctx.stroke();
}
const drawBracket = (canvas, artists) => {
}
const drawBracket = (canvas, artists) => {