-
Notifications
You must be signed in to change notification settings - Fork 74
/
Copy pathmod_outputs.js
78 lines (74 loc) · 2.67 KB
/
mod_outputs.js
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
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
//
// mod_outputs.js
// outputs list
//
// Neil Gershenfeld
// (c) Massachusetts Institute of Technology 2014
//
// This work may be reproduced, modified, distributed, performed, and
// displayed for any purpose, but must acknowledge the fab modules
// project. Copyright is retained and must be preserved. The work is
// provided as is; no warranty is provided, and users accept all
// liability.
//
define(['require', 'mods/mod_ui'], function(require) {
var ui = require('mods/mod_ui')
//
// output types and handlers
//
var output_array = [
["SVG (.svg)", "outputs/mod_svg.js"],
["PostScript (.eps)", "outputs/mod_eps.js"],
["Epilog laser (.epi)", "outputs/mod_Epilog.js"],
["Trotec laser (.tro)", "outputs/mod_Trotec.js"],
["GCC laser (.gcc)", "outputs/mod_GCC_laser.js"],
["GCC vinyl (.gcc)", "outputs/mod_GCC_vinyl.js"],
["Othermill (.nc)", "outputs/mod_othermill.js"],
["Oxford ulaser (.pgm)", "outputs/mod_Oxford.js"],
["Roland mill (.rml)", "outputs/mod_Roland_mill.js"],
["Roland vinyl (.camm)", "outputs/mod_Roland_vinyl.js"],
["ShopBot (.sbp)", "outputs/mod_Shopbot.js"],
["G-codes (.nc)", "outputs/mod_G.js"],
["Smoothie (.gcode)", "outputs/mod_Smoothie_G.js"],
["OctoPrint (.gcode)", "outputs/mod_Octo_G.js"],
["Universal laser (.uni)", ""],
["image (.png)", ""],
["DXF (.dxf)", ""],
["Gerber (.grb)", ""],
["Excellon (.drl)", ""],
["Resonetics excimer (.oms)", ""],
["Omax waterjet (.ord)", ""],
["mesh (.stl)", ""],
["MTM (VM)", ""]
]
//
// mod_outputs
// set up outputs menu
//
function mod_outputs() {
var label = document.getElementById("mod_outputs_label")
label.innerHTML = "output format"
label.style.display = "block"
label.onclick = function(e) {
ui.ui_clear()
var input_canvas = document.getElementById("mod_input_canvas")
input_canvas.style.display = "inline"
var label = document.getElementById("mod_processes_label")
label.style.display = "none"
var div = document.getElementById("mod_output_controls")
div.innerHTML = ""
var div = document.getElementById("mod_process_controls")
div.innerHTML = ""
ui.ui_menu_action(output_array, "mod_outputs")
}
label.onmouseover = function(e) {
this.style.background = ui.defaults.highlight_background_color
}
label.onmouseout = function(e) {
this.style.background = ui.defaults.background_color
}
}
return {
init: mod_outputs
}
});