Skip to content

Commit

Permalink
Deploy preview for PR 58 🛫
Browse files Browse the repository at this point in the history
  • Loading branch information
brauliorivas committed Jul 17, 2024
1 parent a1e87e8 commit e20dae5
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions pr-preview/pr-58/js/types/objects.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import { getName } from "../lib/getName.js";
import { linkTypes } from "./links.js";
import { parseCharge } from "../lib/parseCharge.js";

const TOP_MARGIN = 40;
const TOP_MARGIN = 45;

class EDMObject {
constructor() {
Expand Down Expand Up @@ -62,6 +62,7 @@ export class MCParticle extends EDMObject {
this.texImg = null;
this.color = "#dff6ff";
this.radius = 15;
this.height = 270;
}

updateTexImg(text) {
Expand All @@ -85,7 +86,7 @@ export class MCParticle extends EDMObject {
drawTex(
ctx,
boxCenterX,
this.y + this.height * 0.4,
this.y + TOP_MARGIN + 80,
this.texImg,
this.width
);
Expand All @@ -94,7 +95,7 @@ export class MCParticle extends EDMObject {
drawTex(
ctx,
boxCenterX,
this.y + this.height * 0.4,
this.y + TOP_MARGIN + 80,
this.texImg,
this.width
);
Expand All @@ -107,7 +108,7 @@ export class MCParticle extends EDMObject {
topLines.push("Gen. stat.: " + this.generatorStatus);
topLines.push("Sim. stat.: " + this.simulatorStatus);

const bottomY = this.y + this.height * 0.6;
const bottomY = this.y + this.height * 0.65;
const bottomLines = [];
bottomLines.push("p = " + this.momentum + " GeV");
bottomLines.push("d = " + this.vertex + " mm");
Expand Down

0 comments on commit e20dae5

Please sign in to comment.