Skip to content

Commit 136f20a

Browse files
committed
add more vertical space for collection type title
1 parent abff17c commit 136f20a

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

js/types/objects.js

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ import { getName } from "../lib/getName.js";
88
import { linkTypes } from "./links.js";
99
import { parseCharge } from "../lib/parseCharge.js";
1010

11-
const TOP_MARGIN = 40;
11+
const TOP_MARGIN = 45;
1212

1313
class EDMObject {
1414
constructor() {
@@ -62,6 +62,7 @@ export class MCParticle extends EDMObject {
6262
this.texImg = null;
6363
this.color = "#dff6ff";
6464
this.radius = 15;
65+
this.height = 270;
6566
}
6667

6768
updateTexImg(text) {
@@ -85,7 +86,7 @@ export class MCParticle extends EDMObject {
8586
drawTex(
8687
ctx,
8788
boxCenterX,
88-
this.y + this.height * 0.4,
89+
this.y + TOP_MARGIN + 80,
8990
this.texImg,
9091
this.width
9192
);
@@ -94,7 +95,7 @@ export class MCParticle extends EDMObject {
9495
drawTex(
9596
ctx,
9697
boxCenterX,
97-
this.y + this.height * 0.4,
98+
this.y + TOP_MARGIN + 80,
9899
this.texImg,
99100
this.width
100101
);
@@ -107,7 +108,7 @@ export class MCParticle extends EDMObject {
107108
topLines.push("Gen. stat.: " + this.generatorStatus);
108109
topLines.push("Sim. stat.: " + this.simulatorStatus);
109110

110-
const bottomY = this.y + this.height * 0.6;
111+
const bottomY = this.y + this.height * 0.65;
111112
const bottomLines = [];
112113
bottomLines.push("p = " + this.momentum + " GeV");
113114
bottomLines.push("d = " + this.vertex + " mm");

0 commit comments

Comments
 (0)