component-options.js 1.0 KB

123456789101112131415161718192021222324252627282930313233
  1. /*
  2. * iGeom by LInE
  3. * Free software to student private data
  4. *
  5. * http://www.matematica.br/igeom
  6. * http://www.usp.br/line
  7. *
  8. * Object with options to each iGeom object (like Circumference)
  9. *
  10. * ./app/core/models/components/component-options.js
  11. * @version 2023/09/20: Added this header and some comments
  12. */
  13. import { COMPONENT_TYPE } from "../../enums/component-type-enum";
  14. export class ComponentOptions {
  15. // @see ./app/core/application/menu.js
  16. constructor (id, title, description, icon, componentType) {
  17. try {
  18. this.id = id;
  19. this.title = title;
  20. this.icon = icon;
  21. this.description = description; // "description" will be used by 'title' of each "button"
  22. console.log("component-options.js: " + title + " : " + description);
  23. this.type = componentType == undefined ? COMPONENT_TYPE.ELEMENT_DRAWER : componentType;
  24. } catch (error) {
  25. console.log("component-options.js: fail to construct ComponentOptions with id=" + id + " and title=" + title);
  26. console.log("* ComponentOptions error: " + error);
  27. }
  28. }
  29. }