Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Implement paneldynamic and matrixdynamic animations (#8126)
* Refactor animation utils + Implement AnimationTab class * Implement animations in PanelDynamic * Implement matrixdynamic animations * Fix collapsed styles for matrix questions * Fix box-sizing for question's content * Fix padding animation is set incorrectly for complex questions * Fix separator animation causing scrollbar appear * Fix overflow while animating height * Fix angular and knockout builds * Fix scrolling during paneldynamic animations * Fix vr tests * Fix focus new panel doesnt work when animation is disabled * Fix styles * Fix vr test * small refactor * Add unit test on onNextRender method
- Loading branch information
Showing
47 changed files
with
1,530 additions
and
561 deletions.
There are no files selected for viewing
2 changes: 1 addition & 1 deletion
2
packages/survey-angular-ui/src/questions/matrix-row.component.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
32 changes: 17 additions & 15 deletions
32
packages/survey-angular-ui/src/questions/matrixtable.component.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
<template> | ||
<tr | ||
:data-sv-drop-target-matrix-row="row.row && row.row.id" | ||
@pointerdown="question.onPointerDown($event, row.row)" | ||
:class="row.className" | ||
v-if="row.visible" | ||
ref="root" | ||
> | ||
<survey-matrixdropdown-cell | ||
:cell="cell" | ||
:question="question" | ||
v-for="(cell, cellIndex) in row.cells" | ||
:key="row.id + '_' + cellIndex" | ||
/> | ||
</tr> | ||
</template> | ||
<script lang="ts" setup> | ||
import type { | ||
QuestionMatrixDropdownRenderedRow, | ||
QuestionMatrixDropdownModel, | ||
} from "survey-core"; | ||
import { useBase } from "./base"; | ||
import { watch, onMounted, onUnmounted, ref } from "vue"; | ||
const props = defineProps<{ | ||
question: QuestionMatrixDropdownModel; | ||
row: QuestionMatrixDropdownRenderedRow; | ||
}>(); | ||
const root = ref<HTMLElement>(); | ||
useBase(() => props.row); | ||
const stopWatch = watch( | ||
() => props.row, | ||
(newValue, oldValue) => { | ||
if (oldValue) { | ||
oldValue.setRootElement(undefined as any); | ||
} | ||
newValue.setRootElement(root.value as any); | ||
} | ||
); | ||
onMounted(() => { | ||
props.row.setRootElement(root.value as any); | ||
}); | ||
onUnmounted(() => { | ||
props.row.setRootElement(undefined as any); | ||
stopWatch(); | ||
}); | ||
</script> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.