feat: add pre hook and post hook for DoubleTap action

This commit is contained in:
lilong.129
2025-05-09 23:06:45 +08:00
parent 3715cbb432
commit f7ec4a06b4
6 changed files with 21 additions and 13 deletions
+3 -2
View File
@@ -622,11 +622,12 @@ func (wd *WDADriver) DoubleTap(x, y float64, opts ...option.ActionOption) error
x = wd.toScale(x)
y = wd.toScale(y)
var err error
x, y, err = handlerDoubleTap(wd, x, y, opts...)
actionOptions := option.NewActionOptions(opts...)
x, y, err := preHandler_DoubleTap(wd, actionOptions, x, y)
if err != nil {
return err
}
defer postHandler(wd, actionOptions)
data := map[string]interface{}{
"x": x,