Skip to content
New issue

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

Bottomsheet handleBar 기능 추가 #189

Open
1 of 2 tasks
hyerindev opened this issue Dec 23, 2024 · 0 comments
Open
1 of 2 tasks

Bottomsheet handleBar 기능 추가 #189

hyerindev opened this issue Dec 23, 2024 · 0 comments
Assignees
Labels
design💄 퍼블리싱 관련 feature✨ 코드를 새롭게 추가함.

Comments

@hyerindev
Copy link
Member

hyerindev commented Dec 23, 2024

✔️ 작업 내용

바텀시트 핸들바를 잡고 늘였다 줄였다 할 수 있도록 기능을 추가한다.

  • transform: scaleY(); -> 고정된 사이즈를 억지로 늘린 것처럼 된다. 원하는대로 안된다.
  • 마우스 움직임에 따라 수동 조절하기
    다음의 코드 참고
    const textarea = document.querySelector('.resizable-textarea');
    const handle = document.querySelector('.resizable-textarea::after');
    
    let isResizing = false;
    
    handle.addEventListener('mousedown', (e) => {
        isResizing = true;
    });
    
    document.addEventListener('mouseup', () => {
        isResizing = false;
    });
    
    document.addEventListener('mousemove', (e) => {
        if (isResizing) {
            textarea.style.width = e.pageX - textarea.offsetLeft + 'px';
            textarea.style.height = e.pageY - textarea.offsetTop + 'px';
        }
    });

💬 기타

@hyerindev hyerindev self-assigned this Dec 23, 2024
@hyerindev hyerindev added feature✨ 코드를 새롭게 추가함. design💄 퍼블리싱 관련 labels Dec 23, 2024
@hyerindev hyerindev changed the title Bottomsheet 기능 추가 Bottomsheet handleBar 기능 추가 Dec 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
design💄 퍼블리싱 관련 feature✨ 코드를 새롭게 추가함.
Projects
None yet
Development

No branches or pull requests

1 participant