Jelajahi Sumber

Editor: changed exports to use "text/plain" MIME type.

This make Firefox behave consistently with Chrome - on clicking export buttons content is opened in a new tab instead of triggering "save" modal dialog.

See discussion: https://github.com/mrdoob/three.js/commit/dc71940a851caa4abf5176421d413d46f1abf3f5
alteredq 13 tahun lalu
induk
melakukan
695e1528ce

+ 1 - 1
editor/js/ui/Sidebar.Outliner.js

@@ -94,7 +94,7 @@ Sidebar.Outliner = function ( signals ) {
 
 		var output = new THREE.SceneExporter().parse( scene );
 
-		var blob = new Blob( [ output ], { type: 'text/json' } );
+		var blob = new Blob( [ output ], { type: 'text/plain' } );
 		var objectURL = URL.createObjectURL( blob );
 
 		window.open( objectURL, '_blank' );

+ 1 - 1
editor/js/ui/Sidebar.Properties.Geometry.js

@@ -123,7 +123,7 @@ Sidebar.Properties.Geometry = function ( signals ) {
 
 		var output = new THREE.GeometryExporter().parse( selected );
 
-		var blob = new Blob( [ output ], { type: 'text/json' } );
+		var blob = new Blob( [ output ], { type: 'text/plain' } );
 		var objectURL = URL.createObjectURL( blob );
 
 		window.open( objectURL, '_blank' );