mirror of
				https://github.com/SoftFever/OrcaSlicer.git
				synced 2025-10-30 20:21:12 -06:00 
			
		
		
		
	ENH: Show Printer Thumbnail From Profile Folder
Change-Id: I1ebea7016bcf8725d80d450ea82ff85941cb0dc8 (cherry picked from commit 9cd50c690a70f103a9140fdb85cca7d2858874b0)
This commit is contained in:
		
							parent
							
								
									5cd1c1b685
								
							
						
					
					
						commit
						26ec9ae385
					
				
					 4 changed files with 27 additions and 8 deletions
				
			
		|  | @ -36,7 +36,7 @@ | |||
| 
 | ||||
| .PrinterArea | ||||
| { | ||||
| 	padding: 10px; | ||||
| 	padding: 0px; | ||||
| 	display: flex; | ||||
| 	flex-wrap: wrap; | ||||
| } | ||||
|  | @ -45,7 +45,7 @@ | |||
| { | ||||
| 	width: 160px; | ||||
| 	text-align: center; | ||||
| 	padding: 10px; | ||||
| 	padding: 8px; | ||||
| } | ||||
| 
 | ||||
| .PrinterBlock img | ||||
|  |  | |||
|  | @ -41,6 +41,12 @@ function HandleStudio( pVal ) | |||
| } | ||||
| 
 | ||||
| 
 | ||||
| function ShowPrinterThumb(pItem, strImg) | ||||
| { | ||||
| 	$(pItem).attr('src',strImg); | ||||
| 	$(pItem).attr('onerror',null); | ||||
| } | ||||
| 
 | ||||
| function HandleModelList( pVal ) | ||||
| { | ||||
| 	if( !pVal.hasOwnProperty("model") ) | ||||
|  | @ -75,7 +81,10 @@ function HandleModelList( pVal ) | |||
| '</div>'+ | ||||
| '</div>'; | ||||
| 			 | ||||
| 			$('#Content').append(HtmlNewVendor); | ||||
| 			if(sVV=='Bambu Lab') | ||||
| 				$('#Content').html( HtmlNewVendor + $('#Content').html() ); | ||||
| 			else | ||||
| 				$('#Content').append( HtmlNewVendor ); | ||||
| 		} | ||||
| 		 | ||||
| 		let ModelName=OneModel['model']; | ||||
|  | @ -93,8 +102,9 @@ function HandleModelList( pVal ) | |||
| 		} | ||||
| 		 | ||||
| 		let CoverImage="../../image/printer/"+OneModel['model']+"_cover.png"; | ||||
| 		let	CoverImage2="../../../profiles/"+strVendor+"/"+OneModel['model']+"_cover.png"; | ||||
| 		ModelHtml[strVendor]+='<div class="PrinterBlock">'+ | ||||
| '	<div class="PImg"><img src="'+CoverImage+'"  /></div>'+ | ||||
| '	<div class="PImg"><img src="'+CoverImage+'" onerror="ShowPrinterThumb(this,\''+CoverImage2+'\')" /></div>'+ | ||||
| '    <div class="PName">'+OneModel['model']+'</div>'+ HtmlNozzel +'</div>'; | ||||
| 	} | ||||
| 	 | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 zorro.zhang
						zorro.zhang