updated todo and some very minor tweeks...

Signed-off-by: Alex A. Naanou <alex.nanou@gmail.com>
This commit is contained in:
Alex A. Naanou 2013-02-20 21:35:35 +04:00
parent a1f8488488
commit 1873e6a147
3 changed files with 52 additions and 18 deletions

View File

@ -1,11 +1,30 @@
[_] 37% Priority work [_] 36% Priority work
[_] 0% TouchSwipe issues... [_] 63% general todo
[_] BUG: swipe-back does not cancel a swipe... (TouchSwipe) [_] JSON load/save
| ...unless the finger is return to within the threshold of the [_] 0% Version 1.0 checklist (migration to layout.html)
| touchdown point. [_] page scaling for full page view
[_] BUG: no drag threshold on excludedElements (TouchSwipe) [_] top/bottom toolbars
| stalled... [_] splash screen w. logo
[_] 65% general todo [_] 0% bells 'n' whistles
[_] navigator
[_] bookmarks
[_] article navigation
[_] URL navigation
[_] layers (URL-activated)
[_] 0% overlay pages
[_] credits & copyright
[_] basic user config
[_] help and instructions
[_] issue selection & related navigation
| essentially a special magazine that will load other magazines
| instead of going into a full page view...
[_] 0% Editor version 1.0 checklist
[_] editor toolbar
| this can take two forms:
| - global
| - relative to page
| - mixed (preferred)
[_] save/load JSON
[_] 60% build a custom scroll lib... [_] 60% build a custom scroll lib...
[X] 100% features: [X] 100% features:
[X] drag/scroll [X] drag/scroll
@ -69,11 +88,6 @@
[_] scrollend [_] scrollend
[_] 0% snap [_] 0% snap
[_] snapped [_] snapped
[_] 0% EXPERIMENT: Try using scroll instead of left of .magazine....
[_] try and get rid of .scroller
[_] try using the scroll event to see of we reached the limit...
| and move the limit accordingly
[_] BUG: scrool seems to do odd things on refresh...
[_] BUG: loading a magazine with position set to 0 will align it incorrectly. [_] BUG: loading a magazine with position set to 0 will align it incorrectly.
| needs testing with the rewritten fitNPages()... | needs testing with the rewritten fitNPages()...
[_] Editor: might be a good idea to prevent deleting the last page... [_] Editor: might be a good idea to prevent deleting the last page...
@ -86,14 +100,14 @@
| a virtual page at the end of the magazine with magazine-specific | a virtual page at the end of the magazine with magazine-specific
| settings. | settings.
| similar to the current configuration demo page. | similar to the current configuration demo page.
[_] 20% move some of the current configuration options to the magazine... [_] 60% move some of the current configuration options to the magazine...
[X] page align [X] page align
| global, magazine, article, page-set, page | global, magazine, article, page-set, page
[_] resize settings (.no-resize class) [X] resize settings (.no-resize class)
| global, magazine, article, page-set, page | global, magazine, article, page-set, page
[_] default page/content size [_] default page/content size
| global, magazine, article | global, magazine, article
[_] fit page to view [X] fit page to view
| global, magazine, article | global, magazine, article
[_] drag full page [_] drag full page
| global, magazine | global, magazine
@ -155,6 +169,11 @@
[_] BUG: href to existing anchors will mess up layout... [_] BUG: href to existing anchors will mess up layout...
| need to find out how can we disable anchor links from actually | need to find out how can we disable anchor links from actually
| going to the anchor... | going to the anchor...
[_] 0% EXPERIMENT: Try using scroll instead of left of .magazine....
[_] try and get rid of .scroller
[_] try using the scroll event to see of we reached the limit...
| and move the limit accordingly
[_] BUG: scrool seems to do odd things on refresh...
[X] check if scrollTo knows about element scaling... [X] check if scrollTo knows about element scaling...
| if not update the code.... | if not update the code....
[X] Editor: make the editor switchable... [X] Editor: make the editor switchable...
@ -368,6 +387,12 @@
[_] 0% issue download [_] 0% issue download
[_] whole edition dowload and update (primary mode) [_] whole edition dowload and update (primary mode)
[_] seporate issue download (secondary) [_] seporate issue download (secondary)
[_] 0% TouchSwipe issues...
[_] BUG: swipe-back does not cancel a swipe... (TouchSwipe)
| ...unless the finger is return to within the threshold of the
| touchdown point.
[_] BUG: no drag threshold on excludedElements (TouchSwipe)
| stalled...
[_] 0% Low priority todo [_] 0% Low priority todo
[_] look into HPub ebook spec... [_] look into HPub ebook spec...

View File

@ -116,6 +116,7 @@ $(document).ready(function(){
window.CLICK_THRESHOLD = 10 window.CLICK_THRESHOLD = 10
window.SNAP_TO_PAGES_IN_RIBBON = false window.SNAP_TO_PAGES_IN_RIBBON = false
window.INITIAL_TIME = 200 window.INITIAL_TIME = 200
window.LONG_CLICK_THRESHOLD = 400
// XXX make this a default setup in the lib... // XXX make this a default setup in the lib...
window.MagazineScroller = makeScrollHandler($('.viewer'), { window.MagazineScroller = makeScrollHandler($('.viewer'), {
@ -123,7 +124,9 @@ $(document).ready(function(){
vScroll: false, vScroll: false,
// XXX the callback signature is a tad messy, revise... // XXX the callback signature is a tad messy, revise...
callback: function(evt, speed, distance, touches, state){ // XXX need ability to dampen innertia, add some kind of resistance...
callback: function(evt, speed, distance, duration, touches, state){
console.log(duration)
// canceling a scroll... // canceling a scroll...
if(state == 'canceling' && togglePageView('?') == 'on'){ if(state == 'canceling' && togglePageView('?') == 'on'){
setCurrentPage() setCurrentPage()
@ -138,6 +141,9 @@ $(document).ready(function(){
// click/tap... // click/tap...
if(Math.abs(distance) < CLICK_THRESHOLD){ if(Math.abs(distance) < CLICK_THRESHOLD){
if(duration > LONG_CLICK_THRESHOLD){
return alert('long click...')
}
// click... // click...
var target = $(evt.target) var target = $(evt.target)
target = getPageNumber( target = getPageNumber(

View File

@ -504,6 +504,7 @@ function makeScrollHandler(root, config){
var touches = 0 var touches = 0
var start_x var start_x
var start_y var start_y
var start_t
var prev_x var prev_x
var prev_y var prev_y
var prev_t var prev_t
@ -539,6 +540,7 @@ function makeScrollHandler(root, config){
return false return false
} }
prev_t = event.timeStamp || Date.now(); prev_t = event.timeStamp || Date.now();
start_t = prev_t
if(scroller.options.autoCancelEvents){ if(scroller.options.autoCancelEvents){
bounds = { bounds = {
left: scroller.options.eventBounds, left: scroller.options.eventBounds,
@ -616,6 +618,7 @@ function makeScrollHandler(root, config){
} }
function endMoveHandler(evt){ function endMoveHandler(evt){
t = event.timeStamp || Date.now();
touches = touch ? event.touches.length : 0 touches = touch ? event.touches.length : 0
if(ignoring){ if(ignoring){
if(touches == 0){ if(touches == 0){
@ -643,7 +646,7 @@ function makeScrollHandler(root, config){
if(scroller.options.callback if(scroller.options.callback
// XXX revise this.... // XXX revise this....
// call the callback... // call the callback...
&& scroller.options.callback(evt, dx/dt, start_x-x, touches, scroller.state) === false && scroller.options.callback(evt, dx/dt, start_x-x, t-start_t, touches, scroller.state) === false
|| touches == 0){ || touches == 0){
// cleanup and stop... // cleanup and stop...
touch = false touch = false