Commit a26c5fc3 authored by yaya's avatar yaya

feat:添加图片裁剪数据传参优化

parent fc843f07
...@@ -171,9 +171,8 @@ export default { ...@@ -171,9 +171,8 @@ export default {
const { w, h } = options.mask const { w, h } = options.mask
const obj = { const obj = {
width: Math.ceil(rectW),
width: rectW, height: Math.ceil(rectH),
height: rectH,
x: Math.ceil(rectW / 2 - w / 2 - offsetX), x: Math.ceil(rectW / 2 - w / 2 - offsetX),
y: Math.ceil(rectH / 2 - h / 2 - offsetY), y: Math.ceil(rectH / 2 - h / 2 - offsetY),
maskW: w, maskW: w,
......
...@@ -203,9 +203,8 @@ export default { ...@@ -203,9 +203,8 @@ export default {
const { w, h } = options.mask const { w, h } = options.mask
const obj = { const obj = {
width: Math.ceil(rectW),
width: rectW, height: Math.ceil(rectH),
height: rectH,
x: Math.ceil(rectW / 2 - w / 2 - offsetX), x: Math.ceil(rectW / 2 - w / 2 - offsetX),
y: Math.ceil(rectH / 2 - h / 2 - offsetY), y: Math.ceil(rectH / 2 - h / 2 - offsetY),
maskW: w, maskW: w,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment