Framework7: How to get pinch to zoom on page-conte

2019-06-09 00:47发布

I would like to use pinch to zoom on page-content.

I tried this in myapp.js but it still does not work. Did i forget something? jquery, hammer js and jquery hammer js (wrapper) are initialized

var mc = $(".page-content").hammer();
mc.add(new Hammer.Pinch({
    threshold: 0
}));

1条回答
Fickle 薄情
2楼-- · 2019-06-09 01:12

There are two problems in your question:

  1. How to handle pinch with hammer
  2. How to properly zoom using Javascript + CSS

I posted an answer to a similar question about zooming in Javascript + CSS (which is your problem #2), and luckily, I used Hammer to zoom (which is your #1).

You should therefore find everything you need in this answer: https://stackoverflow.com/a/37842610/838712

查看更多
登录 后发表回答