|
33 | 33 | var a = l('button') |
34 | 34 | return ( |
35 | 35 | (a.innerText = t), |
36 | | - (a.style = `width: 20px; position: absolute; top: ${o}px; left: ${e}px`), |
| 36 | + (a.style = `width: 44px; height: 44px; position: absolute; top: ${o}px; left: ${e}px; cursor: pointer; display: flex; align-items: center; justify-content: center; background: white; border: 1px solid #ccc; border-radius: 4px;`), |
37 | 37 | a.addEventListener('click', () => this.#o(i, h, s)), |
38 | 38 | a |
39 | 39 | ) |
40 | 40 | } |
41 | 41 | #p() { |
42 | 42 | var t = l('div') |
43 | 43 | ;((t.style = 'height: 100%; width: 100%; position: absolute; top: 0px; left: 0px'), |
| 44 | + // Up button |
44 | 45 | t.append(this.#h('\u25b2', 0, 1, 0, 40, 20)), |
45 | | - t.append(l('br')), |
46 | | - t.append(this.#h('\u25c0', -1, 0, 0, 20, 40)), |
47 | | - t.append(this.#h('\u25b6', 1, 0, 0, 60, 40)), |
48 | | - t.append(l('br')), |
49 | | - t.append(this.#h('\u25bc', 0, -1, 0, 40, 60)), |
50 | | - t.append(l('br')), |
51 | | - t.append(this.#h('+', 0, 0, 1, 40, 100)), |
52 | | - t.append(l('br')), |
53 | | - t.append(this.#h('-', 0, 0, -1, 40, 120)), |
| 46 | + // Left button |
| 47 | + t.append(this.#h('\u25c0', -1, 0, 0, 8, 72)), |
| 48 | + // Right button |
| 49 | + t.append(this.#h('\u25b6', 1, 0, 0, 72, 72)), |
| 50 | + // Down button |
| 51 | + t.append(this.#h('\u25bc', 0, -1, 0, 40, 124)), |
| 52 | + // Zoom in button |
| 53 | + t.append(this.#h('+', 0, 0, 1, 40, 176)), |
| 54 | + // Zoom out button |
| 55 | + t.append(this.#h('-', 0, 0, -1, 40, 228)), |
54 | 56 | this.map.append(t)) |
55 | 57 | } |
56 | 58 | #l(t, i, h, s, e) { |
|
0 commit comments