修复计算错误

This commit is contained in:
shefengchun 2023-01-14 13:24:27 +08:00
parent 97c52eabb2
commit e9f0be2607
2 changed files with 21 additions and 11 deletions

View File

@ -542,7 +542,7 @@ export default defineComponent({
const moveHandler_2 = (data: any) => {
let x =
config.width / 2 +
Math.ceil((data.left - ninepostion.value[1].x) * centor.value.x);
Math.ceil((data.left - ninepostion.value[1].x) * Proportion.value.x);
let y =
config.height -
Math.ceil((data.top - ninepostion.value[1].y) * Proportion.value.y);
@ -575,7 +575,7 @@ export default defineComponent({
const moveHandler_5 = (data: any) => {
let x =
config.width / 2 +
Math.ceil((data.left - ninepostion.value[4].x) * centor.value.x);
Math.ceil((data.left - ninepostion.value[4].x) * Proportion.value.x);
let y =
config.height / 2 -
Math.ceil((data.top - ninepostion.value[4].y) * Proportion.value.y);

View File

@ -10,7 +10,7 @@
}
"
>
<q-card class="overflow-hidden" style="max-width: 90vw; height: 90vh">
<q-card class="" style="max-width: 90vw">
<q-form>
<q-card-section class="q-ma-none q-pa-sm">
<div class="row">
@ -96,7 +96,12 @@
<q-separator />
<q-card-actions align="right">
<span>{{$t('Whether to hide the desktop')}}</span><q-checkbox style="justify-content: flex-start;" v-model="hide_desktop_value" @click="send_hide_desktop" />
<span>{{ $t("Whether to hide the desktop") }}</span
><q-checkbox
style="justify-content: flex-start"
v-model="hide_desktop_value"
@click="send_hide_desktop"
/>
<div class="q-space" data-v-39efcd1f=""></div>
<q-btn
flat
@ -175,14 +180,14 @@ export default defineComponent({
show_dialog.value = true;
};
const send_hide_desktop = () => {
set?.SetBlendingOption(0,hide_desktop_value.value?1:0)
}
set?.SetBlendingOption(0, hide_desktop_value.value ? 1 : 0);
};
const config = ref({ col: 0, row: 0 });
const EnableBlending = ref(false);
let optionsstr = ref();
optionsstr.value = "FusionLocale";
const hide_desktop_value=ref(true)
const hide_desktop_id=ref(0)
const hide_desktop_value = ref(true);
const hide_desktop_id = ref(0);
const options = computed({
get() {
return optionsstr.value;
@ -230,8 +235,6 @@ export default defineComponent({
let tmp = JSON.parse(res ? res.config : "");
$store.commit("setEnablefusion", tmp.enable);
$store.commit("setfusion_configuration", res?.config);
hide_desktop_id.value=tmp.options[0]
hide_desktop_value.value=tmp.options[1]==0?false:true
});
} catch (error) {}
};
@ -262,6 +265,13 @@ export default defineComponent({
}
}, 1000);
});
onMounted(() => {
set?.GetBlendingConfig("").then((res) => {
let tmp = JSON.parse(res ? res.config : "");
hide_desktop_id.value = tmp.options[0];
hide_desktop_value.value = tmp.options[1] == 0 ? false : true;
});
});
return {
send_hide_desktop,
hide_desktop_value,