Skip to content

Commit

Permalink
Merge pull request #18 from inQWIRE/bhakti-branch
Browse files Browse the repository at this point in the history
whitespace-fixes
  • Loading branch information
bhaktishh authored Jul 3, 2023
2 parents bbe5760 + 2b6c75a commit 23067e5
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 7 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "vizx",
"displayName": "ViZX",
"description": "Visualizer for the ZX calculus",
"version": "0.1.1",
"version": "0.1.2",
"repository": "https://github.com/inQWIRE/ViZX/",
"publisher": "inQWIRE",
"engines": {
Expand Down
8 changes: 4 additions & 4 deletions src/constants/variableconsts.ts
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,8 @@ export function scaleDown() {
FUNCTION_DASH = [0.03 * SCALE, 0.01 * SCALE];
}

export let CANVAS_WIDTH = 500;
export let CANVAS_HEIGHT = 500;
export let CANVAS_WIDTH = 100;
export let CANVAS_HEIGHT = 100;

// SCALE = size of base square, ideally do not go below 100 or it'll be too small
export let SCALE = 100;
Expand All @@ -61,8 +61,8 @@ export let MEDIUM_TEXT = (SCALE / 7).toString().concat("px");
export let LARGE_TEXT = (SCALE / 2).toString().concat("px");
export let MONOSPACE_FONT = "Monospace";
export let ARIAL_FONT = "Arial";
export let HOR_PAD = 0.01 * SCALE;
export let VER_PAD = 0.01 * SCALE;
export let HOR_PAD = 0.1 * SCALE;
export let VER_PAD = 0.1 * SCALE;
export let STACK_DASH: [number, number] = [0.06 * SCALE, 0.06 * SCALE];
export let COMPOSE_DASH: [number, number] = [0.16 * SCALE, 0.16 * SCALE];
export let CAST_DASH: [number, number] = [0.02 * SCALE, 0.02 * SCALE];
Expand Down
6 changes: 4 additions & 2 deletions src/parsing/sizes.ts
Original file line number Diff line number Diff line change
Expand Up @@ -287,7 +287,9 @@ export function determineCanvasWidthHeight(
): [number, number] {
const max_width = node.hor_len!;
const max_height = node.ver_len!;
let ver = SCALE - (max_height % SCALE) + max_height + 2 * HOR_PAD;
let hor = SCALE - (max_width % SCALE) + max_width + 2 * VER_PAD;
console.log("max width; ", max_width, "max_height; ", max_height);
let ver = max_height + 2 * HOR_PAD;
let hor = max_width + 2 * VER_PAD;
console.log("hor; ", hor, "ver; ", ver);
return [hor, ver];
}

0 comments on commit 23067e5

Please sign in to comment.