Skip to content

Commit

Permalink
modified: index.html
Browse files Browse the repository at this point in the history
	new file:   js/jquery-1.10.2.js
	new file:   js/jquery-ui.js
	new file:   js/jquery.mobile-1.4.5.min.js
	new file:   js/jquery.ui.touch-punch.min.js
	deleted:    d3.v3.min.js
	deleted:    hexbin.js
	deleted:    oct.png
  • Loading branch information
ChungChe committed Jul 24, 2015
1 parent 40f66a4 commit f4e769e
Show file tree
Hide file tree
Showing 5 changed files with 26,455 additions and 1 deletion.
29 changes: 28 additions & 1 deletion index.html
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
<!DOCTYPE html>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<script src="https://code.jquery.com/jquery-1.11.3.min.js"></script>
<script src="/js/jquery.mobile-1.4.5.min.js"></script>
<script src="/js/jquery.ui.touch-punch.min.js"></script>
<style>

.hexagon {
Expand All @@ -14,14 +18,37 @@
<svg id="mySvg" width="0" height="0">
<defs id="mdef">
<pattern id="image" x="-64" y="-48" height="96" width="129" patternUnits="userSpaceOnUse">
<image x="0" y="0" width="129" height="96" xlink:href="/image/oct.png"></image>
<image x="0" y="0" width="129" height="96" xlink:href="/image/oct.png" id="myImg1"></image>
</pattern>
</defs>
</svg>
<script src="/js/d3.v3.min.js"></script>
<script src="/js/hexbin.js"></script>
<script>

var imgWidth = 0;
var imgHeight = 0;
$(function() {
var img = new Image();
img.onload = function() {
imgWidth = img.width;
imgHeight = img.height;
console.log("width="+imgWidth+", "+imgHeight);
}
img.src = '/image/oct.png';

$(".hexagon").mouseenter(function() {
$(this).attr("d", hexbin.hexagon(52))
.css("stroke", "#f00")
});

$(".hexagon").mouseleave(function() {
$(this).attr("d", hexbin.hexagon(45))
.css("stroke", "#000")
});

});

var w = window,
d = document,
e = d.documentElement,
Expand Down
Loading

0 comments on commit f4e769e

Please sign in to comment.