diff --git a/layout-iscroll2.html b/layout-iscroll2.html
index 5536754..a0ccdb6 100755
--- a/layout-iscroll2.html
+++ b/layout-iscroll2.html
@@ -109,6 +109,7 @@ $(document).ready(function(){
var _x = null
var _t = null
var _s = null
+ var _scale = null
// XXX this is a stub, but need to keep the two types of events
// seporated as mouse events sometimes interfere with touch events...
@@ -122,6 +123,7 @@ $(document).ready(function(){
scrolling = true
//togglePageDragging('on')
_s = getMagazineShift()
+ _scale = getMagazineScale()
})
.on('touchmove', function(evt){
evt.preventDefault()
@@ -134,7 +136,7 @@ $(document).ready(function(){
if(scrolling){
//logger.log('>>>' + s)
_s += x - _x
- shiftMagazineTo(_s)
+ shiftMagazineTo(_s, _scale)
}
_x = x
})
@@ -144,6 +146,7 @@ $(document).ready(function(){
//togglePageDragging('off')
_x = null
_s = null
+ _scale = null
})
} else {
@@ -156,6 +159,7 @@ $(document).ready(function(){
scrolling = true
//togglePageDragging('on')
_s = getMagazineShift()
+ _scale = getMagazineScale()
})
.on('mousemove', function(evt){
//var t = evt.timeStamp || Date.now();
@@ -168,7 +172,7 @@ $(document).ready(function(){
var x = pos_x
if(scrolling){
_s += x - _x
- shiftMagazineTo(_s)
+ shiftMagazineTo(_s, _scale)
}
_x = x
})
@@ -178,8 +182,11 @@ $(document).ready(function(){
//togglePageDragging('off')
_x = null
_s = null
+ _scale = null
})
- }
+ }
+
+ setMagazineScale(0.5)
// XXX need to setup style for android to work...
diff --git a/magazine.js b/magazine.js
index 90f6265..5643b8a 100755
--- a/magazine.js
+++ b/magazine.js
@@ -216,10 +216,11 @@ function getPageAt(n){
return $(page[n])
}
-function shiftMagazineTo(offset){
+function shiftMagazineTo(offset, scale){
var mag = $('.magazine')
- //var scale = getPageScale()
- var scale = 1
+ if(scale == null){
+ var scale = getElementScale(mag)
+ }
if(USE_TRANSFORM){
var transform = 'translate('+ offset +'px, 0px) scale('+ scale +') translateZ(0px)'
mag.css({