diff --git a/library.json b/library.json index b7f531b1..953443b1 100644 --- a/library.json +++ b/library.json @@ -3,7 +3,7 @@ "machineName": "H5P.VocabularyDrill", "majorVersion": 1, "minorVersion": 0, - "patchVersion": 14, + "patchVersion": 15, "runnable": 1, "license": "MIT", "author": "NDLA", diff --git a/library.json.d.ts b/library.json.d.ts index 638bd7b0..b86b855d 100644 --- a/library.json.d.ts +++ b/library.json.d.ts @@ -3,7 +3,7 @@ declare const json: { "machineName": "H5P.VocabularyDrill", "majorVersion": 1, "minorVersion": 0, - "patchVersion": 14, + "patchVersion": 15, "runnable": 1, "license": "MIT", "author": "NDLA", diff --git a/src/components/VocabularyDrill/VocabularyDrill.tsx b/src/components/VocabularyDrill/VocabularyDrill.tsx index bdf0d667..a7d277ff 100644 --- a/src/components/VocabularyDrill/VocabularyDrill.tsx +++ b/src/components/VocabularyDrill/VocabularyDrill.tsx @@ -24,6 +24,7 @@ type VocabularyDrillProps = { contentType: ChildContentType, ) => void; onChangeLanguageMode: (languageMode: LanguageModeType) => void; + onResize: () => void; }; export const VocabularyDrill: FC = ({ @@ -32,6 +33,7 @@ export const VocabularyDrill: FC = ({ previousState, onChangeContentType, onChangeLanguageMode, + onResize, }) => { const { behaviour, @@ -183,6 +185,10 @@ export const VocabularyDrill: FC = ({ } } + activeContentType.on('resize', () => { + onResize(); + }); + onChangeContentType(activeAnswerMode, activeContentType); }; diff --git a/src/h5p-vocabulary-drill.tsx b/src/h5p-vocabulary-drill.tsx index 93cdb72b..96f7f0aa 100644 --- a/src/h5p-vocabulary-drill.tsx +++ b/src/h5p-vocabulary-drill.tsx @@ -52,6 +52,7 @@ class VocabularyDrillContentType onChangeLanguageMode={(languageMode) => this.handleLanguageModeChange(languageMode) } + onResize={() => this.resize()} />