Created
July 7, 2019 22:40
-
-
Save tokyosheep/0429fbbcb91a3005012c7fee02af4e56 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| //this.fileList フォルダダイアログから取得した画像ファイル | |
| //this.images すでにillustratorに配置されている画像ファイル | |
| if(!this.fileList){ | |
| return; | |
| } | |
| for(var i=0;i<this.images.length;i++){ | |
| for(var j=0;j<this.fileList.length;j++){ | |
| var flag = isNameSame(this.images[i].file.name,this.fileList[j]); | |
| if(flag){ | |
| this.images[i].file = new File (this.fileList[j]);//置き換え | |
| } | |
| } | |
| } | |
| function isNameSame(reName,Folname){//ファイル名が同じか確認 | |
| var name1 = decodeURI(reName); | |
| var name2 = new File(Folname); | |
| return name1 === name2.name; | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment