mirror of
				https://github.com/flynx/pWiki.git
				synced 2025-10-31 19:10:08 +00:00 
			
		
		
		
	cleanup and notes...
Signed-off-by: Alex A. Naanou <alex.nanou@gmail.com>
This commit is contained in:
		
							parent
							
								
									97e511ce7e
								
							
						
					
					
						commit
						90cc88d22d
					
				| @ -29,7 +29,6 @@ function clickPoint(x,y){ | |||||||
| // box corresponds the to desired coordinates. This accounts for nested 
 | // box corresponds the to desired coordinates. This accounts for nested 
 | ||||||
| // elements.
 | // elements.
 | ||||||
| //
 | //
 | ||||||
| // XXX can we avoid tracking "virtual" newlines between text/block elements???
 |  | ||||||
| // XXX do a binary search?? 
 | // XXX do a binary search?? 
 | ||||||
| var getCharOffset = function(elem, x, y, data){ | var getCharOffset = function(elem, x, y, data){ | ||||||
| 	data = data ?? {} | 	data = data ?? {} | ||||||
| @ -132,7 +131,6 @@ var getMarkdownOffset = function(markdown, text, i){ | |||||||
| 		if(m >= markdown.length){ | 		if(m >= markdown.length){ | ||||||
| 			m = p } } | 			m = p } } | ||||||
| 	return m - t } | 	return m - t } | ||||||
| 
 |  | ||||||
| var offsetAt = function(A, B, i){ | var offsetAt = function(A, B, i){ | ||||||
|     i ??= A.length-1 |     i ??= A.length-1 | ||||||
|     var o = 0 |     var o = 0 | ||||||
| @ -146,6 +144,9 @@ var offsetAt = function(A, B, i){ | |||||||
|         p = o } |         p = o } | ||||||
|     return o } |     return o } | ||||||
| 
 | 
 | ||||||
|  | 
 | ||||||
|  | // Get element text content...
 | ||||||
|  | //
 | ||||||
| // NOTE: this is the same as .innerText but will not add extra "\n" after 
 | // NOTE: this is the same as .innerText but will not add extra "\n" after 
 | ||||||
| // 		each block element...
 | // 		each block element...
 | ||||||
| var getTexts = function(elem, res=[]){ | var getTexts = function(elem, res=[]){ | ||||||
| @ -159,7 +160,6 @@ var getText = function(elem){ | |||||||
| 
 | 
 | ||||||
| 
 | 
 | ||||||
| 
 | 
 | ||||||
| 
 |  | ||||||
| //---------------------------------------------------------------------
 | //---------------------------------------------------------------------
 | ||||||
| // Plugins...
 | // Plugins...
 | ||||||
| 
 | 
 | ||||||
| @ -2248,20 +2248,20 @@ var Outline = { | |||||||
| 		c: function(evt){ | 		c: function(evt){ | ||||||
| 			if(!this.get('edited')){ | 			if(!this.get('edited')){ | ||||||
| 				this.crop() } }, | 				this.crop() } }, | ||||||
| 			c_z: function(evt){ | 		c_z: function(evt){ | ||||||
| 				if(!this.get('edited')){ | 			if(!this.get('edited')){ | ||||||
| 					evt.preventDefault() | 				evt.preventDefault() | ||||||
| 					this.undo() } }, | 				this.undo() } }, | ||||||
| 			c_s_z: function(evt){ | 		c_s_z: function(evt){ | ||||||
| 				if(!this.get('edited')){ | 			if(!this.get('edited')){ | ||||||
| 					evt.preventDefault() | 				evt.preventDefault() | ||||||
| 					this.redo() } }, | 				this.redo() } }, | ||||||
| 			U: function(evt){ | 		U: function(evt){ | ||||||
| 				if(!this.get('edited')){ | 			if(!this.get('edited')){ | ||||||
| 					this.redo() } }, | 				this.redo() } }, | ||||||
| 			u: function(evt){ | 		u: function(evt){ | ||||||
| 				if(!this.get('edited')){ | 			if(!this.get('edited')){ | ||||||
| 					this.undo() } }, | 				this.undo() } }, | ||||||
| 
 | 
 | ||||||
| 		Delete: function(evt){ | 		Delete: function(evt){ | ||||||
| 			var edited = this.get('edited') | 			var edited = this.get('edited') | ||||||
|  | |||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user