Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug] 地图拖拽事件不符合预期 #3650

Open
skie1997 opened this issue Jan 8, 2025 · 0 comments · May be fixed by #3658
Open

[Bug] 地图拖拽事件不符合预期 #3650

skie1997 opened this issue Jan 8, 2025 · 0 comments · May be fixed by #3658
Assignees
Labels
bug Something isn't working

Comments

@skie1997
Copy link
Contributor

skie1997 commented Jan 8, 2025

Version

1.13.3

Link to Minimal Reproduction

null

Steps to Reproduce

https://visactor.bytedance.net/vchart/demo/map-chart/scatter-map

const response = await fetch('https://lf9-dp-fe-cms-tos.byteorg.com/obj/bit-cloud/geojson/world.json');
const geojson = await response.json();
VChart.registerMap('world', geojson);

const dataResponse = await fetch('https://lf9-dp-fe-cms-tos.byteorg.com/obj/bit-cloud/geojson/earthquake.json');
const earthquakeData = await dataResponse.json();

const spec = {
  type: 'common',
  region: [
    {
      roam: true,
      coordinate: 'geo',
      longitudeField: 'lng',
      latitudeField: 'lat',
      projection: {
        type: 'equirectangular'
      }
    }
  ],
  title: {
    text: '全球地震数据等级可视化'
  },
  background: 'rgb(240, 248, 255)',
  data: [{ values: earthquakeData.values }],
  series: [
    { type: 'map', map: 'world', tooltip: { visible: false }, defaultFillColor: 'rgb(245,255,250)' },
    {
      type: 'scatter',
      xField: 'time',
      yField: 'level',
      point: {
        style: {
          size: datum => {
            return datum.level > 7 ? +datum.level * 2 : +datum.level;
          },
          fill: 'red',
          fillOpacity: 0.2
        }
      }
    }
  ]
};

const vchart = new VChart(spec, { dom: CONTAINER_ID });
vchart.renderSync();

// Just for the convenience of console debugging, DO NOT COPY!
window['vchart'] = vchart;

Current Behavior

拖拽画布,并在移出画布后抬起鼠标,再次移入画布,事件依然响应
20250108142524_rec_

Expected Behavior

拖拽画布,并在移出画布后抬起鼠标,再次移入画布,事件不响应

Environment

- OS:
- Browser:
- Framework:

Any additional comments?

No response

@skie1997 skie1997 added the bug Something isn't working label Jan 8, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants