-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
15 changed files
with
13,833 additions
and
0 deletions.
There are no files selected for viewing
File renamed without changes.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,100 @@ | ||
<!DOCTYPE html> | ||
<html> | ||
<head> | ||
<meta http-equiv="content-type" content="text/html; charset=UTF-8"> | ||
<title>100x100 reversi with pannable & zoomable game area</title> | ||
|
||
<script type='text/javascript' src='jquery-1.11.0.js'></script> | ||
|
||
|
||
|
||
|
||
<link rel="stylesheet" type="text/css" href="reversi.css"> | ||
|
||
|
||
<script type='text/javascript' src="jquery.panzoom.js"></script> | ||
|
||
|
||
|
||
<script type='text/javascript' src="jquery.mousewheel.js"></script> | ||
|
||
|
||
<style type='text/css'> | ||
|
||
</style> | ||
|
||
|
||
|
||
<script type='text/javascript'>//<![CDATA[ | ||
$(window).load(function(){ | ||
(function ($) { | ||
|
||
var $parent = $('#floor_plan'); | ||
|
||
if($parent.length) { | ||
|
||
// set-up panzoom | ||
var $panzoom = $parent.find('.panzoom').panzoom({ | ||
increment : 0.5, | ||
minScale : 0.4, | ||
maxScale : 8, | ||
startTransform : 'scale(4.0)', | ||
$zoomIn : $parent.find('A[href=#zoom_in]'), | ||
$zoomOut : $parent.find('A[href=#zoom_out]'), | ||
contain : 'invert' | ||
}).panzoom('zoom', true); | ||
|
||
// handle scrolling in and out | ||
$panzoom.parent().on('mousewheel.focal', function (e) { | ||
|
||
e.preventDefault(); | ||
|
||
var delta = e.delta || e.originalEvent.wheelDelta; | ||
var zoomOut = delta ? delta < 0 : e.originalEvent.deltaY > 0; | ||
|
||
$panzoom.panzoom('zoom', zoomOut, { | ||
increment : 0.1, | ||
animate : false, | ||
focal : e | ||
}); | ||
}); | ||
} | ||
})(jQuery); | ||
});//]]> | ||
|
||
</script> | ||
|
||
|
||
</head> | ||
<body> | ||
<div id="floor_plan" class="hidden-xs hidden-sm"> | ||
|
||
<div class="zoom-control"> | ||
<a href="#zoom_in"><i class="fa fa-fw fa-plus-square-o"></i></a> | ||
<a href="#zoom_out"><i class="fa fa-fw fa-minus-square-o"></i></a> | ||
</div> | ||
<div class="close"> | ||
<a href="#close_floor_plan"><i class="fa fa-fw fa-times"></i></a> | ||
</div> | ||
|
||
<div class="panzoom"> | ||
<!-- | ||
<h1>100x100 reversi</h1> | ||
<img src="awesome_tiger.svg" alt="Floor Plan" style="width: 100%; height: auto; display: block" /> | ||
--> | ||
<div id="playground"/> | ||
</div> | ||
<script type='text/javascript' src="reversi.js"></script> | ||
<script> | ||
window.onload = function() { | ||
|
||
reversi.init('playground'); | ||
}; | ||
</script> | ||
</div> | ||
|
||
</body> | ||
|
||
|
||
</html> | ||
|
Oops, something went wrong.