webjyh / mpreview.mobile Goto Github PK
View Code? Open in Web Editor NEW移动端图片预览组件,支持手势缩放,双击放大,缩小
License: MIT License
移动端图片预览组件,支持手势缩放,双击放大,缩小
License: MIT License
ios9.3.5 微信长按保存后,无法滑动,除非双击图片后才可以滑动
请问,微信扫面后,下拉看不到是哪个浏览器提供的,是如何解决不让显示的?
为什么我克隆下来以后,点击浏览,没有图片出现
https://www.loom.com/share/432c2d7fdd5140adaebad7181bc52ffa
主要问题就是在pinching是缩放的 origin 计算有问题。
另外
if (size.width > screen.width) {
fix = size.width - currentSize.width;
maxTx = (fix * (originX / currentSize.width) - imgAreaX) / scale;
minTx = 0 - (fix * ((currentSize.width - originX) / currentSize.width) - imgAreaX) / scale;
if (maxTx < 0) {
maxTx = 0;
originX = imgAreaX / fix * currentSize.width;
minTx = 0 - (fix * ((currentSize.width - originX) / currentSize.width) - imgAreaX) / scale;
}
if (minTx > 0) {
minTx = 0;
originX = currentSize.width - imgAreaX / fix * currentSize.width;
maxTx = (fix * (imgAreaX / currentSize.width)) / scale;
}
} else {
originX = currentSize.width / 2;
}
这个函数也有问题,如果 size.width < screen.width 时 maxTx 和 minTx 为 undefined ,Y轴上的也一样
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.