|
|
@@ -224,14 +224,14 @@ 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.1) {
|
|
|
|
props.materialList.virtual.w = 0.1;
|
|
|
|
if (props.materialList.virtual.w < 0.2) {
|
|
|
|
props.materialList.virtual.w = 0.2;
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
props.materialList.virtual.w = (baseLineScale + boxDistance2) / baseLine;
|
|
|
|
} else {
|
|
|
|
if (props.materialList.virtual.w > 1.3) {
|
|
|
|
props.materialList.virtual.w = 1.3;
|
|
|
|
if (props.materialList.virtual.w > 2.0) {
|
|
|
|
props.materialList.virtual.w = 2.0;
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
props.materialList.virtual.w = (baseLineScale - boxDistance2) / baseLine;
|
|
|
@@ -298,15 +298,15 @@ function changeScaleSc(index, event) { |
|
|
|
let deltaY = touchStart.pageY - y;
|
|
|
|
let boxDistance2 = Math.sqrt(deltaX ** 2 + deltaY ** 2);
|
|
|
|
if (deltaX < 0) {
|
|
|
|
if (props.materialList.scList[index].w < 0.4) {
|
|
|
|
props.materialList.scList[index].w = 0.4;
|
|
|
|
if (props.materialList.scList[index].w < 0.2) {
|
|
|
|
props.materialList.scList[index].w = 0.2;
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
props.materialList.scList[index].w =
|
|
|
|
(baseLineScale + boxDistance2) / baseLine;
|
|
|
|
} else {
|
|
|
|
if (props.materialList.scList[index].w > 1.3) {
|
|
|
|
props.materialList.scList[index].w = 1.3;
|
|
|
|
if (props.materialList.scList[index].w > 2.0) {
|
|
|
|
props.materialList.scList[index].w = 2.0;
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
props.materialList.scList[index].w =
|
|
|
|