@@ -288,27 +288,6 @@ define(function (require, exports, module) {
288288 }
289289 }
290290
291- /**
292- * this function adds/remove the full-width class from the overlay container
293- * styled inside 'live-preview.css'
294- *
295- * we need this because
296- * normally when live preview has a good width (more than 305px) then a 3px divider is shown at the left end
297- * so in that case we give the overlay a width of (100% - 3px),
298- * but when the live preview width is reduced
299- * then that divider line gets cut off, so in that case we make the width 100% for this overlay
300- *
301- * without this handling, a white gap appears on the left side, which is distracting
302- */
303- function _setOverlayWidth ( ) {
304- if ( ! $overlayContainer || ! $panel || ! $panel . length ) { return ; }
305- if ( $panel . width ( ) <= 305 ) {
306- $overlayContainer . addClass ( "full-width" ) ;
307- } else {
308- $overlayContainer . removeClass ( "full-width" ) ;
309- }
310- }
311-
312291 /**
313292 * update the mode button text in the live preview toolbar UI based on the current mode
314293 * @param {String } mode - The current mode ("preview", "highlight", or "edit")
@@ -806,10 +785,6 @@ define(function (require, exports, module) {
806785 _loadPreview ( true , true ) ;
807786 Metrics . countEvent ( Metrics . EVENT_TYPE . LIVE_PREVIEW , "reloadBtn" , "click" ) ;
808787 } ) ;
809-
810- // Set up ResizeObserver for overlay width adjustments
811- // to understand why we're doing this read _setOverlayWidth function
812- new ResizeObserver ( _setOverlayWidth ) . observe ( $panel [ 0 ] ) ;
813788 }
814789
815790 async function _loadPreview ( force , isReload ) {
0 commit comments