Skip to content
New issue

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

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

Already on GitHub? # to your account

如果类型为cat,则存在缩放效果异常抖动情况 #342

Closed
iamllitog opened this issue Sep 25, 2018 · 0 comments
Closed

如果类型为cat,则存在缩放效果异常抖动情况 #342

iamllitog opened this issue Sep 25, 2018 · 0 comments
Assignees
Milestone

Comments

@iamllitog
Copy link

iamllitog commented Sep 25, 2018

  • F2 Version:f2@3.2.3-beta.3

  • Platform:Android

  • Mini Showcase(like screenshots):
    image

  • CodePen Link:

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=no">
    <meta name="chart-name" content="基础柱状图">
    <title>F2 图表组件库 - AntV</title>
    <link rel="stylesheet" href="https://gw.alipayobjects.com/os/rmsportal/YmDAMEQVbLJpVbKiRQVX.css" />

</head>
<body>
<script>/*Fixing iframe window.innerHeight 0 issue in Safari*/document.body.clientHeight;</script>

<script src="./f2-all.min.js"></script>

  <div class="chart-wrapper">
    <canvas id="mountNode"></canvas>
  </div>
  <script>
var data = [{
  year: '1951 年',
  sales: 38
}, {
  year: '1952 年',
  sales: 52
}, {
  year: '1956 年',
  sales: 61
}, {
  year: '1957 年',
  sales: 145
}, {
  year: '1958 年',
  sales: 48
}, {
  year: '1959 年',
  sales: 38
}, {
  year: '1960 年',
  sales: 38
}, {
  year: '1962 年',
  sales: 38
}];
var chart = new F2.Chart({
  id: 'mountNode',
  pixelRatio: window.devicePixelRatio
});

chart.source(data, {
  sales: {
    tickCount: 5
  }
});
chart.tooltip({
  showItemMarker: false,
  onShow: function onShow(ev) {
    var items = ev.items;
    items[0].name = null;
    items[0].name = items[0].title;
    items[0].value = '¥ ' + items[0].value;
  }
});
chart.interval().position('year*sales');

chart.scrollBar({
  mode: 'x',
  xStyle: {
    backgroundColor: '#e8e8e8',
    fillerColor: '#808080',
    offsetY: -2
  }
});
chart.interaction('pan', {
  limitRange: {
    x: {
      min: -100,
      max: 100
    }
  }
});
chart.interaction('pinch', {
  maxScale: 5,
  minScale: 1
});

chart.render();
</script>


</body>
</html>

如果类型为cat,则手机上存在缩放效果异常抖动情况,双指向中间平移不能缩放到最大并产生来回抖动

# for free to join this conversation on GitHub. Already have an account? # to comment
Projects
None yet
Development

No branches or pull requests

2 participants