mirror of
				https://github.com/flynx/pWiki.git
				synced 2025-10-31 11:00:08 +00:00 
			
		
		
		
	now crop path is clickable in web component...
Signed-off-by: Alex A. Naanou <alex.nanou@gmail.com>
This commit is contained in:
		
							parent
							
								
									6d6994c115
								
							
						
					
					
						commit
						8183fdd3a7
					
				| @ -284,17 +284,17 @@ | |||||||
| 			border: none; | 			border: none; | ||||||
| 			background: none; | 			background: none; | ||||||
| 
 | 
 | ||||||
| 			&>.text { | 			.text { | ||||||
| 				display: none; | 				display: none; | ||||||
| 			} | 			} | ||||||
| 		} | 		} | ||||||
| 		&, | 		&, | ||||||
| 		&[cropped] { | 		&[cropped] { | ||||||
| 			margin-left: 0; | 			margin-left: 0; | ||||||
| 
 | 		} | ||||||
| 			& .text { | 		/* XXX nesting this in &[cropped] for some reaon breaks things... */ | ||||||
| 				display: block; | 		&[cropped] .text { | ||||||
| 			} | 			display: block; | ||||||
| 		} | 		} | ||||||
| 	} | 	} | ||||||
| 
 | 
 | ||||||
|  | |||||||
| @ -1255,7 +1255,7 @@ var Outline = { | |||||||
| 				+ this.path(...arguments, 'text') | 				+ this.path(...arguments, 'text') | ||||||
| 					.slice(0, -1) | 					.slice(0, -1) | ||||||
| 					.map(function(s, i, {length}){ | 					.map(function(s, i, {length}){ | ||||||
| 						return `<span class="path-item" onclick="editor.uncrop(${ length-i })">${ | 						return `<span class="path-item" uncrop="${ length-i }">${ | ||||||
| 							plugin.encode(s) | 							plugin.encode(s) | ||||||
| 						}</span> ` }) | 						}</span> ` }) | ||||||
| 					.join(' / ') | 					.join(' / ') | ||||||
| @ -2177,6 +2177,14 @@ var Outline = { | |||||||
| 			function(evt){ | 			function(evt){ | ||||||
| 				that.__change__() }) | 				that.__change__() }) | ||||||
| 
 | 
 | ||||||
|  | 		// header...
 | ||||||
|  | 		var header = this.header | ||||||
|  | 		header.addEventListener('click',  | ||||||
|  | 			function(evt){ | ||||||
|  | 				var elem = evt.target | ||||||
|  | 				if(elem.classList.contains('path-item')){ | ||||||
|  | 					that.uncrop(elem.getAttribute('uncrop') ?? 'all') } }) | ||||||
|  | 
 | ||||||
| 		// toolbar...
 | 		// toolbar...
 | ||||||
| 		var toolbar = this.toolbar | 		var toolbar = this.toolbar | ||||||
| 		if(toolbar){ | 		if(toolbar){ | ||||||
|  | |||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user