Skip to content

Commit

Permalink
Fix issue-43: Dragging nodes does not work on iOS
Browse files Browse the repository at this point in the history
  • Loading branch information
li3zhen1 committed Feb 21, 2024
1 parent 554ee9c commit a90e5ed
Showing 1 changed file with 8 additions and 7 deletions.
15 changes: 8 additions & 7 deletions Sources/Grape/Views/ForceDirectedGraph+View.swift
Original file line number Diff line number Diff line change
Expand Up @@ -80,13 +80,6 @@ extension ForceDirectedGraph: View {
let _ = model.currentFrame
self.model.render(&context, size)
}
#if os(iOS) || os(macOS)
.gesture(
MagnifyGesture(minimumScaleDelta: Self.minimumScaleDelta)
.onChanged(onMagnifyChange)
.onEnded(onMagnifyEnd)
)
#endif
#if !os(tvOS)
.gesture(
DragGesture(
Expand All @@ -98,6 +91,14 @@ extension ForceDirectedGraph: View {
)
.onTapGesture(count: 1, perform: onTapGesture)
#endif

#if os(iOS) || os(macOS)
.gesture(
MagnifyGesture(minimumScaleDelta: Self.minimumScaleDelta)
.onChanged(onMagnifyChange)
.onEnded(onMagnifyEnd)
)
#endif
}
}

Expand Down

0 comments on commit a90e5ed

Please sign in to comment.