✨ 메모 트리 시스템 드래그 앤 드롭 기능 완성
�� 주요 기능 추가: - 노드 드래그 앤 드롭으로 부모-자식 관계 변경 - 드래그 중 시각적 피드백 (투명도, 크기 변화) - 드롭 대상 하이라이트 효과 - 실시간 노드 위치 추적 및 이동 🔧 기술적 구현: - startDragNode, handleNodeDrag, endNodeDrag 함수 구현 - data-node-id 속성으로 노드 식별 - document.elementsFromPoint로 드롭 대상 감지 - moveNodeToParent API 호출로 실제 데이터 업데이트 🎨 UI/UX 개선: - 드래그 중 노드 스타일 변경 (opacity, scale, z-index) - 드롭 대상 하이라이트 CSS (.drop-target-highlight) - 토스트 알림 시스템 추가 - 성공/실패 피드백 제공 📱 사용자 경험: - 직관적인 드래그 앤 드롭 인터페이스 - 실시간 시각적 피드백 - 자동 트리 구조 업데이트 - 에러 처리 및 사용자 알림
This commit is contained in:
@@ -597,6 +597,21 @@
|
||||
.status-writing { border-left-color: #f59e0b; }
|
||||
.status-review { border-left-color: #3b82f6; }
|
||||
.status-complete { border-left-color: #10b981; }
|
||||
|
||||
/* 드래그 앤 드롭 스타일 */
|
||||
.drop-target-highlight {
|
||||
background: rgba(59, 130, 246, 0.1) !important;
|
||||
border: 2px dashed #3b82f6 !important;
|
||||
transform: scale(1.05) !important;
|
||||
box-shadow: 0 8px 25px rgba(59, 130, 246, 0.3) !important;
|
||||
}
|
||||
|
||||
.dragging {
|
||||
opacity: 0.7;
|
||||
transform: scale(1.05);
|
||||
z-index: 1000;
|
||||
cursor: grabbing !important;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
|
||||
@@ -764,6 +779,7 @@
|
||||
<div
|
||||
class="absolute tree-diagram-node"
|
||||
:style="getNodePosition(node)"
|
||||
:data-node-id="node.id"
|
||||
@mousedown="startDragNode($event, node)"
|
||||
>
|
||||
<div
|
||||
@@ -977,6 +993,35 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- 토스트 알림 -->
|
||||
<div x-show="notification.show"
|
||||
x-transition:enter="transition ease-out duration-300"
|
||||
x-transition:enter-start="opacity-0 transform translate-x-full"
|
||||
x-transition:enter-end="opacity-100 transform translate-x-0"
|
||||
x-transition:leave="transition ease-in duration-200"
|
||||
x-transition:leave-start="opacity-100 transform translate-x-0"
|
||||
x-transition:leave-end="opacity-0 transform translate-x-full"
|
||||
class="fixed top-4 right-4 z-50 max-w-sm">
|
||||
<div class="rounded-lg shadow-lg border p-4"
|
||||
:class="{
|
||||
'bg-green-50 border-green-200 text-green-800': notification.type === 'success',
|
||||
'bg-red-50 border-red-200 text-red-800': notification.type === 'error',
|
||||
'bg-blue-50 border-blue-200 text-blue-800': notification.type === 'info'
|
||||
}">
|
||||
<div class="flex items-center">
|
||||
<i :class="{
|
||||
'fas fa-check-circle text-green-600': notification.type === 'success',
|
||||
'fas fa-exclamation-circle text-red-600': notification.type === 'error',
|
||||
'fas fa-info-circle text-blue-600': notification.type === 'info'
|
||||
}" class="mr-2"></i>
|
||||
<span x-text="notification.message"></span>
|
||||
<button @click="notification.show = false" class="ml-auto text-gray-400 hover:text-gray-600">
|
||||
<i class="fas fa-times"></i>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- 로그인이 필요한 상태 -->
|
||||
<div x-show="!currentUser" class="flex items-center justify-center h-screen">
|
||||
<div class="text-center">
|
||||
|
||||
Reference in New Issue
Block a user