X-Git-Url: https://osm.etsi.org/gitweb/?p=osm%2FUI.git;a=blobdiff_plain;f=skyquake%2Fplugins%2Fcomposer%2Fsrc%2Fsrc%2Flibraries%2Fmodel%2Fdescriptors%2FInternalConnectionPointRef.js;h=ad70b57c471e7f6a81b04388264c032d6e0c0a29;hp=a7ea7519fa3377c3b4331944dc5bd307c5e78dc8;hb=c02d242125c45704991405449fbeb35de8c9687c;hpb=cf5edafaf6923b748a229cbd3f2422da255f5806 diff --git a/skyquake/plugins/composer/src/src/libraries/model/descriptors/InternalConnectionPointRef.js b/skyquake/plugins/composer/src/src/libraries/model/descriptors/InternalConnectionPointRef.js index a7ea7519f..ad70b57c4 100644 --- a/skyquake/plugins/composer/src/src/libraries/model/descriptors/InternalConnectionPointRef.js +++ b/skyquake/plugins/composer/src/src/libraries/model/descriptors/InternalConnectionPointRef.js @@ -15,9 +15,6 @@ * limitations under the License. * */ -/** - * Created by onvelocity on 11/23/15. - */ 'use strict'; @@ -27,7 +24,7 @@ import DescriptorModelFactory from '../DescriptorModelFactory' export default class InternalConnectionPointRef extends DescriptorModel { static get type() { - return 'internal-connection-point-ref'; + return 'internal-connection-point'; } static get className() { @@ -39,23 +36,35 @@ export default class InternalConnectionPointRef extends DescriptorModel { } constructor(m, parent) { - super(!m || typeof m === 'string' ? {id: m, isLeaf: true} : m, parent); + super(m, parent); this.uid = this.id; this.type = InternalConnectionPointRef.type; this.uiState['qualified-type'] = InternalConnectionPointRef.qualifiedType; this.className = InternalConnectionPointRef.className; } - toString() { - return this.valueOf(); + get key() { + return this.model['id-ref']; } - remove() { - return this.parent.removeInternalConnectionPointRefForId(this.id); + get idRef() { + return this.model['id-ref']; } - valueOf() { - return this.id; + set idRef(id) { + return this.model['id-ref'] = id; + } + + get cpNumber() { + return this.uiState.cpNumber; + } + + set cpNumber(n) { + this.uiState.cpNumber = n; + } + + remove() { + return this.parent.removeInternalConnectionPointRefForId(this.idRef); } }