|
@@ -1,14 +1,33 @@
|
|
|
+/*
|
|
|
+ * iGeom by LInE
|
|
|
+ * Free software to student private data
|
|
|
+ *
|
|
|
+ * http://www.matematica.br/igeom
|
|
|
+ * http://www.usp.br/line
|
|
|
+ *
|
|
|
+ * Object with options to each iGeom object (like Circumference)
|
|
|
+ *
|
|
|
+ * ./app/core/models/components/component-options.js
|
|
|
+ * @version 2023/09/20: Added this header and some comments
|
|
|
+ */
|
|
|
+
|
|
|
import { COMPONENT_TYPE } from "../../enums/component-type-enum";
|
|
|
|
|
|
export class ComponentOptions {
|
|
|
- constructor(id, title, icon, componentType) {
|
|
|
- this.id = id;
|
|
|
- this.title = title;
|
|
|
- this.icon = icon;
|
|
|
- this.description;
|
|
|
- this.type =
|
|
|
- componentType == undefined
|
|
|
- ? COMPONENT_TYPE.ELEMENT_DRAWER
|
|
|
- : componentType;
|
|
|
- }
|
|
|
-}
|
|
|
+
|
|
|
+ // @see ./app/core/application/menu.js
|
|
|
+ constructor (id, title, description, icon, componentType) {
|
|
|
+ try {
|
|
|
+ this.id = id;
|
|
|
+ this.title = title;
|
|
|
+ this.icon = icon;
|
|
|
+ this.description = description; // "description" will be used by 'title' of each "button"
|
|
|
+ console.log("component-options.js: " + title + " : " + description);
|
|
|
+ this.type = componentType == undefined ? COMPONENT_TYPE.ELEMENT_DRAWER : componentType;
|
|
|
+ } catch (error) {
|
|
|
+ console.log("component-options.js: fail to construct ComponentOptions with id=" + id + " and title=" + title);
|
|
|
+ console.log("* ComponentOptions error: " + error);
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ }
|