diff options
author | iainp5 <iain.pearce.ip@gmail.com> | 2024-09-29 13:26:50 +0100 |
---|---|---|
committer | iainp5 <iain.pearce.ip@gmail.com> | 2024-09-29 13:26:50 +0100 |
commit | 794f1b8e6d6cb7d58c3036241e2bd355bc55ece6 (patch) | |
tree | 02e989bf8803295e607d2952d466f7d4ac7ca3a1 /play.js | |
parent | d8046647bc35ee2007df85111bccb240ddd00032 (diff) | |
download | 1989-dawn-of-freedom-794f1b8e6d6cb7d58c3036241e2bd355bc55ece6.tar.gz |
Changes to reduce size of game object
Diffstat (limited to 'play.js')
-rw-r--r-- | play.js | 9 |
1 files changed, 5 insertions, 4 deletions
@@ -7,7 +7,8 @@ const options = 'none' const last_card = 110
const last_power_card = 52
let hover_timeout
-
+const height = 65
+const width = 105
const toolbar = document.getElementById('toolbar')
const vpMarker = document.getElementById('vp')
const counters = document.getElementById('counters')
@@ -67,14 +68,14 @@ const spaceCharacteristicsElement = document.getElementById('space-characteristi if (space && space.box) {
//CREATE SPACES
- const { x, y, h, w } = space.box;
+ const { x, y} = space.box;
const spaceArea = document.createElement('div');
spaceArea.classList.add('space-area', space.country)
spaceArea.id=`space_${space.space_id}`;
spaceArea.style.left = x + 'px';
spaceArea.style.top = y + 'px';
- spaceArea.style.width = w + 'px';
- spaceArea.style.height = h + 'px';
+ spaceArea.style.width = width + 'px';
+ spaceArea.style.height = height + 'px';
spaceArea.style.zIndex = 2;
spaceArea.my_space = space.name_unique;
spaceArea.addEventListener('mousedown', on_click_space);
|