Commit 6c2cc826 authored by Nicolas Biri's avatar Nicolas Biri

Add jsmfId for Models

parent 024c8a43
Pipeline #799 failed with stage
in 30 seconds
......@@ -24,11 +24,12 @@
const _ = require('lodash')
let isJSMFElement, conformsTo
let isJSMFElement, conformsTo, generateId
(function() {
const common = require('./Common')
isJSMFElement = common.isJSMFElement
conformsTo = common.conformsTo
generateId = common.generateId
}).call()
const isJSMFEnum = require('./Enum').isJSMFEnum
......@@ -37,6 +38,7 @@ const isJSMFClass = require('./Class').isJSMFClass
function Model(name, referenceModel, modellingElements, transitive) {
this.__name = name
_.set(this, ['__jsmf__','conformsTo'], Model)
_.set(this, ['__jsmf__','uuid'], generateId())
this.referenceModel = referenceModel || {}
this.modellingElements = {}
this.elemByClassId = new Map()
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment