We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
App.svelte :
<div class="flex-row d-flex justify-content-center my-3"> <div class="col text-center"> <button class='btn btn-outline-secondary' on:click={restart}> 清空頭部 </button> </div> <div class="col text-center"> <button class='btn btn-outline-secondary' on:click={reverse}> 水平鏡像 </button> </div> </div>
let flip = false function restart() { heads = [] } function reverse() { flip = !flip let nodes = document.getElementsByClassName('add-head-button') for(let element of nodes) { if(flip) { element.style.transform = 'rotateY(180deg)' } else { element.style.transform = '' } }; }
{#each heads as head (head.id)} <Head {canvas} {head} {flip}/> {/each}
Head.svelte:
export let canvas, head, flip fabricImage = new fabric.Image(image, { rotatingPointOffset: 15, cornerStyle: 'circle', cornerColor: 'red', transparentCorners: false, borderColor: 'red', scaleX: scale, scaleY: scale, flipX: flip })
The text was updated successfully, but these errors were encountered:
merge from #3, thanks @fz6m
2cef0d9
👍 下次可以嘗試使用 pull request 提交
Sorry, something went wrong.
No branches or pull requests
App.svelte :
Head.svelte:
The text was updated successfully, but these errors were encountered: