You've already forked collage-maker
							
							remove dead code and comments
This commit is contained in:
		
							
								
								
									
										15
									
								
								web/index.js
									
									
									
									
									
								
							
							
						
						
									
										15
									
								
								web/index.js
									
									
									
									
									
								
							@@ -114,14 +114,6 @@ function initCollage() {
 | 
			
		||||
    }
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
function showCrop() {
 | 
			
		||||
    for(cpie of crops) {
 | 
			
		||||
        console.log(cpie.get())
 | 
			
		||||
        console.log(cpie.element.clientWidth)
 | 
			
		||||
        console.log(cpie.element.clientHeight)
 | 
			
		||||
    }
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
async function makeCollage(req) {
 | 
			
		||||
    const resp = await fetch("make-collage", {
 | 
			
		||||
        method: "POST",
 | 
			
		||||
@@ -136,7 +128,6 @@ async function makeCollage(req) {
 | 
			
		||||
function snap() {
 | 
			
		||||
    const col = collageDiv.offsetLeft;
 | 
			
		||||
    const cot = collageDiv.offsetTop;
 | 
			
		||||
    console.log("----------------------")
 | 
			
		||||
    const req = {
 | 
			
		||||
        background_image: "",
 | 
			
		||||
        aspect: {
 | 
			
		||||
@@ -152,11 +143,6 @@ function snap() {
 | 
			
		||||
 | 
			
		||||
    for(const elem of collageDiv.getElementsByClassName("img")) {
 | 
			
		||||
        const cpie = crops[elem.dataset.collageCropieIndex]
 | 
			
		||||
        // console.log(cpie.get().points)
 | 
			
		||||
        // console.log(elem.offsetLeft - col)
 | 
			
		||||
        // console.log(elem.offsetTop - cot)
 | 
			
		||||
        // console.log(elem.clientWidth)
 | 
			
		||||
        // console.log(elem.clientHeight)
 | 
			
		||||
        const fsx = elem.offsetLeft - col
 | 
			
		||||
        const fsy = elem.offsetTop - cot
 | 
			
		||||
        const [sx, sy, ex, ey] = cpie.get().points;
 | 
			
		||||
@@ -186,7 +172,6 @@ function snap() {
 | 
			
		||||
        req.photos.push(photo)
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    console.log(JSON.stringify(req));
 | 
			
		||||
    (async () => {
 | 
			
		||||
        const collagFile = await makeCollage(req)
 | 
			
		||||
        collageUrlA.href = `collages/${collagFile}`;
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user