Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Resizing extends outside the bounds of the notebook #242

Open
ianhi opened this issue Jul 11, 2020 · 1 comment
Open

Resizing extends outside the bounds of the notebook #242

ianhi opened this issue Jul 11, 2020 · 1 comment

Comments

@ianhi
Copy link
Collaborator

ianhi commented Jul 11, 2020

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:

window.addEventListener('mousemove', this._resize_event);

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
@martinRenou
Copy link
Member

Thanks for reporting this! That's indeed not very convenient.

Maybe there could be a check that it won't be resized to be larger the layout (this.model.get('layout'))?

That might not do it, because if this.model.get('layout').get('width') is 50%, you need to know what it represents in terms of pixels. So we might need to look at its container size as well.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants