fit drawing image size

master
Suvodip 2025-05-05 08:49:35 +05:30
parent 6bce4625cd
commit 7819792138
3 changed files with 27 additions and 4 deletions

View File

@ -344,3 +344,8 @@ function submitUserData(drawingZone) {
console.error('An error occurred', error); console.error('An error occurred', error);
}); });
} }

View File

@ -408,11 +408,11 @@ import Layout from '../../layouts/Layout.astro';
// this.add.image(customWidth / 2 * 1.6 - 0.5, 25, 'topLogo'); // this.add.image(customWidth / 2 * 1.6 - 0.5, 25, 'topLogo');
// } // }
if(isMobile){ if(isMobile){
outlineImage.setDepth(-1).setScale(0.5); outlineImage.setDepth(-1).setScale(0.28);
}else if(isTab){ }else if(isTab){
outlineImage.setDepth(-1).setScale(0.90); outlineImage.setDepth(-1).setScale(0.26);
} else{ } else{
outlineImage.setDepth(-1).setScale(1); outlineImage.setDepth(-1).setScale(0.4);
} }
const maskGraphics = this.make.graphics(); const maskGraphics = this.make.graphics();

View File

@ -0,0 +1,18 @@
---
import Layout from "../layouts/Layout.astro"
---
<Layout title="">
<div>
<button>Click</button>
</div>
</Layout>
<script is:inline>
function testImageAI(){
const formData = new FormData();
formData.append('image', )
fetch(`ai-image-api.cs1.hz.siliconpin.com`, {
method: 'POST',
})
}
</script>