|
@@ -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();
|