-
-
-
+
+
+
-
-
-
+
+
+
-
1
+
+ 1
- 2
+
+ 2
- 3
+
+ 3
- 4
+
+ 4
@@ -123,80 +48,37 @@
-
-
-
+
+
+
-
+
-
-
-
+
+
+
@@ -219,6 +101,7 @@ import { useStore } from "src/store";
import { useI18n } from "vue-i18n";
import ClientConnection from "src/common/ClientConnection";
import GlobalData from "src/common/GlobalData";
+import { Console } from "console";
export default defineComponent({
name: "ComponentFourPointCalibration",
@@ -274,7 +157,7 @@ export default defineComponent({
{ x: 0, y: 0 },
{ x: 0, y: 0 },
]); //点的位置
- const now_index=ref(0)
+ const now_index = ref(0)
const isshowarray = ref([true, true, true, true]);
const isactivearray = ref([true, true, true, true]);
const ste_status = ref(0);
@@ -311,13 +194,53 @@ export default defineComponent({
});
const activeMouseDown = (index: number) => {
isactivearray.value[index] = true;
- now_index.value=index
+ now_index.value = index
};
const mouseUpHandler = (index: number) => {
isactivearray.value[index] = false;
};
+ const keyDown = () => {
+ document.onkeydown = (e) => {
+
+
+ // let x = Math.ceil(four[now_index.value].x / Proportion.value.x);
+ // let y = Math.ceil((config.height - four[now_index.value].y) / Proportion.value.y);
+ // points[now_index.value].x!=x?points[now_index.value].x = x:''
+ // points[now_index.value].y!= y?points[now_index.value].y = y:''
+
+ let e1 = e || window.event || arguments.callee.caller.arguments[0]
+ switch (e.code) {
+ case "KeyW":
+ points[now_index.value].x
+ points[now_index.value].y--
+ break;
+ case "KeyA":
+ points[now_index.value].x--;
+ points[now_index.value].y
+ break;
+ case "KeyS":
+ points[now_index.value].x;
+ points[now_index.value].y++
+ break;
+ case "KeyD":
+ points[now_index.value].x++;
+ points[now_index.value].y
+ break;
+ default:
+ break;
+ }
+ let tmp = { left: points[now_index.value].x, top: points[now_index.value].y }
+ eval(`moveHandler_${now_index.value+1}(tmp)`);
+ isactivearray.value[now_index.value] = false;
+ isshowarray.value[now_index.value] = false;
+ setTimeout(() => {
+ isshowarray.value[now_index.value] = true;
+ }, 100);
+ }
+ }
onMounted(() => {
ste_status.value = 1;
+ keyDown()
setpoa();
setTimeout(() => {
@@ -327,8 +250,6 @@ export default defineComponent({
const use_server_config = () => {
for (let index = 0; index < fourpostion.value.length; index++) {
- // defaultfourpostion.value[index].x = fourpostion.value[index].x;
- // defaultfourpostion.value[index].y = fourpostion.value[index].y;
defaultfour.value[index].x = config.point4[index].def_x;
defaultfour.value[index].y = config.point4[index].def_y;
four[index].x = config.point4[index].x;
@@ -338,50 +259,50 @@ export default defineComponent({
const setpoa = () => {
try {
- points[0].x = 0;
- points[0].y = 0;
+ points[0].x = 0;
+ points[0].y = 0;
- points[1].x = div.value.offsetWidth - 25;
- points[1].y = 0;
+ points[1].x = div.value.offsetWidth - 25;
+ points[1].y = 0;
- points[2].x = 0;
- points[2].y = div.value.offsetHeight - 25;
+ points[2].x = 0;
+ points[2].y = div.value.offsetHeight - 25;
- points[3].x = div.value.offsetWidth - 25;
- points[3].y = div.value.offsetHeight - 25;
+ points[3].x = div.value.offsetWidth - 25;
+ points[3].y = div.value.offsetHeight - 25;
- fourpostion.value[0].x = 0;
- fourpostion.value[0].y = 0;
+ fourpostion.value[0].x = 0;
+ fourpostion.value[0].y = 0;
- fourpostion.value[1].x = div.value.offsetWidth - 25;
- fourpostion.value[1].y = 0;
+ fourpostion.value[1].x = div.value.offsetWidth - 25;
+ fourpostion.value[1].y = 0;
- fourpostion.value[2].x = 0;
- fourpostion.value[2].y = div.value.offsetHeight - 25;
+ fourpostion.value[2].x = 0;
+ fourpostion.value[2].y = div.value.offsetHeight - 25;
- fourpostion.value[3].x = div.value.offsetWidth - 25;
- fourpostion.value[3].y = div.value.offsetHeight - 25;
+ fourpostion.value[3].x = div.value.offsetWidth - 25;
+ fourpostion.value[3].y = div.value.offsetHeight - 25;
- Proportion.value.x = config.width / (div.value.offsetWidth - 25);
- Proportion.value.y = config.height / (div.value.offsetHeight - 25);
- for (let index = 0; index < fourpostion.value.length; index++) {
- defaultfourpostion.value[index].x = fourpostion.value[index].x;
- defaultfourpostion.value[index].y = fourpostion.value[index].y;
- defaultfour.value[index].x = config.point4[index].def_x;
- defaultfour.value[index].y = config.point4[index].def_y;
- four[index].x = config.point4[index].x;
- four[index].y = config.point4[index].y;
- }
- if (
- sessionStorage.FourPointCalibration &&
- sessionStorage.FourPointCalibration.length > 0
- ) {
- set_cache.value = JSON.parse(sessionStorage.FourPointCalibration);
- use_set_cache();
- } else {
- }
- set_point_x();
- } catch (error) {
+ Proportion.value.x = config.width / (div.value.offsetWidth - 25);
+ Proportion.value.y = config.height / (div.value.offsetHeight - 25);
+ for (let index = 0; index < fourpostion.value.length; index++) {
+ defaultfourpostion.value[index].x = fourpostion.value[index].x;
+ defaultfourpostion.value[index].y = fourpostion.value[index].y;
+ defaultfour.value[index].x = config.point4[index].def_x;
+ defaultfour.value[index].y = config.point4[index].def_y;
+ four[index].x = config.point4[index].x;
+ four[index].y = config.point4[index].y;
+ }
+ if (
+ sessionStorage.FourPointCalibration &&
+ sessionStorage.FourPointCalibration.length > 0
+ ) {
+ set_cache.value = JSON.parse(sessionStorage.FourPointCalibration);
+ use_set_cache();
+ } else {
+ }
+ set_point_x();
+ } catch (error) {
}
};
@@ -408,7 +329,7 @@ export default defineComponent({
isshowarray.value[0] = true;
}, 100);
}
- now_index.value=0
+ now_index.value = 0
save_set_cache();
},
{ deep: true }
@@ -436,7 +357,7 @@ export default defineComponent({
isshowarray.value[1] = true;
}, 100);
}
- now_index.value=1
+ now_index.value = 1
save_set_cache();
},
{ deep: true }
@@ -466,7 +387,7 @@ export default defineComponent({
isshowarray.value[2] = true;
}, 100);
}
- now_index.value=2
+ now_index.value = 2
save_set_cache();
},
{ deep: true }
@@ -496,7 +417,7 @@ export default defineComponent({
isshowarray.value[3] = true;
}, 100);
}
- now_index.value=3
+ now_index.value = 3
save_set_cache();
},
{ deep: true }
@@ -527,9 +448,9 @@ export default defineComponent({
},
{ deep: true }
);
- watch(()=>now_index,(newval,oldval)=>{
- set?.SetBlendingOption("blending_grids_select_point",`4:${now_index.value+1}`)
- },{ deep: true })
+ watch(() => now_index, (newval, oldval) => {
+ set?.SetBlendingOption("blending_grids_select_point", `4:${now_index.value + 1}`)
+ }, { deep: true })
//为了加载 缓存的配置时 同步点的位置
const syncpoint = () => {
for (let index = 0; index < fourpostion.value.length; index++) {
@@ -597,10 +518,10 @@ export default defineComponent({
};
const moveHandler_1 = (data: any) => {
- let x = Math.ceil(
+ let x = Math.round(
(data.left - fourpostion.value[0].x) * Proportion.value.x + 0
);
- let y = Math.ceil(
+ let y = Math.round(
config.height - data.top * Proportion.value.y - fourpostion.value[0].y
);
@@ -610,10 +531,10 @@ export default defineComponent({
save_set_cache();
};
const moveHandler_2 = (data: any) => {
- let x = Math.ceil(
+ let x = Math.round(
(data.left - fourpostion.value[1].x) * Proportion.value.x + config.width
);
- let y = Math.ceil(
+ let y = Math.round(
config.height - data.top * Proportion.value.y - fourpostion.value[1].y
);
four[1].x = x > config.width ? config.width : x && x < 0 ? 0 : x;
@@ -621,22 +542,22 @@ export default defineComponent({
save_set_cache();
};
const moveHandler_3 = (data: any) => {
- let x = Math.ceil(
+ let x = Math.round(
(data.left - fourpostion.value[2].x) * Proportion.value.x
);
let y = Math.abs(
- Math.ceil((data.top - fourpostion.value[2].y) * Proportion.value.y)
+ Math.round((data.top - fourpostion.value[2].y) * Proportion.value.y)
);
four[2].x = x > config.width ? config.width : x && x < 0 ? 0 : x;
four[2].y = y > config.height ? config.height : y && y < 0 ? 0 : y;
save_set_cache();
};
const moveHandler_4 = (data: any) => {
- let x = Math.ceil(
+ let x = Math.round(
(data.left - fourpostion.value[3].x) * Proportion.value.x + config.width
);
let y = Math.abs(
- Math.ceil((data.top - fourpostion.value[3].y) * Proportion.value.y)
+ Math.round((data.top - fourpostion.value[3].y) * Proportion.value.y)
);
four[3].x = x > config.width ? config.width : x && x < 0 ? 0 : x;
four[3].y = y > config.height ? config.height : y && y < 0 ? 0 : y;
@@ -648,7 +569,7 @@ export default defineComponent({
window.onresize = () => {
return (() => {
ste_status.value = 1;
- if(div!=null)setpoa();
+ if (div != null) setpoa();
setTimeout(() => {
ste_status.value = 0;
diff --git a/src/components/FusionSettings/FusionLocale.vue b/src/components/FusionSettings/FusionLocale.vue
index 876431c..f4b534c 100644
--- a/src/components/FusionSettings/FusionLocale.vue
+++ b/src/components/FusionSettings/FusionLocale.vue
@@ -97,7 +97,7 @@
-
-
diff --git a/src/components/FusionSettings/GridSettings.vue b/src/components/FusionSettings/GridSettings.vue
index 9c7313b..6e4a9b5 100644
--- a/src/components/FusionSettings/GridSettings.vue
+++ b/src/components/FusionSettings/GridSettings.vue
@@ -20,33 +20,34 @@
v-model="RowsColumns[1]" />
+
-
- {{ $t("line color") }}
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+ {{ $t("line color") }}
+
+
+
+
+
+
+
+
+
+
+
+
+
@@ -55,31 +56,48 @@
-
- {{ $t("background color") }}
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+ {{ $t("background color") }}
+
+
+
+
+
+
+
+
+
+
+
+
+