@ -33,6 +33,15 @@ module.exports = Backbone.Model.extend({
}
},
/**
* Get property at some index
* @param {Number} index
* @return {Object}
*/
getPropertyAt(index) {
return this.get('properties').at(index);
getPropertyValue(property) {
let result = '';
this.get('properties').each(prop => {
@ -20,6 +20,14 @@ module.exports = Property.extend({
Property.callInit(this, props, opts);
getLayers() {
return this.get('layers');
getCurrentLayer() {
return this.getLayers().filter(layer => layer.get('active'))[0];
getFullValue() {
return this.get('detached') ? '' : this.get('layers').getFullValue();