File tree Expand file tree Collapse file tree 1 file changed +22
-0
lines changed
Sources/MapboxMaps/Foundation Expand file tree Collapse file tree 1 file changed +22
-0
lines changed Original file line number Diff line number Diff line change @@ -1781,6 +1781,28 @@ extension MapboxMap {
17811781 internal var __testingMap : CoreMap {
17821782 return __map
17831783 }
1784+
1785+ /// For internal use only
1786+ /// Triggers a gesture of the provided type at the specified screen coordinates
1787+ @_spi ( Experimental)
1788+ @_spi ( Internal)
1789+ public func dispatch( gesture: String , screenCoordinateX: Double , screenCoordinateY: Double ) {
1790+ var eventType = CorePlatformEventType . click
1791+ switch gesture {
1792+ case " click " :
1793+ eventType = . click
1794+ case " longClick " :
1795+ eventType = . longClick
1796+ case " drag " :
1797+ eventType = . drag
1798+ case " dragBeing " :
1799+ eventType = . dragBegin
1800+ case " dragEnd " :
1801+ eventType = . dragEnd
1802+ default : break
1803+ }
1804+ dispatch ( event: CorePlatformEventInfo ( type: eventType, screenCoordinate: CoreScreenCoordinate ( x: CGFloat ( screenCoordinateX) , y: CGFloat ( screenCoordinateY) ) ) )
1805+ }
17841806}
17851807
17861808extension CGPoint {
You can’t perform that action at this time.
0 commit comments