Skip to content

Commit df9bcec

Browse files
committed
fix(preview): drag only from the drag bar
#397
1 parent 3358a09 commit df9bcec

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

internal/ui/preview/preview.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -141,16 +141,16 @@ func (m *Model) DragStart(x, y int) bool {
141141
}
142142

143143
if m.AtBottom() {
144-
if m.Frame.Min.Y-y > handleSize {
144+
if y-m.Frame.Min.Y > handleSize {
145145
return false
146146
}
147147
} else {
148-
if m.Frame.Min.X-x > handleSize {
148+
if x-m.Frame.Min.X > handleSize {
149149
return false
150150
}
151151
}
152152

153-
m.BeginDrag(x, y)
153+
m.BeginDrag(m.Frame.Min.X, y)
154154
return true
155155
}
156156

0 commit comments

Comments
 (0)