From 1e38b12312c7fb1a836c7ac675efa55bb65ef0a2 Mon Sep 17 00:00:00 2001 From: smmercuri <smercuri@ed.ac.uk> Date: Tue, 12 Dec 2023 13:57:51 +0000 Subject: [PATCH] Bug fix to correct jsxgraph collapsing in height by changing 100% to 100vh in l.124 --- stack/cas/castext2/blocks/jsxgraph.block.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/stack/cas/castext2/blocks/jsxgraph.block.php b/stack/cas/castext2/blocks/jsxgraph.block.php index 2339533a5..b6e149081 100644 --- a/stack/cas/castext2/blocks/jsxgraph.block.php +++ b/stack/cas/castext2/blocks/jsxgraph.block.php @@ -121,13 +121,13 @@ class stack_cas_castext2_jsxgraph extends stack_cas_castext2_block { $height = $xpars['height']; } - $astyle = "width:calc(100% - 3px);height:calc(100% - 3px);"; + $astyle = "width:calc(100% - 3px);height:calc(100vh - 3px);"; if (array_key_exists('aspect-ratio', $xpars)) { $aspectratio = $xpars['aspect-ratio']; // Unset the undefined dimension, if both are defined then we have a problem. if (array_key_exists('height', $xpars)) { - $astyle = "height:calc($100% - 3px);aspect-ratio:$aspectratio;"; + $astyle = "height:calc(100% - 3px);aspect-ratio:$aspectratio;"; } else if (array_key_exists('width', $xpars)) { $astyle = "width:calc(100% - 3px);aspect-ratio:$aspectratio;"; } -- GitLab