forked from GithubMirrors/cardconjurer
		
	Update creator-23.js
This commit is contained in:
		| @@ -1260,9 +1260,26 @@ function artFromScryfall(scryfallResponse) { | |||||||
| function changeArtIndex() { | function changeArtIndex() { | ||||||
| 	const artIndexValue = document.querySelector('#art-index').value; | 	const artIndexValue = document.querySelector('#art-index').value; | ||||||
| 	if (artIndexValue != 0 || artIndexValue == '0') { | 	if (artIndexValue != 0 || artIndexValue == '0') { | ||||||
| 		uploadArt(scryfallArt[artIndexValue].image_uris.art_crop, 'autoFit'); | 		const scryfallCardForArt = scryfallArt[artIndexValue]; | ||||||
| 		artistEdited(scryfallArt[artIndexValue].artist); | 		uploadArt(scryfallCardForArt.image_uris.art_crop, 'autoFit'); | ||||||
|  | 		artistEdited(scryfallCardForArt.artist); | ||||||
|  | 		if (params.get('mtgpics') == 'true') { | ||||||
|  | 			imageURL(`https://www.mtgpics.com/pics/art/${scryfallCardForArt.set.toLowerCase()}/${("00" + scryfallCardForArt.collector_number).slice(-3)}.jpg`, tryMTGPicsArt); | ||||||
| 		} | 		} | ||||||
|  | 	} | ||||||
|  | } | ||||||
|  | function tryMTGPicsArt(src) { | ||||||
|  | 	var attemptedImage = new Image(); | ||||||
|  | 	attemptedImage.onload = function() { | ||||||
|  | 		if (this.complete) { | ||||||
|  | 			art.onload = function() { | ||||||
|  | 				autoFitArt(); | ||||||
|  | 				art.onload = artEdited; | ||||||
|  | 			}; | ||||||
|  | 			art.src = this.src; | ||||||
|  | 		} | ||||||
|  | 	} | ||||||
|  | 	attemptedImage.src = src; | ||||||
| } | } | ||||||
| function initDraggableArt() { | function initDraggableArt() { | ||||||
| 	previewCanvas.onmousedown = artStartDrag; | 	previewCanvas.onmousedown = artStartDrag; | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user
	 Kyle
					Kyle