File tree Expand file tree Collapse file tree 2 files changed +24
-18
lines changed Expand file tree Collapse file tree 2 files changed +24
-18
lines changed Original file line number Diff line number Diff line change @@ -180,6 +180,7 @@ def find_tag(file, tag):
180
180
181
181
neo_vis_js_cell = '''\
182
182
%%javascript
183
+ var output_area = this;
183
184
requirejs(['neovis.js'], function(NeoVis){
184
185
var config = {
185
186
container_id: "viz",
@@ -200,8 +201,9 @@ def find_tag(file, tag):
200
201
let command = "image_src = '" + imageSrc + "'";
201
202
kernel.execute(command);
202
203
203
- var nb = Jupyter.notebook;
204
- var cell = nb.select_next().get_selected_cell();
204
+ var cell_element = output_area.element.parents('.cell');
205
+ var cell_idx = Jupyter.notebook.get_cell_elements().index(cell_element);
206
+ var cell = Jupyter.notebook.get_cell(cell_idx+1);
205
207
cell.set_text("HTML('<img id=\\ "viz-image\\ " width=\\ "300px\\ " src=\\ "%s\\ " />' % image_src)")
206
208
cell.execute();
207
209
});
Load Diff Large diffs are not rendered by default.
You can’t perform that action at this time.
0 commit comments