diff --git a/TODO.otl b/TODO.otl index 703d045..221c5ab 100755 --- a/TODO.otl +++ b/TODO.otl @@ -64,6 +64,11 @@ | e.g. setting "shown"/"hidden" classes in HTML and adding | something like a page reset that will restore the default state, | rather than the current "hideLayers" + [_] make #URLs magazine-specific... + [_] make #actions a configurable framework... + | rather than being hard-coded as they are now... + [_] BUG: browser history on internal links is broken... + | ...with both UPDATE_HASH_URL_POSITION and FULL_HISTORY_ENABLED false. [_] BUG: as on android, on loading from json view does not reach cur page... | likely due to animation/transition stopping for some reason.... [_] BUG: togglePageView results in jumpy animation if USE_REAL_PAGE_SIZES is set @@ -75,6 +80,7 @@ | a burst as possible, [_] BUG: when #URL updates are off layer toggling breaks... | will show but not hide layers... + [_] BUG: 3 fingers+ do not work on android... [_] BUG: href to existing anchors will mess up layout... | need to find out how can we disable anchor links from actually | going to the anchor... diff --git a/magazine.js b/magazine.js index 03eafd9..c49dd74 100755 --- a/magazine.js +++ b/magazine.js @@ -97,14 +97,35 @@ function updateView(){ /********************************************************* helpers ***/ +// this will get the current active alignment... +// NOTE: align can be set for: +// - page +// - article +// - magazine +// - app (via. FULL_PAGE_ALIGN) +// NOTE: the more local setting takes priority over the more general. function getPageAlign(page){ if(page == null){ page = $('.current.page') } + + var mag = $('.magazine') + var article = page.parents('.article').first() + + // first check the page... return (page.hasClass('page-align-center') ? 'center' - : page.hasClass('page-align-left') ? 'left' - : page.hasClass('page-align-right') ? 'right' - : FULL_PAGE_ALIGN) + : page.hasClass('page-align-left') ? 'left' + : page.hasClass('page-align-right') ? 'right' + // then the article... + : article.hasClass('page-align-center') ? 'center' + : article.hasClass('page-align-left') ? 'left' + : article.hasClass('page-align-right') ? 'right' + // then the magazine... + : mag.hasClass('page-align-center') ? 'center' + : mag.hasClass('page-align-left') ? 'left' + : mag.hasClass('page-align-right') ? 'right' + // now for the app default... + : FULL_PAGE_ALIGN) }