Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

[generate-board] arrows turn red when pushed

  • Loading branch information...
commit f054dadda320a54356684bc71dde736376303b67 1 parent 09d1abb
@masak authored
Showing with 15 additions and 5 deletions.
  1. +15 −5 bin/generate-board
View
20 bin/generate-board
@@ -93,24 +93,34 @@ sub piece($color, $row, $column, $height) {
}
sub rotate-widget {
- ' <path
+ ' <script type="text/ecmascript"> <![CDATA[
+ function rotate(evt) {
+ var arrow = evt.target;
+ arrow.setAttribute("style", "fill:#880000;stroke:#000000;stroke-width:0.5px");
+ }
+ ]]> </script>
+ <path
d="M 365,406 L 365,441 C 365,448 393,454 427,454 C 461,454 489,448 489,441 L 489,406 C 486,414 460,420 427,420 C 393,420 365,414 365,406 z"
style="fill:none;stroke:#000000" />
<path
d="M 408,388 C 406,399 405,414 405,430 C 405,446 406,475 408,485 C 414,486 419,486 425,486 C 432,486 439,486 445,485 C 447,474 449,446 449,430 C 449,414 447,399 445,388 C 437,388 433,389 427,389 C 420,389 414,388 408,388 z"
style="fill:none;stroke:#000000" />
<path
+ onclick="rotate(evt)"
d="M 454,427 L 470,427 L 470,421 L 483,433 L 470,445 L 470,439 L 454,439 L 454,427 z"
- style="fill:none;stroke:#000000;stroke-width:0.5px" />
+ style="fill:#ffffff;stroke:#000000;stroke-width:0.5px" />
<path
+ onclick="rotate(evt)"
d="M 399,428 L 383,428 L 383,422 L 370,434 L 383,446 L 383,440 L 399,440 L 399,428 z"
- style="fill:none;stroke:#000000;stroke-width:0.5px" />
+ style="fill:#ffffff;stroke:#000000;stroke-width:0.5px" />
<path
+ onclick="rotate(evt)"
d="M 421,418 L 421,402 L 415,402 L 427,389 L 439,402 L 433,402 L 433,418 L 421,418 z"
- style="fill:none;stroke:#000000;stroke-width:0.5px" />
+ style="fill:#ffffff;stroke:#000000;stroke-width:0.5px" />
<path
+ onclick="rotate(evt)"
d="M 422,455 L 422,471 L 416,471 L 428,485 L 439,471 L 433,471 L 433,455 L 422,455 z"
- style="fill:none;stroke:#000000;stroke-width:0.5px" />
+ style="fill:#ffffff;stroke:#000000;stroke-width:0.5px" />
'
}
Please sign in to comment.
Something went wrong with that request. Please try again.