#12299: Advance Jmol Interactive Features in Flask Notebook
-------------------------------------------------------+--------------------
       Reporter:  gutow                                |         Owner:  jason, 
mpatel, was                 
           Type:  enhancement                          |        Status:  
needs_work                         
       Priority:  major                                |     Milestone:  
sage-5.2                           
      Component:  notebook                             |    Resolution:         
                            
       Keywords:  Jmol, 3D, notebook                   |   Work issues:  old 
worksheets don't work          
Report Upstream:  Reported upstream. No feedback yet.  |     Reviewers:  
Karl-Dieter Crisman, Steven Trogdon
        Authors:  Jonathan Gutow                       |     Merged in:         
                            
   Dependencies:  #11080,#11078,#11503                 |      Stopgaps:         
                            
-------------------------------------------------------+--------------------

Comment (by gutow):

 Replying to [comment:32 kcrisman]:
 > > My first attempt at getting this to work showed that
 > > * the Tachyon "placeholder" evaluates fine, though I agree with
 strogdon from #9238 that it's annoying to always have to make it
 interactive, though I understand the reasoning
 >
 > You were right, it was the Jmol placeholder.  I really find that
 annoying.
 We potentially could get rid of this with significant browser detection
 and a complete reworking of how Jmol is called for when a cell is
 recalculated.  The problem is related to the fact that the applet is
 completely reloaded each time a cell is recalculated, rather than just
 passing it new data.  This means it is very easy to get out of sync with
 what the server is sending to the applet.  Many of the problems with the
 old Jmol relate to this.  One of the problems I consistently have using
 the old format where Jmol loads live in interacts is that the interact
 starts calling for a new applet before the previous one is finished
 loading. I have had some discussions about putting the applet in a special
 div that does not get zapped each time a recalculation is done. That's
 probably the correct thing to do, but not high on people's list when the
 notebook was undergoing major revisions.  I would prefer to put this off
 as an additional enhancement.
 >
 > > * Nothing else worked - lots of messages about restarting Jmol and so
 forth. At one point I even got a !JmolData java applet starting outside
 the browser window.

 As your comments below suggest this appears to be a problem with old
 worksheets that have not been reevaluated.  We might be able to put
 something into the notebook code that puts up a message suggesting the
 worksheet be re-evaluated if it does not have the data necessary for
 static images.  I tried to put a message in the "alt" field for the
 images, but most browser now seem to ignore that.  I think I can put a
 check into the cell code that would deal with this.  I even have some
 ideas for generating images without reevaluation...I'll look into this.
 > Question about implementation.  How much work does Jmol have to do to
 generate all those static images '''every''' time that one opens a
 worksheet?
 Jmol only generates the image when a cell is evaluated.  When you open a
 worksheet that was previously evaluated using these enhancements the
 images are already there.

 >
 >
 > More minor issues.
 >  * When I sleep an image, it doesn't come back with the advanced
 controls if I had them up.  Is there any way to "save" that state, or is
 it too hard?
 Hadn't thought about this.  I will look into it.
 >  * Although it's pretty clear by the content, it's a little hard to see
 which tab you are on in the advanced controls sometimes.  Maybe the
 shading could be slightly different.
 I'm using Sage default CSS.  I suppose we could define something custom.
 >  * In interacts, I think there is no point to having the initial static
 image.  I have no idea if there is a way to detect this, but presumably
 one wouldn't have asked for this to be evaluated if one wasn't going to
 use it.
 As I explained above, only simple interacts where the user does not call
 for lots of recalculations work reliably with the present model of loading
 Jmol live.  Things with sliders are really bad.
 >  * The opening of the "!JmolData" app each time is a little annoying.
 >  * When doing
 > {{{
 >
 
implicit_plot3d(x^2+y^2+z^2==16,(x,-5,5),(y,-5,5),(z,-5,5),color='green',plot_points=200)
 > }}}
 >    I got
 > {{{
 > viewer handling error condition: java.lang.OutOfMemoryError: Java heap
 space
 > }}}
 >    Maybe I'm being overoptimistic; the docs don't even have any with 100
 `plot_points`.
 The application can certainly handle more.  I'll see if I can change the
 memory allocation to allow for larger images...That is a little odd as we
 use Jmol in web pages to look at things with many more points, atoms and
 surfaces...
 >  * On the plus side, the thing where only four Jmols are active at a
 time is working fine.  I notice that it deactivates the one furthest down
 or something, not the oldest one.
 Actually it picks the one farthest from the cell you most recently
 evaluated that includes a Jmol.  It can be above or below the cell you are
 working on.
 >
 > ----
 >
 > I have to say that I'm by far the most concerned about the "old
 worksheets" issue.  Second is the "automatically every image is static" -
 couldn't at least the ''first'' one be "live"? - but nearly everything
 else could be considered an enhancement request.  Let me know what stuff
 I've mentioned is worth discussing here.
 I agree that this should be a priority.  I think there are solutions.
 What behavior would be best: 1) A pop-up suggestion to reevaluate old
 worksheets to update 3-D plots; 2) Attempt to update plots without
 reevaluation; 3) Automatically reevaluate worksheets with 3-D plots in
 them?

-- 
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/12299#comment:35>
Sage <http://www.sagemath.org>
Sage: Creating a Viable Open Source Alternative to Magma, Maple, Mathematica, 
and MATLAB

-- 
You received this message because you are subscribed to the Google Groups 
"sage-trac" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/sage-trac?hl=en.

Reply via email to