Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

jupyter-js-notebook

Package Overview
Dependencies
Maintainers
2
Versions
69
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

jupyter-js-notebook - npm Package Compare versions

Comparing version 0.5.10 to 0.5.11

5

lib/editor/widget.js

@@ -43,3 +43,6 @@ // Copyright (c) Jupyter Development Team.

this.model = model;
this.model.selected.connect(function () { return _this._editor.focus(); });
this.model.selected.connect(function () {
if (!_this.model.readOnly)
_this._editor.focus();
});
this._editor.on('change', function () {

@@ -46,0 +49,0 @@ _this.model.dirty = true;

@@ -44,1 +44,9 @@ import { IChangedArgs } from 'phosphor-properties';

}
/**
* Scroll an element into view if needed.
*
* @param area - The scroll area element.
*
* @param elem - The element of interest.
*/
export declare function scrollIfNeeded(area: HTMLElement, elem: HTMLElement): void;

26

lib/notebook/widget.js

@@ -59,2 +59,3 @@ // Copyright (c) Jupyter Development Team.

cell.rendered = false;
cell.input.textEditor.select();
}

@@ -103,5 +104,3 @@ });

newCell.addClass('jp-selected-cell');
// scroll so the selected cell is in the view
// TODO: replicate scrollIntoViewIfNeeded()
newCell.node.scrollIntoView();
scrollIfNeeded(this.node, newCell.node);
}

@@ -146,3 +145,4 @@ };

* @param factory - A function which takes an item from the list and constructs a widget.
*/ function follow(source, sink, factory) {
*/
function follow(source, sink, factory) {
for (var i = sink.childCount() - 1; i >= 0; i--) {

@@ -184,1 +184,19 @@ sink.childAt(i).dispose();

}
/**
* Scroll an element into view if needed.
*
* @param area - The scroll area element.
*
* @param elem - The element of interest.
*/
function scrollIfNeeded(area, elem) {
var ar = area.getBoundingClientRect();
var er = elem.getBoundingClientRect();
if (er.top < ar.top) {
area.scrollTop -= ar.top - er.top;
}
else if (er.bottom > ar.bottom) {
area.scrollTop += er.bottom - ar.bottom;
}
}
exports.scrollIfNeeded = scrollIfNeeded;
{
"name": "jupyter-js-notebook",
"version": "0.5.10",
"version": "0.5.11",
"description": "Notebook widget for Jupyter",

@@ -5,0 +5,0 @@ "main": "lib/index.js",

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc