Просмотр исходного кода

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

Michael Herzog 3 лет назад
Родитель
Сommit
65bd56f3bf
2 измененных файлов с 8 добавлено и 0 удалено
  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();