Skip to content

Commit

Permalink
fix: stratified matrix expressions (#2881)
Browse files Browse the repository at this point in the history
  • Loading branch information
shawnyama authored Feb 29, 2024
1 parent 41cb5b1 commit a4df3ea
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ const props = defineProps<{
const emit = defineEmits(['close-modal', 'update-configuration']);
const matrixShouldEval = ref(true);
const matrixShouldEval = ref(false);
</script>

<style scoped>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ watch(
if (!output[cell.row]) {
output[cell.row] = [];
}
output[cell.row][cell.col] = await getMatrixValue(cell.content.id, props.shouldEval);
output[cell.row][cell.col] = await getMatrixValue(cell.content.id);
}
})
)
Expand Down Expand Up @@ -188,10 +188,10 @@ function onEnterValueCell(variableName: string, rowIdx: number, colIdx: number)
// See ES2_2a_start in "Eval do not touch"
// Returns the presentation mathml
async function getMatrixValue(variableName: string, shouldEvaluate: boolean) {
async function getMatrixValue(variableName: string) {
const expressionBase = getMatrixExpression(variableName);
if (shouldEvaluate) {
if (props.shouldEval) {
const expressionEval = await pythonInstance.evaluateExpression(
expressionBase,
parametersValueMap.value
Expand Down

0 comments on commit a4df3ea

Please sign in to comment.