-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathexport.js
More file actions
52 lines (39 loc) · 1020 Bytes
/
export.js
File metadata and controls
52 lines (39 loc) · 1020 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
var export_pat = {
init: function(){
// 1. tab selection handler
$("#cpanel-main-tabs #ui-id-9").click(function(){
$("#json-text").val(
JSON.stringify(DM.cpotArray, null, 2)
);
});
// 2. import JSON to colour pot
$("#json-load-cpot").click(function(){
DM.cpotArray = JSON.parse($("#json-text").val());
});
// 3. Show CPOT json
$("#export-buttons .button#cpot").click(function(){
$("#json-text").val(
JSON.stringify(DM.cpotArray, null, 2)
);
});
// 4. Show Grids json
$("#export-buttons .button#grid").click(function(){
$("#json-text").val(
JSON.stringify(DM.gridArray, null, 2)
);
});
// 5. Show Plots json
$("#export-buttons .button#plot").click(function(){
$("#json-text").val(
JSON.stringify(DM.plotArray, null, 2)
);
});
// 6. Show Motifs json
$("#export-buttons .button#motf").click(function(){
$("#json-text").val(
// JSON.stringify(DM.motfArray, null, 2)
JSON.stringify(DM.EDITINGmotf, null, 2)
);
});
}
};