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

Fixed handling of CTM data in the editor.

I think also UTF8 should be treated the same, it's also binary data.
alteredq 13 лет назад
Родитель
Сommit
f6ce5206d2
1 измененных файлов с 16 добавлено и 1 удалено
  1. 16 1
      editor/index.html

+ 16 - 1
editor/index.html

@@ -94,7 +94,22 @@
 
 
 				};
 				};
 
 
-				reader.readAsText( file );
+				var binaryFormats = {
+
+					"ctm": true,
+					"utf8": true
+
+				};
+
+				if ( extension in binaryFormats ) {
+
+					reader.readAsBinaryString( file );
+
+				} else {
+
+					reader.readAsText( file );
+
+				}
 
 
 			}, false );
 			}, false );
 
 

粤ICP备19079148号