Hiding full scrren butto

36 views
Skip to first unread message

Ingo Dahn

unread,
Jun 11, 2017, 5:06:33 PM6/11/17
to sage-cell
In small cells the "Full screen button" is placed over parts of the cell input. Is there a way to hide this button?

Andrey Novoseltsev

unread,
Jun 12, 2017, 12:10:21 AM6/12/17
to sage-cell
It seems that we don't support it via templates, although it should be possible to add. Meanwhile you probably can add some JS to do it manually.

Ingo Dahn

unread,
Jun 12, 2017, 6:52:10 AM6/12/17
to sage-cell
That doesn't seem to be easy: document.getElementsByClassName('sagecell_fullScreen') yields an empty list.

Ingo Dahn

unread,
Jun 12, 2017, 7:02:35 AM6/12/17
to sage-cell
Addition: I call this on startup within $(document).ready. It gives a non-empty list if I call it after some time from the console.

Andrey Novoseltsev

unread,
Jun 13, 2017, 12:03:03 AM6/13/17
to sage-cell
On Monday, 12 June 2017 05:02:35 UTC-6, Ingo Dahn wrote:
Addition: I call this on startup within $(document).ready. It gives a non-empty list if I call it after some time from the console.

makeSagecell waits for document ready before actually doing something. There may be some callback argument to do your own processing after cells are completely created.

Ingo Dahn

unread,
Jun 14, 2017, 11:37:21 AM6/14/17
to sage-cell
It doesn't seem that makeSageCell honors a callback function. Do you have an example with a working callback?

Andrey Novoseltsev

unread,
Jun 14, 2017, 11:36:37 PM6/14/17
to sage-cell
On Wednesday, 14 June 2017 09:37:21 UTC-6, Ingo Dahn wrote:
It doesn't seem that makeSageCell honors a callback function. Do you have an example with a working callback?

No - never used it myself and never got a complaint about it. The relevant code is https://github.com/sagemath/sagecell/blob/master/js/cell.js#L401 I'll try to figure out why it is not working.

Andrey Novoseltsev

unread,
Jun 25, 2017, 10:12:18 PM6/25/17
to sage-cell
On Sunday, 11 June 2017 15:06:33 UTC-6, Ingo Dahn wrote:
In small cells the "Full screen button" is placed over parts of the cell input. Is there a way to hide this button?

It is not on public servers yet, but once Sage 8.0 is out it will be possible to add it to 'hide' argument: https://github.com/sagemath/sagecell/commit/05d328fad8d5c2bc9e6d0b9ab5edaa7c66229654

Andrey Novoseltsev

unread,
Jun 25, 2017, 10:15:47 PM6/25/17
to sage-cell
On Wednesday, 14 June 2017 09:37:21 UTC-6, Ingo Dahn wrote:
It doesn't seem that makeSageCell honors a callback function. Do you have an example with a working callback?

The following does produce a console message for me:

callback: function () {console.info("callback called");},

If you were trying to use it for hiding the full screen button (as I have suggested), then it is possible that callback was called too early: unlike other input elements it is "created dynamically" when CodeMirror instance is constructed, so I had to handle its hiding separately from other stuff.
Reply all
Reply to author
Forward
0 new messages