##// END OF EJS Templates
Prviatize methods that should not be called externally...
Prviatize methods that should not be called externally in Model and View JS widget classes

File last commit:

r14374:49ef62f3
r14379:fb77a4c6
Show More
container.js
61 lines | 2.5 KiB | application/javascript | JavascriptLexer
Jonathan Frederic
Added standard IPY JS header to widget JS files.
r14366 //----------------------------------------------------------------------------
// Copyright (C) 2013 The IPython Development Team
//
// Distributed under the terms of the BSD License. The full license is in
// the file COPYING, distributed as part of this software.
//----------------------------------------------------------------------------
//============================================================================
// ContainerWidget
//============================================================================
/**
* @module IPython
* @namespace IPython
**/
Jonathan Frederic
Changed require.js load calls to allow require.js to pass...
r14374 define(["notebook/js/widget"], function(widget_manager) {
Jonathan Frederic
Lots of updates to widget(s) js...
r14263 var ContainerModel = IPython.WidgetModel.extend({});
Jonathan Frederic
Changed require.js load calls to allow require.js to pass...
r14374 widget_manager.register_widget_model('ContainerWidgetModel', ContainerModel);
Jonathan Frederic
Moved view code into model files
r14252
Jonathan Frederic
Lots of updates to widget(s) js...
r14263 var ContainerView = IPython.WidgetView.extend({
Jonathan Frederic
Added flexible box model align properties.
r14333 render: function(){
Jonathan Frederic
Attempt 1, HBox and VBox implementation.
r14268 this.$el = $('<div />')
Jonathan Frederic
Changed underscores in CSS names to dashes
r14293 .addClass('widget-container');
Jonathan Frederic
Lots of updates to widget(s) js...
r14263 },
Jonathan Frederic
Added flexible box model align properties.
r14333 update: function(){
Jonathan Frederic
Flex box system improvements...
r14269
// Apply flexible box model properties by adding and removing
// corrosponding CSS classes.
// Defined in IPython/html/static/base/less/flexbox.less
Jonathan Frederic
Added flexible box model align properties.
r14333 this.set_flex_property('vbox', this.model.get('_vbox'));
this.set_flex_property('hbox', this.model.get('_hbox'));
this.set_flex_property('start', this.model.get('_pack_start'));
this.set_flex_property('center', this.model.get('_pack_center'));
this.set_flex_property('end', this.model.get('_pack_end'));
Jonathan Frederic
Added flex properties to container....
r14335 this.set_flex_property('align-start', this.model.get('_align_start'));
this.set_flex_property('align-center', this.model.get('_align_center'));
this.set_flex_property('align-end', this.model.get('_align_end'));
this.set_flex_property('box-flex0', this.model.get('_flex0'));
this.set_flex_property('box-flex1', this.model.get('_flex1'));
this.set_flex_property('box-flex2', this.model.get('_flex2'));
Jonathan Frederic
Added flexible box model align properties.
r14333
Jonathan Frederic
Fixes that allow last commit to work.
r14279 return IPython.WidgetView.prototype.update.call(this);
Jonathan Frederic
Attempt 1, HBox and VBox implementation.
r14268 },
Jonathan Frederic
LOTS OF WIDGET CHANGES...
r14278
Jonathan Frederic
Added flexible box model align properties.
r14333 set_flex_property: function(property_name, enabled) {
if (enabled) {
this.$el.addClass(property_name);
} else {
this.$el.removeClass(property_name);
}
},
display_child: function(view) {
Jonathan Frederic
Changed parent/child api widgets
r14280 this.$el.append(view.$el);
Jonathan Frederic
LOTS OF WIDGET CHANGES...
r14278 },
Jonathan Frederic
Lots of updates to widget(s) js...
r14263 });
Jonathan Frederic
Moved view code into model files
r14252
Jonathan Frederic
Changed require.js load calls to allow require.js to pass...
r14374 widget_manager.register_widget_view('ContainerView', ContainerView);
Jonathan Frederic
Lots of updates to widget(s) js...
r14263 });