Comments (7)
这样子就好了
from we-cropper.
我也遇到了相同的问题,debug之后发现是touch事件中的对象被更新了。
单指移动剪裁框时,touchStart方法里面看到touches数组只有个一个对象,见下图:
同次事件,touchMove里面的touches数组多了一个function对象,以至于在后面判断是否两指操作上面进入了错误的分支,并在计算scale的时候出了错,见下图:
目前我们项目里面只是在这边粗暴的把function对象从touch数组中过滤掉来解决这个问题,至于为什么event的touches里面会混入function对象还没有找到原因。
from we-cropper.
我也遇到了同样的问题,但是根据楼上的说法,我检测了我的touches数组,并没有多,而且我的时ios可以,安卓会黑屏
from we-cropper.
@sophiaWang611 感谢定位问题,另外,是否只在特定机型特定基础库出现呢?
from we-cropper.
相同的问题。 在iphone6s、iphone x下真机测试每次都能复现。
微信版本6.6.6
经过测试,在微信里传入的 e.touches数组里有多个function。
解决方案:
touchMove里面重新定义了一个数组,然后遍历e.touches, typeof == 'object'的push到新数组,过滤掉function对象后解决了。
我这边调试发现的是 e.touches里不止一个function,而是会有很多很多个。
不知道是否是因为引入了阿拉丁小程序统计js的问题, 屏蔽掉该JS后问题依然存在。 过滤掉function对象后恢复正常。
from we-cropper.
同样遇到类似问题。我的在模拟器上没问题,放手机上touches数组会多很多个null,过滤掉也不行,我把代码中判断单双指的数组改成了changedTouches,单指拖动不消失了,但是图片会歪到右下角不能再拖动,双指还是会消失,,我把源码整个拷到项目都不行。总体来说没法用
from we-cropper.
页面调用正常使用,小程序退回到聊天页面在我的小程序页面打开小程序选中照片裁剪会闪退
from we-cropper.
Related Issues (20)
- Taro里面怎么使用 HOT 2
- 剪切完图片比原图大了三倍 HOT 1
- [Bug Report] 虚拟机没事,真机报错
- QQ小程序IOS下 拍照后裁剪不正常
- we-cropper裁剪后的图片变模糊 HOT 1
- we-cropper使用原图裁剪,在画布上面拖图片,缩放的时候卡顿,缩略图裁剪后模糊,安卓手机有这情况,iOS不清楚 HOT 1
- 华为手机p40裁剪时报异常
- 设置尺寸比例大的时候,会卡住不动
- [Feature Request] 怎么获取生成图片相对于原图的x y值
- 支不支持在taro vue中使用啊 在线求回复
- [Feature Request] 为什么不考虑增加旋转呢?
- Canvas2d 模式下裁剪的时候不支持 original: true
- 为什么我裁剪之后的图片会变模糊,看到您在四楼给了链接,但是失效了,能否重新发一下 HOT 2
- 裁剪网络图片的时候黑屏 HOT 1
- [Feature Request] 背景图
- If original is set to true, getCropperImage is invalid
- We scan
- 使用canvas2d 拖拽图片时 会重影??? HOT 1
- 好像不支持vue3写法把。
- pushOrign 在ready中不执行
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from we-cropper.