mirror of
https://github.com/flynx/ImageGrid.git
synced 2025-10-29 02:10:08 +00:00
152 lines
2.5 KiB
HTML
Executable File
152 lines
2.5 KiB
HTML
Executable File
<!DOCTYPE html>
|
|
<html>
|
|
<style>
|
|
/* XXX appears that there is no way to hide the scrollbar on FF...
|
|
* ...one way around this is to use something like iScroll/Scrolly
|
|
* on FF or where more control is needed...
|
|
*/
|
|
.viewer {
|
|
display: inline-block;
|
|
border: solid 1px gray;
|
|
|
|
width: 600px;
|
|
height: 500px;
|
|
|
|
overflow: hidden;
|
|
|
|
overflow-x: hidden;
|
|
overflow-y: scroll;
|
|
|
|
-ms-overflow-style: none;
|
|
}
|
|
.viewer::-webkit-scrollbar {
|
|
display: none;
|
|
}
|
|
|
|
|
|
|
|
/* This is to be used for:
|
|
* - vrtical positioning
|
|
* - scaling
|
|
* (update width to fit viewer)
|
|
*/
|
|
.ribbon-set {
|
|
position: relative;
|
|
display: inline-block;
|
|
|
|
/* This allways needs to be of viewer width, this mostly applies
|
|
* to scaling...
|
|
*/
|
|
width: 100%;
|
|
|
|
padding-top: 50%;
|
|
padding-bottom: 50%;
|
|
|
|
margin-left: -50%;
|
|
left: 50%;
|
|
|
|
|
|
transform-origin: 50% 50%;
|
|
/*transform: scale(0.5);*/
|
|
}
|
|
|
|
|
|
|
|
.ribbon-container {
|
|
position: relative;
|
|
|
|
height: 120px;
|
|
width: 100%;
|
|
|
|
overflow-x: scroll;
|
|
overflow-y: hidden;
|
|
|
|
-ms-overflow-style: none;
|
|
}
|
|
.ribbon-container::-webkit-scrollbar {
|
|
display: none;
|
|
}
|
|
|
|
|
|
|
|
.ribbon {
|
|
position: relative;
|
|
display: inline-block;
|
|
|
|
height: 100px;
|
|
width: 1000px;
|
|
|
|
background: silver;
|
|
/*box-shadow: 0px 0px 25px -10px rgba(0,0,0,0.75);*/
|
|
box-shadow: 0px 0px 25px -10px rgba(0,0,0,1);
|
|
|
|
/* start/end markers... */
|
|
border-left: 100px solid gray;
|
|
border-right: 100px solid gray;
|
|
|
|
margin: 10px;
|
|
|
|
margin-left: 50%;
|
|
/* XXX for some reason this does not work as expected */
|
|
margin-right: 50%;
|
|
}
|
|
|
|
</style>
|
|
|
|
<script src="../ext-lib/jquery.js"></script>
|
|
<script src="../ext-lib/jquery-ui.js"></script>
|
|
|
|
<script src="../ext-lib/velocity.min.js"></script>
|
|
|
|
<script src="../lib/jli.js"></script>
|
|
|
|
<script>
|
|
|
|
// XXX these accumolate errors...
|
|
var zoomIn = function(c){
|
|
c = c || 1.2
|
|
$('.ribbon-set')
|
|
.velocity('stop')
|
|
.css({
|
|
})
|
|
.velocity({
|
|
scale: '*='+c,
|
|
width: '/='+c,
|
|
'margin-left': '/='+c,
|
|
}, 300)
|
|
}
|
|
var zoomOut = function(c){
|
|
c = c || 1.2
|
|
$('.ribbon-set')
|
|
.velocity('stop')
|
|
.velocity({
|
|
scale: '/='+c,
|
|
width: '*='+c,
|
|
'margin-left': '*='+c,
|
|
}, 300)
|
|
}
|
|
|
|
</script>
|
|
|
|
<body>
|
|
|
|
<div class="viewer">
|
|
<div class="ribbon-set">
|
|
<div class="ribbon-container">
|
|
<div class="ribbon">
|
|
</div>
|
|
</div>
|
|
<div class="ribbon-container">
|
|
<div class="ribbon">
|
|
</div>
|
|
</div>
|
|
<div class="ribbon-container">
|
|
<div class="ribbon">
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
</body>
|
|
</html>
|