Skip to content

Commit 7847e6b

Browse files
committed
Editor: Clean up.
1 parent ddd7a82 commit 7847e6b

File tree

4 files changed

+11
-11
lines changed

4 files changed

+11
-11
lines changed

editor/js/Sidebar.Geometry.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -192,11 +192,11 @@ function SidebarGeometry( editor ) {
192192

193193
}
194194

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

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

201201
} );
202202
container.add( exportJson );

editor/js/Sidebar.Material.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -435,11 +435,11 @@ function SidebarMaterial( editor ) {
435435

436436
}
437437

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

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

444444
} );
445445
container.add( exportJson );

editor/js/Sidebar.Object.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -407,11 +407,11 @@ function SidebarObject( editor ) {
407407

408408
}
409409

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

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

416416
} );
417417
container.add( exportJson );

editor/js/Sidebar.Project.Video.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -65,8 +65,8 @@ function SidebarProjectVideo( editor ) {
6565
canvas.style.width = width + 'px';
6666
canvas.style.height = height + 'px';
6767

68-
const left = ( screen.width / 2 ) - ( width / 2 );
69-
const top = ( screen.height / 2 ) - ( height / 2 );
68+
const left = ( screen.width - width ) / 2;
69+
const top = ( screen.height - height ) / 2;
7070

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

0 commit comments

Comments
 (0)