mirror of https://github.com/artf/grapesjs.git
2 changed files with 36 additions and 0 deletions
@ -0,0 +1,18 @@ |
|||||
|
const Property = require('./Component'); |
||||
|
|
||||
|
module.exports = Property.extend({ |
||||
|
|
||||
|
defaults: Object.assign({}, Property.prototype.defaults, { |
||||
|
// Array of units, eg. ['px', '%']
|
||||
|
units: [], |
||||
|
|
||||
|
// Selected unit, eg. 'px'
|
||||
|
unit: '', |
||||
|
}), |
||||
|
|
||||
|
getFullValue() { |
||||
|
let value = this.get('value') + this.get('unit'); |
||||
|
return Property.prototype.getFullValue.apply(this, [value]); |
||||
|
}, |
||||
|
|
||||
|
}); |
||||
Loading…
Reference in new issue