Skip to content

Commit

Permalink
Add screenshot provenance to notebooks
Browse files Browse the repository at this point in the history
  • Loading branch information
danlamanna committed Feb 8, 2017
1 parent 6d50a7a commit 8dffaf3
Show file tree
Hide file tree
Showing 4 changed files with 91 additions and 3 deletions.
6 changes: 6 additions & 0 deletions js/src/css/styles.css
Original file line number Diff line number Diff line change
Expand Up @@ -46,3 +46,9 @@
cursor: ns-resize;
background-image: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAB4AAAAFAQMAAABo7865AAAABlBMVEVHcEzMzMzyAv2sAAAAAXRSTlMAQObYZgAAABBJREFUeF5jOAMEEAIEEFwAn3kMwcB6I2AAAAAASUVORK5CYII=');
}

/* Override of built-in Jupyter notebook rule.
See appendScreenshotAfterExecution docs. */
.output_subarea.output_png {
display: none;
}
6 changes: 4 additions & 2 deletions js/src/extension.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/* global requirejs */

import { Geonotebook } from 'geonotebook';
import { Geonotebook, provenance } from 'geonotebook';

if (window.require) {
window.require.config({
Expand All @@ -19,8 +19,10 @@ function load_ipython_extension () {
'base/js/events'
], function (Jupyter, events) {
if (Jupyter.kernelselector.current_selection === 'geonotebook2' ||
Jupyter.kernelselector.current_selection === 'geonotebook3') {
Jupyter.kernelselector.current_selection === 'geonotebook3') {
Jupyter.geonotebook = new Geonotebook(Jupyter, events);

provenance(Jupyter, events);
}
console.log('loaded geonotebook');
resolve();
Expand Down
4 changes: 3 additions & 1 deletion js/src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,11 @@ import 'geojs';
import Geonotebook from './Geonotebook';
import MapObject from './MapObject';
import * as jsonrpc from './jsonrpc';
import provenance from './provenance';

export {
Geonotebook,
MapObject,
jsonrpc
jsonrpc,
provenance
};
78 changes: 78 additions & 0 deletions js/src/provenance.js

Large diffs are not rendered by default.

0 comments on commit 8dffaf3

Please sign in to comment.