魔墙:修复因恢复导致的控制台缩放导致显示错误
This commit is contained in:
parent
3c20ba2461
commit
d47ebdf1d4
|
@ -1208,9 +1208,8 @@ export default defineComponent({
|
||||||
};
|
};
|
||||||
EventBus.getInstance().on(EventNamesDefine.WindowResize, () => {
|
EventBus.getInstance().on(EventNamesDefine.WindowResize, () => {
|
||||||
const wall_dom = wall.value;
|
const wall_dom = wall.value;
|
||||||
console.log(test_monitor_wall.value)
|
|
||||||
if (wall_dom) {
|
if (wall_dom) {
|
||||||
test_monitor_wall.value.forEach((element) => {
|
test_monitor_wall.value.forEach(async (element) => {
|
||||||
let teph = element.InitialH;
|
let teph = element.InitialH;
|
||||||
let tepw = element.InitialW;
|
let tepw = element.InitialW;
|
||||||
element.InitialH = wall_dom.offsetHeight * element.resizeh;
|
element.InitialH = wall_dom.offsetHeight * element.resizeh;
|
||||||
|
@ -1224,7 +1223,6 @@ export default defineComponent({
|
||||||
element.centerx = Math.floor(element.currentx + element.w / 2);
|
element.centerx = Math.floor(element.currentx + element.w / 2);
|
||||||
element.centery = Math.floor(element.currenty + element.h / 2);
|
element.centery = Math.floor(element.currenty + element.h / 2);
|
||||||
});
|
});
|
||||||
getpx();
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
return {
|
return {
|
||||||
|
@ -1317,6 +1315,8 @@ export default defineComponent({
|
||||||
extend(true, item, test_monitor_list.value[element.index]);
|
extend(true, item, test_monitor_list.value[element.index]);
|
||||||
let sizeh = wall_dom.offsetHeight / element.background_h;
|
let sizeh = wall_dom.offsetHeight / element.background_h;
|
||||||
let sizew = wall_dom.offsetWidth / element.background_w;
|
let sizew = wall_dom.offsetWidth / element.background_w;
|
||||||
|
item.resizew = element.w ;
|
||||||
|
item.resizeh = element.h ;
|
||||||
item.currentx = element.lt.x * wall_dom.offsetWidth;
|
item.currentx = element.lt.x * wall_dom.offsetWidth;
|
||||||
item.currenty = element.lt.y * wall_dom.offsetHeight;
|
item.currenty = element.lt.y * wall_dom.offsetHeight;
|
||||||
percenter.value = parseFloat(element.percenter.toString());
|
percenter.value = parseFloat(element.percenter.toString());
|
||||||
|
@ -1325,6 +1325,7 @@ export default defineComponent({
|
||||||
item.InitialW = element.initial_w * sizew;
|
item.InitialW = element.initial_w * sizew;
|
||||||
item.h = item.InitialH * percenter.value;
|
item.h = item.InitialH * percenter.value;
|
||||||
item.w = item.InitialW * percenter.value;
|
item.w = item.InitialW * percenter.value;
|
||||||
|
|
||||||
item.centerx = Math.floor(item.currentx + item.w / 2);
|
item.centerx = Math.floor(item.currentx + item.w / 2);
|
||||||
item.centery = Math.floor(item.currenty + item.h / 2);
|
item.centery = Math.floor(item.currenty + item.h / 2);
|
||||||
item.angle = element.angle;
|
item.angle = element.angle;
|
||||||
|
@ -1391,7 +1392,7 @@ export default defineComponent({
|
||||||
});
|
});
|
||||||
const setMagic = await client.setMagicWallConfig(cloud_monitor_list);
|
const setMagic = await client.setMagicWallConfig(cloud_monitor_list);
|
||||||
if (setMagic?.success) {
|
if (setMagic?.success) {
|
||||||
let monitorList:any=[]
|
let monitorList: any = [];
|
||||||
test_monitor_wall.value.forEach((element, index) => {
|
test_monitor_wall.value.forEach((element, index) => {
|
||||||
if (element.isShow && wall_dom) {
|
if (element.isShow && wall_dom) {
|
||||||
monitorList.push({
|
monitorList.push({
|
||||||
|
|
|
@ -28,7 +28,9 @@
|
||||||
item.y * ($refs.wall?.offsetHeight ?? 0)
|
item.y * ($refs.wall?.offsetHeight ?? 0)
|
||||||
"
|
"
|
||||||
:zIndex="
|
:zIndex="
|
||||||
$store.state.windows_sort.findIndex((element) => element == item.uuid) +1
|
$store.state.windows_sort.findIndex(
|
||||||
|
(element) => element == item.uuid
|
||||||
|
) + 1
|
||||||
"
|
"
|
||||||
:isActive="item.uuid == $store.state.selected_window"
|
:isActive="item.uuid == $store.state.selected_window"
|
||||||
:resizeIconSize="14"
|
:resizeIconSize="14"
|
||||||
|
@ -76,12 +78,7 @@
|
||||||
$store.state.custom_defines.function_magic_wall
|
$store.state.custom_defines.function_magic_wall
|
||||||
"
|
"
|
||||||
>
|
>
|
||||||
<div
|
<div class="row magic_wall_grids" style="height: 31.05vw; width: 55.2vw">
|
||||||
class="row magic_wall_grids"
|
|
||||||
:style="{
|
|
||||||
height: magic_height(item_height) + 'px',
|
|
||||||
}"
|
|
||||||
>
|
|
||||||
<vue3-resize-drag
|
<vue3-resize-drag
|
||||||
v-for="(item, index) of $store.state.show_monitor_list"
|
v-for="(item, index) of $store.state.show_monitor_list"
|
||||||
:w="item.w * $refs.wall?.clientWidth"
|
:w="item.w * $refs.wall?.clientWidth"
|
||||||
|
@ -93,7 +90,9 @@
|
||||||
:isGuide="false"
|
:isGuide="false"
|
||||||
class="magic_wall"
|
class="magic_wall"
|
||||||
@dragenter="magic_select(index, item, $event)"
|
@dragenter="magic_select(index, item, $event)"
|
||||||
|
style="text-align: center"
|
||||||
>
|
>
|
||||||
|
{{ item.id + 1 }}
|
||||||
</vue3-resize-drag>
|
</vue3-resize-drag>
|
||||||
|
|
||||||
<q-popup-proxy
|
<q-popup-proxy
|
||||||
|
@ -344,8 +343,11 @@ export default defineComponent({
|
||||||
nextTick(() => {
|
nextTick(() => {
|
||||||
show_windows_flag.value = true;
|
show_windows_flag.value = true;
|
||||||
});
|
});
|
||||||
|
if (wall.value) {
|
||||||
|
let teph = wall.value?.clientHeight / offsetHeight;
|
||||||
|
let tepw = wall.value?.clientWidth / offsetWidth;
|
||||||
|
}
|
||||||
}, 100);
|
}, 100);
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
EventBus.getInstance().on(
|
EventBus.getInstance().on(
|
||||||
|
@ -355,7 +357,8 @@ export default defineComponent({
|
||||||
|
|
||||||
const last_context_menu_pos_x = ref(0);
|
const last_context_menu_pos_x = ref(0);
|
||||||
const last_context_menu_pos_y = ref(0);
|
const last_context_menu_pos_y = ref(0);
|
||||||
|
let offsetHeight = 0;
|
||||||
|
let offsetWidth = 0;
|
||||||
const plan_running = computed(
|
const plan_running = computed(
|
||||||
() => $store.state.current_running_plan.trim() != ""
|
() => $store.state.current_running_plan.trim() != ""
|
||||||
);
|
);
|
||||||
|
@ -712,16 +715,9 @@ export default defineComponent({
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
const magic_height = (h: number) => {
|
|
||||||
const wall_dom = wall.value;
|
|
||||||
if (wall_dom?.parentElement) {
|
|
||||||
h = wall_dom.parentElement.offsetHeight * 0.6;
|
|
||||||
}
|
|
||||||
return 500;
|
|
||||||
};
|
|
||||||
|
|
||||||
const show_magic_wall = async () => {
|
const show_magic_wall = async () => {
|
||||||
console.log( $store.state.windows_sort)
|
|
||||||
// $store.state.windows_sort.findIndex((element) => element == item.uuid)
|
// $store.state.windows_sort.findIndex((element) => element == item.uuid)
|
||||||
let client = GlobalData.getInstance().getCurrentClient();
|
let client = GlobalData.getInstance().getCurrentClient();
|
||||||
if (client) {
|
if (client) {
|
||||||
|
@ -731,6 +727,8 @@ export default defineComponent({
|
||||||
const wall_dom = wall.value;
|
const wall_dom = wall.value;
|
||||||
let monitorList: any = [];
|
let monitorList: any = [];
|
||||||
if (a && wall_dom) {
|
if (a && wall_dom) {
|
||||||
|
offsetHeight = wall_dom.clientHeight;
|
||||||
|
offsetWidth = wall_dom.clientHeight;
|
||||||
a.forEach((element) => {
|
a.forEach((element) => {
|
||||||
let item: test_monitor = new test_monitor(0, 0, 0);
|
let item: test_monitor = new test_monitor(0, 0, 0);
|
||||||
item.h = element.h;
|
item.h = element.h;
|
||||||
|
@ -1063,7 +1061,6 @@ export default defineComponent({
|
||||||
};
|
};
|
||||||
|
|
||||||
return {
|
return {
|
||||||
magic_height,
|
|
||||||
windows,
|
windows,
|
||||||
wall,
|
wall,
|
||||||
window_rect_edit_dialog,
|
window_rect_edit_dialog,
|
||||||
|
|
Loading…
Reference in New Issue