Skip to content

Commit

Permalink
Editor: Clean up.
Browse files Browse the repository at this point in the history
  • Loading branch information
mrdoob committed Feb 19, 2024
1 parent ddd7a82 commit 7847e6b
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 11 deletions.
6 changes: 3 additions & 3 deletions editor/js/Sidebar.Geometry.js
Original file line number Diff line number Diff line change
Expand Up @@ -192,11 +192,11 @@ function SidebarGeometry( editor ) {

}

const left = ( screen.width / 2 ) - ( 250 );
const top = ( screen.height / 2 ) - ( 250 );
const left = ( screen.width - 500 ) / 2;
const top = ( screen.height - 500 ) / 2;

const url = URL.createObjectURL( new Blob( [ output ], { type: 'text/plain' } ) );
window.open( url, null, `location=no,left=${left},top=${top},width=500,height=500` );
window.open( url, '_blank', `location=no,left=${left},top=${top},width=500,height=500` );

} );
container.add( exportJson );
Expand Down
6 changes: 3 additions & 3 deletions editor/js/Sidebar.Material.js
Original file line number Diff line number Diff line change
Expand Up @@ -435,11 +435,11 @@ function SidebarMaterial( editor ) {

}

const left = ( screen.width / 2 ) - ( 250 );
const top = ( screen.height / 2 ) - ( 250 );
const left = ( screen.width - 500 ) / 2;
const top = ( screen.height - 500 ) / 2;

const url = URL.createObjectURL( new Blob( [ output ], { type: 'text/plain' } ) );
window.open( url, null, `location=no,left=${left},top=${top},width=500,height=500` );
window.open( url, '_blank', `location=no,left=${left},top=${top},width=500,height=500` );

} );
container.add( exportJson );
Expand Down
6 changes: 3 additions & 3 deletions editor/js/Sidebar.Object.js
Original file line number Diff line number Diff line change
Expand Up @@ -407,11 +407,11 @@ function SidebarObject( editor ) {

}

const left = ( screen.width / 2 ) - ( 250 );
const top = ( screen.height / 2 ) - ( 250 );
const left = ( screen.width - 500 ) / 2;
const top = ( screen.height - 500 ) / 2;

const url = URL.createObjectURL( new Blob( [ output ], { type: 'text/plain' } ) );
window.open( url, null, `location=no,left=${left},top=${top},width=500,height=500` );
window.open( url, '_blank', `location=no,left=${left},top=${top},width=500,height=500` );

} );
container.add( exportJson );
Expand Down
4 changes: 2 additions & 2 deletions editor/js/Sidebar.Project.Video.js
Original file line number Diff line number Diff line change
Expand Up @@ -65,8 +65,8 @@ function SidebarProjectVideo( editor ) {
canvas.style.width = width + 'px';
canvas.style.height = height + 'px';

const left = ( screen.width / 2 ) - ( width / 2 );
const top = ( screen.height / 2 ) - ( height / 2 );
const left = ( screen.width - width ) / 2;
const top = ( screen.height - height ) / 2;

const output = window.open( '', '_blank', `location=no,left=${left},top=${top},width=${width},height=${height}` );
output.document.body.style.background = '#000';
Expand Down

0 comments on commit 7847e6b

Please sign in to comment.