Comments (17)
目前没有封装resizecut的方法,先尝试修改实例里的cut属性吧
this.wecropper.cut = {
x: newX,
y: newY,
width: newWidth,
height: newHeight
}
from we-cropper.
@dlhandsome 这个设置没有任何效果,我发现。
from we-cropper.
@dlhandsome 初始化的宽高 缩放比例是对的, 但是按照你的那个方法设置并updateCanvas 图片的裁切区域修改了,但是图片缩放比不对了。
from we-cropper.
pushOrign里面的width,height还是原来初始化的值,我手动修改了这个宽高,但是移动的时候,计算就不准确了。
from we-cropper.
稍晚些出一个resizeCut的方法
from we-cropper.
@dlhandsome 谢谢,麻烦了。
from we-cropper.
现在能用吗?
from we-cropper.
现在能用吗?
from we-cropper.
请问方法出了吗?
from we-cropper.
请问这个方法出了吗 急用啊老铁
from we-cropper.
同求resizeCut的方法
from we-cropper.
请问这个方法现在有吗?
from we-cropper.
同求resizeCut的方法
from we-cropper.
同求resizeCut的方法
from we-cropper.
解决办法:方案一
this.cropper.width=opt.width
this.cropper.height=opt.height
this.cropper.cut ={
x: opt.cut.x,
y: opt.cut.y,
width: opt.cut.width,
height: opt.cut.height
}
//下面三个三个方法重置局部变量x、y、 boundWidth、boundHeight
this.cropper.cutt();
this.cropper.methods();
this.cropper.init();
方案二
1.将 x、y、 boundWidth、boundHeight 改自身变量self.x等,需要相关方法引用,
2.新增方法update这几个值,x、y、 boundWidth、boundHeight、cut、with/height
width/height 或者应该叫cutWidth/cutHeiht、boundWidth/boundHeight 实际画布宽高,就是你传进去的
from we-cropper.
内部参数使用安排的不是很好,2.0可以重构好点
from we-cropper.
同求resizeCut的方法
pushOrign里面的宽度,高度还是原来的初始化值,我手动修改了这个宽高,但是移动的时候,计算就不准确了。
你的问题解决了吗
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.