33 IJGISLayer ,
44 IJGISStoryMap ,
55 IJupyterGISModel ,
6- ILandmarkLayer ,
76} from '@jupytergis/schema' ;
87import React , { useEffect , useMemo , useState } from 'react' ;
98import Markdown from 'react-markdown' ;
@@ -38,7 +37,7 @@ function StoryViewerPanel({ model, togglePreview }: IStoryViewerPanelProps) {
3837
3938 // Derive active slide and layer name from current landmark
4039 const activeSlide = useMemo ( ( ) => {
41- return currentLandmark ?. parameters as ILandmarkLayer | undefined ;
40+ return currentLandmark ?. parameters ;
4241 } , [ currentLandmark ] ) ;
4342
4443 const layerName = useMemo ( ( ) => {
@@ -154,6 +153,7 @@ function StoryViewerPanel({ model, togglePreview }: IStoryViewerPanelProps) {
154153 style = { {
155154 width : '100%' ,
156155 height : '100%' ,
156+ maxHeight : '240px' ,
157157 objectFit : 'cover' ,
158158 display : 'block' ,
159159 } }
@@ -172,22 +172,24 @@ function StoryViewerPanel({ model, togglePreview }: IStoryViewerPanelProps) {
172172 textAlign : 'center' ,
173173 } }
174174 >
175- { storyData . title }
175+ { `Slide ${ currentRankDisplayed + 1 } - ${ layerName ? layerName : 'Landmark Name' } ` }
176176 </ h1 >
177177 </ div >
178178 ) : (
179179 < h1 style = { { textAlign : 'center' } } > { storyData . title } </ h1 >
180180 ) }
181181 < h2 style = { { textAlign : 'center' } } >
182- { `Slide ${ currentRankDisplayed } - ${ layerName ? layerName : 'Landmark Name' } ` }
182+ { activeSlide ?. content ?. title
183+ ? activeSlide . content . title
184+ : 'Slide Title' }
183185 </ h2 >
184- < h3 style = { { paddingLeft : 2 } } >
186+ { /* <h3 style={{ paddingLeft: 2 }}>
185187 {activeSlide?.content?.title
186188 ? activeSlide.content.title
187189 : 'Slide Title'}
188- </ h3 >
190+ </h3> */ }
189191 { activeSlide ?. content ?. markdown && (
190- < div style = { { paddingLeft : 4 } } >
192+ < div className = "jgis-story-panel-content" style = { { paddingLeft : 32 } } >
191193 < Markdown > { activeSlide . content . markdown } </ Markdown >
192194 </ div >
193195 ) }
0 commit comments