2014-12-03 02:02:48 +00:00
|
|
|
import _ from 'lodash';
|
|
|
|
import Base from './base.js';
|
|
|
|
|
|
|
|
export default _.extend({}, Base, {
|
2014-12-07 22:38:24 +00:00
|
|
|
type: 'charset',
|
|
|
|
|
2014-12-11 00:01:57 +00:00
|
|
|
_render() {
|
2014-12-10 23:27:07 +00:00
|
|
|
this.renderLabeledBox(this.invert() ? 'None of:' : 'One of:');
|
2014-12-07 22:38:24 +00:00
|
|
|
|
|
|
|
this.partContainer = this.container.group();
|
|
|
|
|
2014-12-09 22:48:44 +00:00
|
|
|
_.each(this.parts.elements, (part => {
|
2014-12-10 21:57:42 +00:00
|
|
|
part.setContainer(this.partContainer.group());
|
2014-12-07 22:38:24 +00:00
|
|
|
part.render();
|
|
|
|
}).bind(this));
|
|
|
|
},
|
|
|
|
|
2014-12-11 00:01:57 +00:00
|
|
|
_position() {
|
2014-12-10 01:08:34 +00:00
|
|
|
_.invoke(this.parts.elements, 'position');
|
2014-12-07 22:38:24 +00:00
|
|
|
|
2014-12-10 01:08:34 +00:00
|
|
|
this.spaceVertically(this.parts.elements, {
|
|
|
|
padding: 5
|
|
|
|
});
|
2014-12-07 22:38:24 +00:00
|
|
|
|
2014-12-10 23:27:07 +00:00
|
|
|
this.positionLabeledBox(this.partContainer, {
|
|
|
|
padding: 5
|
2014-12-07 22:38:24 +00:00
|
|
|
});
|
|
|
|
},
|
|
|
|
|
|
|
|
invert() {
|
|
|
|
return this._invert.textValue !== '';
|
|
|
|
}
|
2014-12-03 02:02:48 +00:00
|
|
|
});
|