Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
// Copyright (c) Jupyter Development Team.
// Distributed under the terms of the Modified BSD License.
const widgets = require('@jupyter-widgets/base');
const L = require('./leaflet.js');
const utils = require('./utils.js');
const DEFAULT_LOCATION = [0.0, 0.0];
export class LeafletMapStyleModel extends widgets.StyleModel {
defaults() {
return {
...super.defaults(),
_model_name: 'LeafletMapStyleModel',
_model_module: 'jupyter-leaflet'
};
}
}
LeafletMapStyleModel.styleProperties = {
cursor: {
selector: '.leaflet-grab',
attribute: 'cursor',
default: 'grab'
}
};
menu.settingsMenu.addGroup([
{command: '@jupyter-widgets/jupyterlab-manager:saveWidgetState'}
]);
}
WIDGET_REGISTRY.push({
name: '@jupyter-widgets/base',
version: base.JUPYTER_WIDGETS_VERSION,
exports: {
WidgetModel: base.WidgetModel,
WidgetView: base.WidgetView,
DOMWidgetView: base.DOMWidgetView,
DOMWidgetModel: base.DOMWidgetModel,
LayoutModel: base.LayoutModel,
LayoutView: base.LayoutView,
StyleModel: base.StyleModel,
StyleView: base.StyleView
}
});
WIDGET_REGISTRY.push({
name: '@jupyter-widgets/controls',
version: JUPYTER_CONTROLS_VERSION,
exports: () => {
return new Promise((resolve, reject) => {
(require as any).ensure(['@jupyter-widgets/controls'], (require: NodeRequire) => {
resolve(require('@jupyter-widgets/controls'));
},
(err: any) => {
reject(err);
},
'@jupyter-widgets/controls'