@@ -65,17 +65,35 @@ void update_oxview_view(Design design, [IFrameElement? frame = null]) {
6565 // send current exported design
6666 List <Strand > strands_to_export = design.strands.toList ();
6767
68- // String content = to_oxview_format(design, strands_to_export);
69- var (dat, top) = to_oxdna_format (design, strands_to_export); // (String, String)
68+ //////////////////////////////////////////
69+ // oxDNA
7070
71- Blob blob_dat = new Blob ([dat], blob_type_to_string (BlobType .text));
72- Blob blob_top = new Blob ([top], blob_type_to_string (BlobType .text));
71+ // // String content = to_oxview_format(design, strands_to_export);
72+ // var (dat, top) = to_oxdna_format(design, strands_to_export); // (String, String)
73+ //
74+ // Blob blob_dat = new Blob([dat], blob_type_to_string(BlobType.text));
75+ // Blob blob_top = new Blob([top], blob_type_to_string(BlobType.text));
76+ //
77+ // message = {
78+ // 'message': 'iframe_drop',
79+ // 'files': [blob_top, blob_dat],
80+ // 'ext': ['top', 'dat'],
81+ // 'inbox_settings': ["Monomer", "Origin"],
82+ // };
83+
84+ /////////////////////////////////////////
85+ // oxView
86+
87+ String oxview_content = to_oxview_format (design, strands_to_export);
88+
89+ Blob blob_oxview_content = new Blob ([oxview_content], blob_type_to_string (BlobType .text));
7390
7491 message = {
7592 'message' : 'iframe_drop' ,
76- 'files' : [blob_top, blob_dat ],
77- 'ext' : ['top' , 'dat ' ],
93+ 'files' : [blob_oxview_content ],
94+ 'ext' : ['oxview ' ],
7895 'inbox_settings' : ["Monomer" , "Origin" ],
7996 };
97+
8098 frame.contentWindow? .postMessage (message, constants.OXVIEW_URL );
8199}
0 commit comments