|
|
@ -7,6 +7,9 @@ module.exports = Property.extend({ |
|
|
// Array of layers (which contain properties)
|
|
|
// Array of layers (which contain properties)
|
|
|
layers: [], |
|
|
layers: [], |
|
|
|
|
|
|
|
|
|
|
|
// The separator used to join layer values
|
|
|
|
|
|
layerSeparator: ', ', |
|
|
|
|
|
|
|
|
// Layer preview
|
|
|
// Layer preview
|
|
|
preview: 0 |
|
|
preview: 0 |
|
|
}, |
|
|
}, |
|
|
@ -15,6 +18,7 @@ module.exports = Property.extend({ |
|
|
Property.callParentInit(Property, this, props, opts); |
|
|
Property.callParentInit(Property, this, props, opts); |
|
|
const layers = this.get('layers'); |
|
|
const layers = this.get('layers'); |
|
|
const layersColl = new Layers(layers); |
|
|
const layersColl = new Layers(layers); |
|
|
|
|
|
layersColl.property = this; |
|
|
layersColl.properties = this.get('properties'); |
|
|
layersColl.properties = this.get('properties'); |
|
|
this.set('layers', layersColl); |
|
|
this.set('layers', layersColl); |
|
|
Property.callInit(this, props, opts); |
|
|
Property.callInit(this, props, opts); |
|
|
@ -30,5 +34,24 @@ module.exports = Property.extend({ |
|
|
|
|
|
|
|
|
getFullValue() { |
|
|
getFullValue() { |
|
|
return this.get('detached') ? '' : this.get('layers').getFullValue(); |
|
|
return this.get('detached') ? '' : this.get('layers').getFullValue(); |
|
|
|
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
|
* This method allows to customize layers returned from the target |
|
|
|
|
|
* @param {Object} target |
|
|
|
|
|
* @return {Array} Should return an array of layers |
|
|
|
|
|
* @example |
|
|
|
|
|
* // return example
|
|
|
|
|
|
* [ |
|
|
|
|
|
* { |
|
|
|
|
|
* properties: [ |
|
|
|
|
|
* { property: 'width', ... } |
|
|
|
|
|
* { property: 'height', ... } |
|
|
|
|
|
* ] |
|
|
|
|
|
* } |
|
|
|
|
|
* ] |
|
|
|
|
|
*/ |
|
|
|
|
|
getLayersFromTarget(target) { |
|
|
|
|
|
return; |
|
|
} |
|
|
} |
|
|
}); |
|
|
}); |
|
|
|