##= require ./EditingMixin BAD_PROPS = [ 'position', 'model', 'index', 'syncImmediatly', 'query', 'onCancel', 'onSave', 'cellStyles', 'editors', 'rowIndex', 'rowHeight', 'allowDelete' ] Lanes.Components.Grid.PopoverMixin = { mixins: [ Lanes.Components.Grid.EditingMixin ] propTypes: width: React.PropTypes.number.isRequired height: React.PropTypes.number.isRequired getDefaultProps: -> width: 280, height: 350 renderPopover: (props) -> props = _.extend({}, @props, props) {position} = props if position.left > ((position.container.width / 2) - 150) props.placement = 'left' props.positionLeft = position.left - props.width else props.placement = 'right' props.positionLeft = position.left props.arrowOffsetTop = Math.min(position.top + 20, (props.height - 75)) props.positionTop = Math.max(5, position.top - props.arrowOffsetTop + (position.rowHeight / 2)) props = _.omit(props, BAD_PROPS)
{@renderEditingBody()}
}