ivy/notebooks/flexboxes_bug.ipynb

102 строки
2.3 KiB
Plaintext

{
"cells": [
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"collapsed": false
},
"outputs": [],
"source": [
"%%javascript\n",
"//window.x = _cy_graph_widget_views[0].$el;\n",
"window.y = $('<div />').appendTo(x);\n",
"//x.css('flex', 1)\n",
"y.css('max-height', '100%');\n",
"y.css('height', '100%');\n",
"y.css('background-color', 'red');\n"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"collapsed": false
},
"outputs": [],
"source": [
"from IPython.html import widgets\n",
"from widget_cy_graph import CyGraphWidget"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"collapsed": false
},
"outputs": [],
"source": [
"b = widgets.FlexBox(\n",
" [\n",
" widgets.HBox(\n",
" [\n",
" #widgets.Button(description='Hello World', height='100%'),\n",
" CyGraphWidget(margin='5px', height='100%'),\n",
" ],\n",
" flex=1, \n",
" width='100%',\n",
" margin='5px',\n",
" border_style='solid',\n",
" ),\n",
" widgets.HBox(\n",
" [widgets.Button(description='Hello World', width='100%', height='100%')],\n",
" flex=0,\n",
" margin='5px',\n",
" width='100%',\n",
" border_style='solid',\n",
" ),\n",
" ],\n",
" orientation='vertical',\n",
" border_style='solid',\n",
" )\n",
"\n",
"b.width='100%'\n",
"b.height='100px'\n",
"b"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"collapsed": false
},
"outputs": [],
"source": [
"b.height = '200px'"
]
}
],
"metadata": {
"kernelspec": {
"display_name": "Python 2",
"language": "python",
"name": "python2"
},
"language_info": {
"codemirror_mode": {
"name": "ipython",
"version": 2
},
"file_extension": ".py",
"mimetype": "text/x-python",
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython2",
"version": "2.7.6"
}
},
"nbformat": 4,
"nbformat_minor": 0
}