From b4338153f9c016c641d006dda9352df2841fc0d3 Mon Sep 17 00:00:00 2001
From: shefengchun <1077478963@qq.com>
Date: Thu, 16 Feb 2023 16:31:29 +0800
Subject: [PATCH] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E4=BA=A4=E4=BA=92=E5=A2=9E?=
=?UTF-8?q?=E5=8A=A0=E8=AE=BE=E7=BD=AE=E5=88=86=E8=BE=A8=E7=8E=87?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../FusionSettings/DensityCorrection.vue | 11 +++---
.../FusionSettings/FourPointCalibration.vue | 14 +++----
.../FusionSettings/SurfaceCorrection.vue | 11 +++---
src/components/FusionSettingsDialog.vue | 39 ++++++++++++++++---
src/i18n/en-US/index.ts | 3 +-
src/i18n/zh-CN/index.ts | 3 +-
6 files changed, 56 insertions(+), 25 deletions(-)
diff --git a/src/components/FusionSettings/DensityCorrection.vue b/src/components/FusionSettings/DensityCorrection.vue
index aa4c76d..ffa6a99 100644
--- a/src/components/FusionSettings/DensityCorrection.vue
+++ b/src/components/FusionSettings/DensityCorrection.vue
@@ -194,6 +194,7 @@ export default defineComponent({
});
//用于计算当前投影仪的索引
+ let allconfig = JSON.parse($store.state.fusion_configuration);
let serverconfig = JSON.parse($store.state.fusion_configuration);
const selectedprojector = computed(() => {
return (
@@ -449,7 +450,7 @@ export default defineComponent({
*/
const coordinate_transformation_value_to_xy = (x: number, y: number): { x: number, y: number } => {
x = x / Proportion.value.x
- y = (config.height - y) / Proportion.value.y
+ y = (allconfig.projector_height - y) / Proportion.value.y
return { x, y }
}
@@ -515,8 +516,8 @@ export default defineComponent({
}
start()
onMounted(() => {
- Proportion.value.x = config.width / (div.value.offsetWidth - point.value.w)
- Proportion.value.y = config.height / (div.value.offsetHeight - point.value.h)
+ Proportion.value.x = allconfig.projector_width / (div.value.offsetWidth - point.value.w)
+ Proportion.value.y = allconfig.projector_height / (div.value.offsetHeight - point.value.h)
options_value_h_point_amount.value = Object.keys(config.multi_hor_density)
options_value_v_point_amount.value = Object.keys(config.multi_ver_density)
let tmp = JSON.parse($store.state.fusion_configuration).options;
@@ -723,8 +724,8 @@ export default defineComponent({
*/
const recalculate_coordinates = () => {
try {
- Proportion.value.x = config.width / (div.value.offsetWidth - point.value.w)
- Proportion.value.y = config.height / (div.value.offsetHeight - point.value.h)
+ Proportion.value.x = allconfig.projector_width / (div.value.offsetWidth - point.value.w)
+ Proportion.value.y = allconfig.projector_height / (div.value.offsetHeight - point.value.h)
max.value.x = div.value.offsetWidth
max.value.y = div.value.offsetHeight
for (let index = 0; index < value_v_point_amount.value; index++) {
diff --git a/src/components/FusionSettings/FourPointCalibration.vue b/src/components/FusionSettings/FourPointCalibration.vue
index 98b417d..f0ab08c 100644
--- a/src/components/FusionSettings/FourPointCalibration.vue
+++ b/src/components/FusionSettings/FourPointCalibration.vue
@@ -88,6 +88,7 @@ export default defineComponent({
let $store = useStore();
let $t = useI18n();
const ste_status = ref(0);
+ let allconfig = JSON.parse($store.state.fusion_configuration);
let config = JSON.parse($store.state.fusion_configuration).projectors[0];
const configselsect = computed(() => {
return $store.state.selected_projector;
@@ -245,7 +246,7 @@ export default defineComponent({
*/
const coordinate_transformation_value_to_xy = (x: number, y: number): { x: number, y: number } => {
x = x / Proportion.value.x
- y = (config.height - y) / Proportion.value.y
+ y = (allconfig.projector_height - y) / Proportion.value.y
return { x, y }
}
@@ -291,8 +292,8 @@ export default defineComponent({
}
start()
onMounted(() => {
- Proportion.value.x = config.width / (div.value.offsetWidth - point.value.w)
- Proportion.value.y = config.height / (div.value.offsetHeight - point.value.h)
+ Proportion.value.x = allconfig.projector_width / (div.value.offsetWidth - point.value.w)
+ Proportion.value.y = allconfig.projector_height / (div.value.offsetHeight - point.value.h)
start_point()
start()
use_server_config()
@@ -319,8 +320,6 @@ export default defineComponent({
const reset = (index: number, send: boolean, type: string) => {
value.value[index].x = value.value[index].def_x
value.value[index].y = value.value[index].def_y
- // value_point.value[index].x = value_point.value[index].def_x
- // value_point.value[index].y = value_point.value[index].def_y
chang(index, value.value[index].def_y, type)
save_set_cache()
}
@@ -336,14 +335,13 @@ export default defineComponent({
let tmp = coordinate_transformation_value_to_xy(value.value[index].x, value.value[index].y)
value_point.value[index].y = Math.round(tmp.y)
value_point.value[index].x = Math.round(tmp.x)
- //reset(index, true, 'v')
}
send_value(-2,0,0)
}
const recalculate_coordinates = () => {
try {
- Proportion.value.x = config.width / (div.value.offsetWidth - point.value.w)
- Proportion.value.y = config.height / (div.value.offsetHeight - point.value.h)
+ Proportion.value.x = allconfig.projector_width / (div.value.offsetWidth - point.value.w)
+ Proportion.value.y = allconfig.projector_height / (div.value.offsetHeight - point.value.h)
max.value.x = div.value.offsetWidth
max.value.y = div.value.offsetHeight
for (let index = 0; index < value.value.length; index++) {
diff --git a/src/components/FusionSettings/SurfaceCorrection.vue b/src/components/FusionSettings/SurfaceCorrection.vue
index 0f0e6f3..9f89e9b 100644
--- a/src/components/FusionSettings/SurfaceCorrection.vue
+++ b/src/components/FusionSettings/SurfaceCorrection.vue
@@ -124,6 +124,7 @@ export default defineComponent({
let $store = useStore();
let $t = useI18n();
const ste_status = ref(0);
+ let allconfig = JSON.parse($store.state.fusion_configuration);
let config = JSON.parse($store.state.fusion_configuration).projectors[0];
const configselsect = computed(() => {
return $store.state.selected_projector;
@@ -297,7 +298,7 @@ export default defineComponent({
*/
const coordinate_transformation_value_to_xy = (x: number, y: number): { x: number, y: number } => {
x = x / Proportion.value.x
- y = (config.height - y) / Proportion.value.y
+ y = (allconfig.projector_height - y) / Proportion.value.y
return { x, y }
}
@@ -340,8 +341,8 @@ export default defineComponent({
}
start()
onMounted(() => {
- Proportion.value.x = config.width / (div.value.offsetWidth - point.value.w)
- Proportion.value.y = config.height / (div.value.offsetHeight - point.value.h)
+ Proportion.value.x = allconfig.projector_width / (div.value.offsetWidth - point.value.w)
+ Proportion.value.y = allconfig.projector_height / (div.value.offsetHeight - point.value.h)
start_point(9)
start()
use_server_config()
@@ -389,8 +390,8 @@ export default defineComponent({
}
const recalculate_coordinates = () => {
try {
- Proportion.value.x = config.width / (div.value.offsetWidth - point.value.w)
- Proportion.value.y = config.height / (div.value.offsetHeight - point.value.h)
+ Proportion.value.x = allconfig.projector_width / (div.value.offsetWidth - point.value.w)
+ Proportion.value.y = allconfig.projector_height / (div.value.offsetHeight - point.value.h)
max.value.x = div.value.offsetWidth
max.value.y = div.value.offsetHeight
for (let index = 0; index < value.value.length; index++) {
diff --git a/src/components/FusionSettingsDialog.vue b/src/components/FusionSettingsDialog.vue
index dc08e4d..5571ce4 100644
--- a/src/components/FusionSettingsDialog.vue
+++ b/src/components/FusionSettingsDialog.vue
@@ -48,7 +48,7 @@
}}