chiark / gitweb /
fix debugging change and tidy
authorIan Jackson <ijackson@chiark.greenend.org.uk>
Sun, 12 Jul 2020 17:52:06 +0000 (18:52 +0100)
committerIan Jackson <ijackson@chiark.greenend.org.uk>
Sun, 12 Jul 2020 17:52:06 +0000 (18:52 +0100)
src/pieces.rs
templates/script.ts

index 63a987f79be669cc5fe8b7cbe3bad5e702cc93f7..96dc2814a9c951d83c585854765f4aa4070b39d9 100644 (file)
@@ -87,15 +87,8 @@ impl Piece for SimpleShape {
   fn svg_piece(&self, f: &mut String, pri: &PieceRenderInstructions) {
     write!(f, r##"<path fill="{}" d="{}"/>"##,
            self.colours[pri.face],
-           svg_rescale_path(&self.path, 0.5)?,
-    )?;
+           &self.path)?;
   }
-/*
-  #[throws(SE)]
-  fn outline_path(&self, _pri : &PieceRenderInstructions) -> String {
-    self.path.clone()
-  }
-*/
   #[throws(SE)]
   fn surround_path(&self, _pri : &PieceRenderInstructions) -> String {
     self.scaled_path.clone()
index 1a9212f8f5960a1dcfa00bf7be2aa570828adb4d..2fb6fa9e6488abb42298dfba6ed4648c8ffd7e3c 100644 (file)
@@ -52,13 +52,6 @@ type PieceInfo = {
   pelem : SVGGraphicsElement,
 }
 
-/*
-interface PieceMap {
-  [piece: string]: PieceInfo;
-}
-var pieces : PieceMap = new Map();
-*/
-
 let pieces : { [typeid: string]: PieceInfo } = Object();
     //Object.create(null);
 
@@ -260,7 +253,7 @@ function redisplay_ancillaries(piece: PieceId, p: PieceInfo) {
   if (piece == halo) {
     let nelem = ancillary_node(piece, 'yellow');
     if (p.held != null) {
-      nelem.setAttributeNS(null,'stroke-width','3px');
+      nelem.setAttributeNS(null,'stroke-width','2px');
     }
     p.pelem.prepend(nelem);
   }