fixed float/int casting

This commit is contained in:
Antoni Sawicki 2019-11-03 01:00:44 -07:00
parent 7c50c6e841
commit b058831ec6
1 changed files with 1 additions and 1 deletions

2
wrp.go
View File

@ -178,7 +178,7 @@ func (w wrpReq) capture(c string, out http.ResponseWriter) {
var err error
if w.X > 0 && w.Y > 0 {
log.Printf("%s Mouse Click %d,%d\n", c, w.X, w.Y)
err = chromedp.Run(ctx, chromedp.MouseClickXY(int64(float64(w.X)/w.S), int64(float64(w.Y)/w.S)))
err = chromedp.Run(ctx, chromedp.MouseClickXY(int64(float64(w.X)/float64(w.S)), int64(float64(w.Y)/float64(w.S))))
} else if len(w.F) > 0 {
log.Printf("%s Button %v\n", c, w.F)
switch w.F {