mirror of
				https://github.com/flynx/PortableMag.git
				synced 2025-10-31 12:00:11 +00:00 
			
		
		
		
	added page-align option ingeriting between app, mag, article and page, more cleanup and revisions...
Signed-off-by: Alex A. Naanou <alex.nanou@gmail.com>
This commit is contained in:
		
							parent
							
								
									a6ab8d33bd
								
							
						
					
					
						commit
						a79ef10057
					
				
							
								
								
									
										6
									
								
								TODO.otl
									
									
									
									
									
								
							
							
						
						
									
										6
									
								
								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... | ||||
|  | ||||
							
								
								
									
										21
									
								
								magazine.js
									
									
									
									
									
								
							
							
						
						
									
										21
									
								
								magazine.js
									
									
									
									
									
								
							| @ -97,13 +97,34 @@ 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'  | ||||
| 			// 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) | ||||
| } | ||||
| 
 | ||||
|  | ||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user