Ver Fonte

Editor: Support resizer for script/player panels. (#22593)

Michael Herzog há 3 anos atrás
pai
commit
65bd56f3bf
2 ficheiros alterados com 8 adições e 0 exclusões
  1. 6 0
      editor/js/Player.js
  2. 2 0
      editor/js/Resizer.js

+ 6 - 0
editor/js/Player.js

@@ -21,6 +21,12 @@ function Player( editor ) {
 
 	} );
 
+	signals.windowResize.add( function () {
+
+		player.setSize( container.dom.clientWidth, container.dom.clientHeight );
+
+	} );
+
 	signals.startPlayer.add( function () {
 
 		container.setDisplay( '' );

+ 2 - 0
editor/js/Resizer.js

@@ -41,6 +41,8 @@ function Resizer( editor ) {
 		dom.style.right = x + 'px';
 
 		document.getElementById( 'sidebar' ).style.width = x + 'px';
+		document.getElementById( 'player' ).style.right = x + 'px';
+		document.getElementById( 'script' ).style.right = x + 'px';
 		document.getElementById( 'viewport' ).style.right = x + 'px';
 
 		signals.windowResize.dispatch();