Skip to content

Commit

Permalink
Merge pull request #44 from li3zhen1/issue-43
Browse files Browse the repository at this point in the history
Fix issue-43: Dragging nodes does not work on iOS
  • Loading branch information
li3zhen1 committed Feb 21, 2024
2 parents 554ee9c + a90e5ed commit e797789
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 e797789

Please sign in to comment.