Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add interaction to open visualizations in full view #80

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
31 changes: 30 additions & 1 deletion css/widget.css
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,15 @@ input[type=text], select {
#intentBtn{
position: absolute;
top: 5px;
right: 59px;
right: 57px;
font-size: 20px;
padding: 5px;
}

#fullScreenBtn{
position: absolute;
top: 7px;
right: 84px;
font-size: 20px;
padding: 5px;
}
Expand Down Expand Up @@ -563,3 +571,24 @@ button.card:focus {
all: revert;
height: 212px;
}

.modal-content-custom {
width: 70%!important;
max-width: none!important;
}

.display-linebreak {
white-space: pre-line;
}

.button-container-1 {
padding: 5px;
position: relative;
left: 12%;
}

.button-container-2 {
padding: 5px;
position: relative;
left: 12%;
}
35 changes: 22 additions & 13 deletions luxwidget/nbextension/static/extension.js
Original file line number Diff line number Diff line change
@@ -1,17 +1,26 @@
// Entry point for the notebook bundle containing custom model definitions.
//
define(function() {
"use strict";

window['requirejs'].config({
map: {
'*': {
'luxwidget': 'nbextensions/luxwidget/index',
},
}
});
// Export the required load_ipython_extension function
define([
'base/js/namespace'
], function(
Jupyter
) {
function load_ipython_extension() {
"use strict";

// TODO: Looking to disable shortcuts here but not working yet
// Jupyter.keyboard_manager.disable();

window['requirejs'].config({
map: {
'*': {
'luxwidget': 'nbextensions/luxwidget/index',
},
}
});
}

return {
load_ipython_extension : function() {}
load_ipython_extension: load_ipython_extension
};
});
});
50 changes: 25 additions & 25 deletions luxwidget/nbextension/static/index.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion luxwidget/nbextension/static/index.js.map

Large diffs are not rendered by default.

10 changes: 9 additions & 1 deletion luxwidget/widget.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,16 @@ class LuxWidget(DOMWidget):
intent = Unicode("").tag(sync=True)
selectedIntentIndex = Dict({}).tag(sync=True)
message = Unicode("").tag(sync=True)
# Change full screen variables to lists to support multiple charts in full screen
visGraphCode = Unicode("").tag(sync=True)
visStyleCode = Unicode("").tag(sync=True)
visGraphSpec = Unicode("").tag(sync=True)
configPlottingStyle = Unicode("").tag(sync=True)
selectedFullScreenIndex = Dict({}).tag(sync=True)

def __init__(self, currentVis=None, recommendations=None, intent=None, message=None, **kwargs):
def __init__(
self, currentVis=None, recommendations=None, intent=None, message=None, **kwargs
):
super().__init__(**kwargs)
self.current_vis = currentVis
self.recommendations = recommendations
Expand Down
Loading