matplotlib / matplotlib/ipympl
Resizing extends outside the bounds of the notebook
未关闭
还没有人认领这个 Issue。
- 主要语言
- Jupyter Notebook
- 星标
- 1.7k
- 派生
- 234
- PR 合并指标
- 30 天内没有已合并 PR
描述
Describe the issue
If you drag the resize handle outside the limits of the notebook and release the mouse you lose the ability to resize as the handle will be hidden:

This is a consequence of using a window mouse move listener: https://github.com/matplotlib/ipympl/blob/6b44a6f90cf74b12cfcf930b440010984d8a9b4d/js/src/mpl_widget.js#L272
Maybe there could be a check that it won't be resized to be larger the layout (this.model.get('layout'))?
Versions
3.7.6 (default, Jan 8 2020, 19:59:22)
[GCC 7.3.0]
ipympl version: 0.5.6
jupyter core : 4.6.1
jupyter-notebook : 6.0.3
qtconsole : 4.6.0
ipython : 7.12.0
ipykernel : 5.1.4
jupyter client : 5.3.4
jupyter lab : 2.1.5
nbconvert : 5.6.1
ipywidgets : 7.5.1
nbformat : 5.0.4
traitlets : 4.3.3
Known nbextensions:
config dir: /home/ian/anaconda3/etc/jupyter/nbconfig
notebook section
jupyter-matplotlib/extension enabled
- Validating: OK
nbdime/index enabled
- Validating: OK
voila/extension enabled
- Validating: OK
jupyter-js-widgets/extension enabled
- Validating: OK
JupyterLab v2.1.5
Known labextensions:
app dir: /home/ian/anaconda3/share/jupyter/lab
@axlair/jupyterlab_vim v0.12.2 enabled OK
@jupyter-widgets/jupyterlab-manager v2.0.0 enabled OK
@jupyter-widgets/jupyterlab-sidecar v0.5.0 enabled OK
@jupyterlab/git v0.20.0-rc.0 enabled OK
jupyter-matplotlib v0.7.2 enabled OK
jupyterlab_vim-system-clipboard-support v0.1.0 enabled OK
nbdime-jupyterlab v2.0.0 enabled OK
贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
调研方向
阅读 js/src/mpl_widget.js 第 272 行附近的代码,并通过拖动超出 notebook 边界来复现 resize-handle 的行为。检查 window mousemove listener 如何使用 this.model.get('layout'); 当在 notebook 外部释放时不会让 handle 保持隐藏,也不会阻止继续调整大小时,该 issue 就完成了。
由索引模型根据 Issue 内容生成。
评估
- 技术栈
- javascript, jupyter
- 领域
- frontend
- Issue 类型
- 缺陷
- 难度
- 2/5
- 预计耗时
- 1-3 小时
- 活跃度
- 停滞
- 描述清晰度
- 基本清楚
- 新手友好度
- 45/100