Ticket #3679 (closed enhancement: fixed)

Opened 5 months ago

Last modified 4 months ago

[with patches; positive review] Range Slider Control

Reported by: itolkov Assigned to: itolkov
Priority: major Milestone: sage-3.1
Component: notebook Keywords:
Cc:

Description

Allows to select a range using a slider with two handles. Includes a jQuery patch.

Depends on #3599 and #3636.

Attachments

sage.patch (22.7 kB) - added by itolkov on 07/18/2008 11:28:08 PM.
extcode.patch (2.1 kB) - added by itolkov on 07/18/2008 11:28:46 PM.
sage_post1.patch (7.9 kB) - added by itolkov on 07/29/2008 01:33:04 PM.
Append to sage.patch

Change History

07/18/2008 11:28:08 PM changed by itolkov

  • attachment sage.patch added.

07/18/2008 11:28:46 PM changed by itolkov

  • attachment extcode.patch added.

07/18/2008 11:29:20 PM changed by itolkov

  • summary changed from Range Slider Control to [with patch; needs review] Range Slider Control.

07/19/2008 04:12:35 PM changed by mabshoff

  • milestone set to sage-3.1.1.

07/21/2008 03:26:37 PM changed by jason

Why did you need to patch jquery? Would it be sufficient to upgrade to the newest jqueryui, which has slider controls with multiple sliders? I'd rather not maintain a fork of jquery here.

07/28/2008 01:00:34 PM changed by itolkov

I wouldn't need to generally, but #3735 makes it hard to do anything Javascript-related. The old version works for some reason.

Of course, the best thing for me to do here is fix #3735.

07/29/2008 11:58:54 AM changed by was

  • summary changed from [with patch; needs review] Range Slider Control to [with patch; needs work] Range Slider Control.

REFEREE REPORT:

  • Add documentation to interact? that illustrates how to use range_slider.
  • Doing range_slider? gives help on slider instead of range_slider.
  • I tried one example -- see http://sage.math.washington.edu/home/was/patches/3679.png and the displayed positions were different than the values of the variable when I first pressed shift enter. Dragging the slider fixed this.
    @interact
    def _(t1=range_slider(2, 5, 1/5, (3,4), 'alpha')):
        print t1
        show(plot(sin,t1[0], t1[1]),xmin=t1[0])
    
  • In the above example, it seems like the order of the two sliders is reversed?

07/29/2008 01:33:04 PM changed by itolkov

  • attachment sage_post1.patch added.

Append to sage.patch

(in reply to: ↑ description ) 07/29/2008 01:37:20 PM changed by itolkov

  • summary changed from [with patch; needs work] Range Slider Control to [with patches; needs further review] Range Slider Control.

Points 1 and 2 are addressed.

3 and 4 - did you apply the extcode patch?

07/29/2008 04:24:40 PM changed by was

  • summary changed from [with patches; needs further review] Range Slider Control to [with patches; positive review] Range Slider Control.

3 and 4 - did you apply the extcode patch?

No, I messed up and didn't apply it. Now everything works perfectly and the improved docs are great! Very positive review!

07/29/2008 04:24:49 PM changed by was

  • milestone changed from sage-3.1.1 to sage-3.1.

07/30/2008 06:23:02 PM changed by mabshoff

Is the jQuery patch being upstreamed? Otherwise we will have problems once we upgrade to a newer release of jQuery.

Cheers,

Michael

07/30/2008 06:25:43 PM changed by mabshoff

  • status changed from new to closed.
  • resolution set to fixed.

Merged all three patches in Sage 3.1.alpha0

08/12/2008 02:16:42 PM changed by jason

I see that 3735 is fixed now. Does that mean that the patches above to jquery should be reverted (as per the comment above)?