sagemathinc / cocalc

CoCalc: Collaborative Calculation in the Cloud
https://CoCalc.com
Other
1.17k stars 216 forks source link

sagews interact is not visible #2436

Closed DrXyzzy closed 1 week ago

DrXyzzy commented 7 years ago

Run the following in a sagews cell. It's the same as an example in sage_salvus.py, except that the loop below terminates. When the cell is run, the interact is not visible.

@interact(width=30, style="background-color:lightorange; position:absolute; z-index:1000; box-shadow : 8px 8px 4px #888;")
def f(prime=text_control(label="Counting primes: ")):
    salvus.javascript("cell.element.closest('.salvus-cell-output-interact').draggable().resizable()")
    p = 2
    c = 1
    while c < 10:
        interact.prime = '%s, %.2f'%(p, float(c)/p)
        p = next_prime(p)
        c += 1
        sleep(.25)
williamstein commented 1 month ago

Tagging this as wontfix, because it will be fixed indirectly by creating a sage worksheet style mode (and kernel) for Jupyter notebooks. That will be https://github.com/sagemathinc/cocalc/issues/6374.

6374 will completely deprecate sagews interacts in favor of ipywidgets.