refactor: handlerDoubleTap

This commit is contained in:
lilong.129
2025-05-06 00:52:47 +08:00
parent 48e3d9002e
commit 71dac459e6
7 changed files with 48 additions and 30 deletions

View File

@@ -256,12 +256,10 @@ func (ud *UIA2Driver) Orientation() (orientation types.Orientation, err error) {
func (ud *UIA2Driver) DoubleTap(x, y float64, opts ...option.ActionOption) error {
log.Info().Float64("x", x).Float64("y", y).Msg("UIA2Driver.DoubleTap")
var err error
x, y, err = convertToAbsolutePoint(ud, x, y)
x, y, err = handlerDoubleTap(ud, x, y, opts...)
if err != nil {
return err
}
actionOptions := option.NewActionOptions(opts...)
x, y = actionOptions.ApplyTapOffset(x, y)
data := map[string]interface{}{
"actions": []interface{}{