def genMainNav(self): dataDict = self.currentBlogInfo.copy() dataDict['data-buttons'] = (0,0,0) for k in ['data-updateIndex', 'data-updateTag', 'data-updateType', 'data-updateBlog', 'data-updateButtonIndex']: dataDict[k] = 0 nav = html.Div([ html.Div(id='state_container', style={'display': 'none'}, **dataDict, ), html.Div([ drc.NamedDropdown( name = 'Blog', id = 'blog_selector', options=[{'value' : n, 'label' : n} for n in self.names], value=self['data-blogName'], ), #drc.NamedDropdown( # name = 'Tag Filter', # id = 'tag_filter', # options=self.genCurrentTagOptions(withNum = False), # value='None', # multi = True, #), drc.NamedDropdown( name = 'Tags', id = 'tags_selector', options=self.genTypeTags(withNum = True), value='None', ), drc.NamedSlider( name = 'Post', id = 'post_selector', min = 0, max = self['data-maxIndex'], step = 1, value = 0, marks = self.genPostSelectorMarks(), updatemode = 'mouseup', ), drc.NamedRadioItems( name = 'Type', id = 'type_selector', options = self.genTypesDict(), value = self['data-postType'], ), html.Button(id='previous_button', n_clicks=0, children='Previous'), html.Button(id='next_button', n_clicks=0, children='Next'), drc.NamedDropdown( name = 'Current Tags', id = 'current_tags', options=self.genCurrentTagOptions(withNum = False), value=self['data-postTag'], multi = True, ), ], className = 'sidenav'), html.Div([ self.currentHTML(), ], id = 'tumblr_entry') ]) return nav
'max-width': '50%', 'margin': 'auto', 'display': 'inline-block', 'float': 'right' }), ], style={'margin': '20px'}), ]), html.Div( [ #Columns html.Div([ drc.Card([ drc.NamedRadioItems( name='Data Type', id='data-type-radio', options=localDB.dataTypeDict, value=localDB.dataTypeDict[2]['value'], ), drc.NamedDropdown( name='Sources (max 5)', id='dataset-dropdown', options=localDB.buildingsDict, clearable=False, searchable=True, multi=True, ), drc.NamedRadioItems( name='Interval', id='data-interval-radio', options=localDB.intervalOptions, value=localDB.intervalOptions[2]['value'],
name="Node Padding Relative To", id="dropdown-node-padding-relative-to", value="width", clearable=False, options=drc.DropdownOptionsList("width", "height", "average", "min", "max"), ), ], ), drc.NamedCard( title="Compound parent size", size=4, children=[ drc.NamedRadioItems( name="Compound Sizing w.r.t. labels", id="radio-node-compound-sizing", value="include", options=drc.DropdownOptionsList("include", "exclude"), ), drc.NamedInput( name="Parent Node Min Width (px)", id="input-node-compound-min-width", type="number", min=0, placeholder="Input value in px...", value=0, ), drc.NamedInput( name="Extra width on left side (%)", id="input-node-compound-min-width-bias-left", type="number", min=0,
children=[ dcc.Tab(label='Control Panel', children=[ drc.NamedDropdown( name='Layout', id='dropdown-layout', options=drc.DropdownOptionsList( 'random', 'grid', 'circle', 'concentric', 'breadthfirst', 'cose', 'cose-bilkent', 'dagre', 'cola', 'klay', 'spread', 'euler'), value='grid', clearable=False), drc.NamedRadioItems( name='Expand', id='radio-expand', options=drc.DropdownOptionsList( 'followers', 'following'), value='followers') ]), dcc.Tab( label='JSON', children=[ html.Div(style=styles['tab'], children=[ html.P('Node Object JSON:'), html.Pre(id='tap-node-json-output', style=styles['json-output']), html.P('Edge Object JSON:'), html.Pre(id='tap-edge-json-output', style=styles['json-output']) ])
options=Backend.genCurrentTagOptions(withNum=True), value='None', ), drc.NamedSlider( name='Post', id='post_selector', min=0, max=Backend['data-maxIndex'], step=1, value=0, marks=Backend.genPostSelectorMarks(), updatemode='mouseup', ), drc.NamedRadioItems( name='Type', id='type_selector', options=Backend.genTypesDict(), value=Backend['data-postType'], ), html.Button(id='previous_button', n_clicks=0, children='Previous'), html.Button(id='next_button', n_clicks=0, children='Next'), drc.NamedDropdown( name='Current Tags', id='current_tags', options=Backend.genCurrentTagOptions(withNum=False), value=Backend['data-postTag'], multi=True, ), ], className='sidenav'), html.Div([ Backend.currentHTML(),