matplotlib / matplotlib/ipympl

Resizing extends outside the bounds of the notebook

オープン
#242 コメント 1 件 リアクション 0 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

主要言語
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:
wonky-resize

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

コントリビューションガイド

コントリビューションガイドを開く

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

調査の方向性

js/src/mpl_widget.js の272行目付近を読み、ノートブックの境界を越えてドラッグして resize-handle の動作を再現してください。window mousemove listener が this.model.get('layout'); をどのように使用しているかを確認してください。ノートブックの外で離したときに handle が非表示のままにならず、それ以上のリサイズも妨げられなければ issue は完了です。

索引モデルが issue の本文から書いたものです。

評価

技術スタック
javascript, jupyter
領域
frontend
issue の種類
バグ
難易度
2/5
見積もり時間
1〜3時間
活発さ
停滞
明瞭さ
おおむね明確
初心者へのやさしさ
45/100

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。