some cleanup and fixes...

Signed-off-by: Alex A. Naanou <alex.nanou@gmail.com>
This commit is contained in:
Alex A. Naanou 2014-04-19 19:54:42 +04:00
parent fc8b17910e
commit 856394806d
2 changed files with 19 additions and 14 deletions

View File

@ -592,6 +592,10 @@ div.page-number-text {
bottom: 0px; bottom: 0px;
left: 0px; left: 0px;
text-align: left;
overflow: visible;
white-space: normal;
box-sizing: border-box; box-sizing: border-box;
-moz-box-sizing:border-box; -moz-box-sizing:border-box;
-webkit-box-sizing:border-box; -webkit-box-sizing:border-box;

View File

@ -366,14 +366,20 @@ $(function(){
window.MULTI_FINGER_RELEASE_TIMEOUT = 50 window.MULTI_FINGER_RELEASE_TIMEOUT = 50
$('.viewer') $('.magazine')
.on('tap', function(){ .on('tap', function(){
// XXX for some reason this does not focus the page clicked var target = $(event.target)
// if it's not the current and we are in page view...
focusPage(event.target, togglePageView('?') == 'on' ? 'auto' : 'center')
handleCaption(event.target) // trigger this ONLY if no page change has happened...
if(target.hasClass('current') || target.parents('.current.page').length != 0){
handleCaption(target)
}
// focus the page...
focusPage(target, togglePageView('?') == 'on' ? 'auto' : 'center')
}) })
$('.viewer')
.on('touchstart', function(){ .on('touchstart', function(){
// This is here to recover from touching a finger after // This is here to recover from touching a finger after
// lifting it before the timeout... // lifting it before the timeout...
@ -452,13 +458,6 @@ $(function(){
}) })
*/ */
window.MagazineScroller
.on('scrollCancel', function(){
if(togglePageView('?') == 'on'){
focusPage(setCurrent(centeredPage()))
}
})
// XXX is this needed??? // XXX is this needed???
window.MagazineScroller window.MagazineScroller
.on('scrollEnd', function(){ .on('scrollEnd', function(){
@ -499,12 +498,12 @@ $(function(){
'left': 0, 'left': 0,
}) })
/*
$('.viewer') $('.viewer')
.on('mouseup tapup', function(){ .on('mouseup tapup', function(){
//MagazineScroller.scrollToElement(getVisiblePage()[0], 300, true, true) //MagazineScroller.scrollToElement(getVisiblePage()[0], 300, true, true)
}) })
/*
.on('scrollCancelled', function(){ setCurrentPage() }) .on('scrollCancelled', function(){ setCurrentPage() })
.on('shortClick', handleCaption) .on('shortClick', handleCaption)
.on('shortClick', handleClick) .on('shortClick', handleClick)
@ -513,10 +512,10 @@ $(function(){
.on('swipeRight', handleSwipeRight) .on('swipeRight', handleSwipeRight)
.on('swipeUp swipeDown', function(){ togglePageView('off') }) .on('swipeUp swipeDown', function(){ togglePageView('off') })
.on('screenReleased', handleScrollRelease) .on('screenReleased', handleScrollRelease)
*/
.on('pageChanged', updatePageNumberIndicator) .on('pageChanged', updatePageNumberIndicator)
.on('magazineDataLoaded', loadMagazineChrome) .on('magazineDataLoaded', loadMagazineChrome)
*/
$('.settings.button') $('.settings.button')
.click(function(){ .click(function(){
@ -552,6 +551,7 @@ $(function(){
$('.splash').fadeOut() $('.splash').fadeOut()
}, 350) }, 350)
// remove the spinner... // remove the spinner...
setTimeout(function(){ setTimeout(function(){
$('#spinner').spin(false) $('#spinner').spin(false)
@ -1181,6 +1181,7 @@ $(function(){
</div> </div>
<!-- Magazine Viewer (end) ------------------------------------------> <!-- Magazine Viewer (end) ------------------------------------------>
</div> </div>
<!-- Magazine Chrome (end) --> <!-- Magazine Chrome (end) -->