aboutsummaryrefslogtreecommitdiff
path: root/app/utils.js
blob: 53ab424386c4f02f07f5b24fab07c7cbde4ff84e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
// Add zero in front of numbers < 10
export function zeroPad(i) {
  if (i < 10) {
    i = "0" + i;
  }
  return i;
}

export function drawDigit(val, place) {
  place.image = `quantifier/${val}.png`
  if (val == 1) {
    place.width = 11;
  } else {
    place.width = 18;
  }
}