Fix storybook stories

This was broken when we switched from jQuery to native JavaScript

Change-Id: I318a51a7d8836370f795b1008b8a89b6ca0edb35
This commit is contained in:
Jon Robson 2023-06-30 09:41:53 -07:00
parent e44c406ba2
commit 504eefcc18

View file

@ -31,6 +31,9 @@ function createPopup( model, layoutHint ) {
if ( model.thumbnail ) {
model.thumbnail = scaleDownThumbnail( model.thumbnail );
}
const extractNode = document.createElement( 'div' );
extractNode.innerHTML = model.extract;
model.extract = extractNode.childNodes;
const preview = createPreviewWithType( model );
const WINDOW_WIDTH = preview.isTall ? 500 : 500;
@ -112,7 +115,7 @@ function createPopup( model, layoutHint ) {
pointerSize,
WINDOW_HEIGHT
);
wrapper.appendChild( preview.el[ 0 ] );
wrapper.appendChild( preview.el );
return wrapper.outerHTML;
}