From e48fe37b55d3115769577c8b31b681af182bd0c9 Mon Sep 17 00:00:00 2001 From: Max <m.giller.dev@gmail.com> Date: Mon, 4 Oct 2021 21:18:38 +0200 Subject: [PATCH] Removed unnecessary menu --- editor/editor.php | 8 -------- editor/js/tools/connecttool.js | 4 +--- editor/js/tools/menus/connectmenu.js | 15 --------------- 3 files changed, 1 insertion(+), 26 deletions(-) delete mode 100644 editor/js/tools/menus/connectmenu.js diff --git a/editor/editor.php b/editor/editor.php index f8048a1..1a3ca47 100644 --- a/editor/editor.php +++ b/editor/editor.php @@ -4,14 +4,6 @@ <div id="2d-graph"></div> <section id="toolbar"></section> <section id="tool-menu"> - <div id="connect-menu" class="hidden"> - <label for="link-type">Link Type</label> - <select id="link-type" name="link-type"> - <option value="Vorlesung">Lecture</option> - <option value="Algorithmus">Algorithm</option> - <option value="Definition">Definition</option> - </select> - </div> <div id="collect-menu" class="hidden"> <h3>Collected items</h3> <button id="clear-collection">Clear</button> diff --git a/editor/js/tools/connecttool.js b/editor/js/tools/connecttool.js index d0e8efc..610e51d 100644 --- a/editor/js/tools/connecttool.js +++ b/editor/js/tools/connecttool.js @@ -1,13 +1,12 @@ import Tool from "./tool"; import { graph, state } from "../editor"; import * as Graph from "../graph"; -import ConnectMenu from "./menus/connectmenu"; const KEEP_SOURCE_KEY_ID = 17; export default class ConnectTool extends Tool { constructor(key) { - super("Connect two nodes", "connect", key, new ConnectMenu()); + super("Connect two nodes", "connect", key); this.keepSource = false; } @@ -23,7 +22,6 @@ export default class ConnectTool extends Tool { // Add new link var details = {}; - details[Graph.LINK_TYPE] = this.menu.value("link-type"); var link = graph.addLink( state.selectedItem[Graph.NODE_ID], diff --git a/editor/js/tools/menus/connectmenu.js b/editor/js/tools/menus/connectmenu.js deleted file mode 100644 index 4f148b0..0000000 --- a/editor/js/tools/menus/connectmenu.js +++ /dev/null @@ -1,15 +0,0 @@ -import ToolMenu from "./toolmenu"; - -const LINK_TYPE_SEL = "#link-type"; - -export default class ConnectMenu extends ToolMenu { - constructor() { - super(); - } - - beforeGet(key) { - if (key === "link-type") { - return this.find(LINK_TYPE_SEL).val(); - } - } -} \ No newline at end of file -- GitLab