Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Added highlighting functionality to highlight arbitrary regions.

  • Loading branch information...
commit 06a127da9696f181090edb6ca1dbc4c59c4be1b6 1 parent 4256d46
Valentin Vasilyev authored
Showing with 100 additions and 76 deletions.
  1. +89 −75 russia.js
  2. +11 −1 test/index.html
View
164 russia.js
89 additions, 75 deletions not shown
View
12 test/index.html
@@ -4,13 +4,23 @@
<title>g.raphael-russia test</title>
<script src="js/raphael-min.js"></script>
<script src="../russia.js"></script>
+ <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js"></script>
</head>
<body>
<div id="paper"></div>
+ <button id="button1">hightlight 3 regions</button>
+ <button id="button2">unhightlight 3 regions</button>
<script type="text/javascript">
var r = Raphael('paper', 800, 484);
r.setViewBox(0, 0, 1650, 1000, true);
- r.russia();
+ var rus = r.russia();
+ $('#button1').click(function(){
+ rus.highlight([26, 23, 50]);
+ })
+
+ $('#button2').click(function(){
+ rus.unhighlight([26,23,50]);
+ })
</script>
</body>
</html>
Please sign in to comment.
Something went wrong with that request. Please try again.