model.js 394 B

12345678910111213141516171819202122232425
  1. import { getElementId, randomCode, deepCopy } from "../../plugins/utils";
  2. const MODEL = {
  3. type: "FILL_PANE",
  4. x: 0,
  5. y: 0,
  6. w: 324,
  7. h: 40,
  8. sign: "",
  9. paneGap: 5,
  10. paneCount: 9,
  11. paneWidth: 30,
  12. paneHeight: 30,
  13. borderStyle: "solid"
  14. };
  15. const getModel = () => {
  16. return {
  17. id: getElementId(),
  18. key: randomCode(),
  19. ...deepCopy(MODEL)
  20. };
  21. };
  22. export { MODEL, getModel };