浏览代码

Update 'src/app/component-registry/trash-component.js'

Added header
Changes to use object constructor "description" (app/core/models/components/component-options.js) in button (app/core/application/menu.js)
New field to new ComponentOptions(...): "Remove objects (attention, it will remove all object that depends on this!)",
leo 1 年之前
父节点
当前提交
f83111345e
共有 1 个文件被更改,包括 25 次插入5 次删除
  1. 25 5
      src/app/component-registry/trash-component.js

+ 25 - 5
src/app/component-registry/trash-component.js

@@ -1,19 +1,39 @@
+/*
+ * iGeom by LInE
+ * Free software to student private data
+ *
+ * http://www.matematica.br/igeom
+ * http://www.usp.br/line
+ *
+ * Create and register new element MidPoint
+ * It is used in ./app/core/application/menu.js
+ *
+ * ./app/component-registry/trash-component.js
+ * @version 2023/09/20: Added new parameter 'description,' to 'ComponentOptions'
+ */
+
 import { TrashDrawer } from "../components/trash-component/drawers/trash-drawer";
 import { Component } from "../core/models/components/component";
 import { ComponentOptions } from "../core/models/components/component-options";
+
 class TrashComponent extends Component {
-  constructor() {
+
+  //TODO: it is necessary internationalization!
+
+  constructor () {
     const options = new ComponentOptions(
       "2e0a8b90-2ef0-4c71-893f-cf2b55303589",
       "trash",
+      "Remove objects (attention, it will remove all object that depends on this!)",
       "trash"
-    );
+      );
     super(new TrashDrawer(), options);
     document.addEventListener('keyup', (event) => {
       if (event.key === "Delete")
         this.draw(event);
-    });
+      });
+    }
+
   }
-}
 
-export const trashComponent = new TrashComponent();
+export const trashComponent = new TrashComponent();