F2 icon indicating copy to clipboard operation
F2 copied to clipboard

Tooltip triggerOn "mousemove" not working on releases >= 3.6.1

Open AltanS opened this issue 3 years ago β€’ 1 comments

  • [x] I have searched the issues of this repository and believe that this is not a duplicate.

Reproduction link

Edit on CodeSandbox

Steps to reproduce

Change the @antv/f2 version to 3.4.4 and the tooltip for "mousemove" events are working (https://codesandbox.io/s/funny-minsky-s96iq).

Environment Info
f2 3.8.1
System Ubuntu
Browser Chrome Version 88.0.4324.182 (Official Build) (64-bit)

I played around with the F2 library and used https://antv.gitbook.io/f2/ as reference. An older version from a CDN was in one of the examples and the mousemove event worked fine. When I wanted to implement F2 into a project I imported the latest version and mousemove events stopped working. I understand that F2 is meant for mobile, would still be great to have mousemove events for webapps that server desktop and mobile users.

AltanS avatar Mar 03 '21 18:03 AltanS

try this

  const canvas = document.querySelector('canvas')
  canvas.onmousemove = function(ev) {
    chart.showTooltip({
        x: ev.offsetX,
        y: ev.offsetY
      })
  }

lhiro avatar Dec 30 '21 02:12 lhiro