Add event resize functionality with drag handles in week view
- Extend DragType enum to support ResizeEventStart and ResizeEventEnd operations - Add visual resize handles at top/bottom edges of events for left-click resizing - Implement start time resize by dragging top handle (preserves end time) - Implement end time resize by dragging bottom handle (preserves start time) - Add visual feedback with resizing event preview during drag operations - Integrate resize operations with existing CalDAV update system - Add CSS styling for resize handles with hover effects and resize cursors - Maintain minimum 15-minute event duration during resize operations - Preserve context menu functionality while preventing conflicts during drag - Clean up code by removing experimental right-click drag functionality 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
87
styles.css
87
styles.css
@@ -727,6 +727,93 @@ body {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
/* Resizing event during drag */
|
||||
.temp-event-box.resizing-event {
|
||||
background: inherit;
|
||||
border: 2px solid rgba(255, 255, 255, 0.9);
|
||||
color: white;
|
||||
flex-direction: column;
|
||||
align-items: flex-start;
|
||||
justify-content: flex-start;
|
||||
text-align: left;
|
||||
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
|
||||
transform: scale(1.01);
|
||||
}
|
||||
|
||||
.temp-event-box.resizing-event .event-title {
|
||||
font-weight: 600;
|
||||
margin-bottom: 2px;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
white-space: nowrap;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.temp-event-box.resizing-event .event-time {
|
||||
font-size: 0.65rem;
|
||||
opacity: 0.9;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
white-space: nowrap;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
/* Event resize zones and handles */
|
||||
.week-event {
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.week-event .event-content {
|
||||
padding: 2px;
|
||||
height: 100%;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: center;
|
||||
pointer-events: auto;
|
||||
z-index: 5;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
/* Left-click drag handles */
|
||||
.resize-handle {
|
||||
position: absolute;
|
||||
left: 0;
|
||||
right: 0;
|
||||
height: 4px;
|
||||
background: transparent;
|
||||
cursor: ns-resize;
|
||||
z-index: 10;
|
||||
transition: background-color 0.2s;
|
||||
}
|
||||
|
||||
.resize-handle-top {
|
||||
top: 0;
|
||||
border-top: 2px solid transparent;
|
||||
}
|
||||
|
||||
.resize-handle-bottom {
|
||||
bottom: 0;
|
||||
border-bottom: 2px solid transparent;
|
||||
}
|
||||
|
||||
.week-event:hover .resize-handle {
|
||||
background: rgba(255, 255, 255, 0.3);
|
||||
}
|
||||
|
||||
.week-event:hover .resize-handle-top {
|
||||
border-top-color: rgba(255, 255, 255, 0.8);
|
||||
}
|
||||
|
||||
.week-event:hover .resize-handle-bottom {
|
||||
border-bottom-color: rgba(255, 255, 255, 0.8);
|
||||
}
|
||||
|
||||
.resize-handle:hover {
|
||||
background: rgba(255, 255, 255, 0.5) !important;
|
||||
border-color: rgba(255, 255, 255, 1) !important;
|
||||
}
|
||||
|
||||
|
||||
.week-event .event-title {
|
||||
font-weight: 600;
|
||||
margin-bottom: 2px;
|
||||
|
||||
Reference in New Issue
Block a user