[go: up one dir, main page]

Skip to content

Commit

Permalink
fix (placeholder poly): fixed placeholder on macOs
Browse files Browse the repository at this point in the history
  • Loading branch information
BabelDev0 committed Dec 29, 2022
1 parent 8618711 commit 992e7d8
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 4 deletions.
15 changes: 12 additions & 3 deletions GDonut-app/src/components/Calculator.vue
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@
style="display: flex; align-items: center; justify-content: flex-start"
>
<span
v-if="poly == ''"
v-if="isPolyEmpty"
class="absolute q-pl-sm"
style="color: grey; font-size: medium"
>
Expand Down Expand Up @@ -314,6 +314,10 @@ var timerCallShowGeneo = 0;
// polynomial to be evaluated
const poly = ref<string>("");
// mange placeholder for the polynomial input
const previousPoly = ref<string>("");
const isPolyEmpty = ref(true);
// drawer settings
const drawerSize = 500;
const leftDrawerOpen = true;
Expand Down Expand Up @@ -471,10 +475,15 @@ onMounted(() => {
canvasGeneo = document.getElementById("canvasGeneo");
filePicker = document.getElementById("filePicker");
const mf = document.getElementById("formula");
// binds the contents of the math field with the polynomial variable
if (document.getElementById("formula")) {
document.getElementById("formula")!.addEventListener("input", (ev: any) => {
// and show the placeholder if the polynomial is empty
if (mf) {
mf.addEventListener("input", (ev: any) => {
isPolyEmpty.value = ev.target.value == "" && previousPoly.value != "";
poly.value = ev.target.value;
previousPoly.value = poly.value;
});
}
});
Expand Down
2 changes: 1 addition & 1 deletion GDonut-app/src/components/dialog/GroupInfoDialog.vue
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@
<li class="q-mt-sm">
<span>
<span style="color: #bb2e29">Use</span>
\sigma_n as the n-th elementary symmetric polynomial
sigma_n as the n-th elementary symmetric polynomial
</span>
</li>
<li class="q-mt-sm">
Expand Down

0 comments on commit 992e7d8

Please sign in to comment.