|
|
@@ -224,8 +224,8 @@ function changeScale(event) { |
|
|
|
let deltaY = touchStart.pageY - y;
|
|
|
|
let boxDistance2 = Math.sqrt(deltaX ** 2 + deltaY ** 2);
|
|
|
|
if (deltaX < 0) {
|
|
|
|
if (props.materialList.virtual.w < 0.4) {
|
|
|
|
props.materialList.virtual.w = 0.4;
|
|
|
|
if (props.materialList.virtual.w < 0.1) {
|
|
|
|
props.materialList.virtual.w = 0.1;
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
props.materialList.virtual.w = (baseLineScale + boxDistance2) / baseLine;
|
|
|
@@ -256,6 +256,10 @@ const handleDragSc = (item, index, event) => { |
|
|
|
realImgUrl.value = item.material;
|
|
|
|
scBorderActive.value= index
|
|
|
|
showBorderActive.value = item.id;
|
|
|
|
props.materialList.scList.forEach(res => {
|
|
|
|
res.activeIndex =''
|
|
|
|
})
|
|
|
|
item.activeIndex = item.id
|
|
|
|
event.preventDefault();
|
|
|
|
const imageElement = fatherBox.value;
|
|
|
|
const startX = event.clientX; //保存初始值,避免闪烁
|
|
|
|