Embrace the flexible box model in the widgets

In my mind the orientation attribute is the main thing that defines the
`FlexBox` subclass from the plain `Box` one.


On Wed, Aug 13, 2014 at 6:21 PM, Sylvain Corlay <notifications@github.com>
wrote:

> In IPython/html/static/widgets/js/widget_box.js:
>
> > +
> > +
> > +    var FlexBoxView = BoxView.extend({
> > +        render: function(){
> > +            FlexBoxView.__super__.render.apply(this);
> > +            this.model.on('change:orientation', this.update_orientation, this);
> > +            this.model.on('change:flex', this._flex_changed, this);
> > +            this.model.on('change:pack', this._pack_changed, this);
> > +            this.model.on('change:align', this._align_changed, this);
> > +            this._flex_changed();
> > +            this._pack_changed();
> > +            this._align_changed();
> > +            that.update_orientation();
> > +        },
> > +
> > +        update_orientation: function(){
>
> Should this and the orientation attribute be part of the base Box widget?
>
> —
> Reply to this email directly or view it on GitHub
> <https://github.com/ipython/ipython/pull/6125/files#r16210505>.
>



-- 
Brian E. Granger
Cal Poly State University, San Luis Obispo
@ellisonbg on Twitter and GitHub
bgranger@calpoly.edu and ellisonbg@gmail.com