diff --git a/web/app/sketcher/main2d.js b/web/app/sketcher/main2d.js
index 5b2e2ced..953b95f2 100644
--- a/web/app/sketcher/main2d.js
+++ b/web/app/sketcher/main2d.js
@@ -1,12 +1,15 @@
TCAD.STORAGE_PREFIX = "TCAD.projects.";
TCAD.App2D = function() {
+ var app = this;
this.viewer = new TCAD.TWO.Viewer(document.getElementById('viewer'));
this.initSketchManager();
+ this._exportWin = new TCAD.ui.Window($('#exportManager'));
+
+ $('#exportManager li').click(function() {TCAD.ui.closeWin(app._exportWin);});
- var app = this;
this.actions = {};
@@ -31,6 +34,10 @@ TCAD.App2D = function() {
app.cloneSketch();
});
+ this.registerAction('export', "Export", function (e) {
+ TCAD.ui.openWin(app._exportWin, e);
+ });
+
this.registerAction('exportSVG', "Export To SVG", function () {
app.exportTextData(app.viewer.io.svgExport(), "svg");
});
diff --git a/web/app/ui.js b/web/app/ui.js
index 644f8bdf..eb5e705a 100644
--- a/web/app/ui.js
+++ b/web/app/ui.js
@@ -26,6 +26,10 @@ TCAD.ui.createActionsWinBuilder = function(win) {
};
};
+TCAD.ui.closeWin = function(win) {
+ win.root.hide();
+};
+
TCAD.ui.openWin = function(win, mouseEvent) {
var x = mouseEvent.pageX;
diff --git a/web/sketcher.html b/web/sketcher.html
index e9403c47..e5825d66 100644
--- a/web/sketcher.html
+++ b/web/sketcher.html
@@ -330,8 +330,7 @@
-->