-# table_size = [300, 200]
+table_size = [300, 100]
[[pieces]]
pos = [90,80]
#[serde(try_from="f64")]
pub struct ZCoord(pub f64);
-pub const DEFAULT_TABLE_SIZE : Pos = [ 200, 100 ];
+pub const DEFAULT_TABLE_SIZE : Pos = [ 400, 200 ];
// ---------- general data types ----------
ctoken : String,
player : PlayerId,
gen : Generation,
+ table_size : Pos,
uses : Vec<SessionPieceContext>,
defs : Vec<(VisiblePieceId,String)>,
nick : String,
ctoken : ctoken.0,
gen : ig.gs.gen,
log : ig.gs.log.clone(),
+ table_size : ig.gs.table_size,
player,
defs : alldefs,
uses,
<p>
<svg id="space"
- xmlns="http://www.w3.org/2000/svg" viewBox="0 0 400 110"
+ xmlns="http://www.w3.org/2000/svg"
+ viewBox="0 0 {{ table_size[0] }} {{ table_size[1] }}"
onmousedown="some_mousedown(event)"
>
- <rect fill="green" x="20" y="5" width="200" height="100"/>
+ <rect fill="green" x="0" y="0"
+ width="{{ table_size[0] }}" height="{{ table_size[1] }}"/>
<g id="pieces_marker"></g>
{%- for piece in uses %}
<use id="use{{ piece.id }}" href="#piece{{ piece.id }}"