On Sat, 19 Apr 2008, William Stein wrote:

>
> On Sat, Apr 19, 2008 at 4:49 PM, Andrey Novoseltsev <[EMAIL PROTECTED]> wrote:
>>
>> > >  For some reason, that cycle got reversed.
>> >
>> > Are you sure?
>> >
>>
>>  Yes, that's exactly what happened for me - sometime ago the cycle was
>>  wrap/unwrap/hide, and then it switched to wrap/hide/unwrap. Maybe it
>>  is something paltform dependent?.. I am using Firefox from Windows and
>>  it behaves in such a way on all machines that I tried, as far as I
>>  remember.
>
> I just tested this with sage-2.11 on Windows with both Firefox
> (standard released
> version) and Internet explorer, and it goes
>
>                   wrap/unwrap/hide,
>
> i.e., I don't see what you're getting.
>
> In fact, here is the javascript that does the cell wrap/unwrap/hide,
> which is defined in devel/sage/sage/server/notebook/js.py.
> Except for comments this hasn't changed in nearly a year.
> Reading the source I can't see any possible way you would
> see the behavior you're claiming.   If it's hidden it gets
> wrapped, if it is wrapped it gets unwrapped.   The only possible
> conceivable thing that could ever go wrong maybe maybe would
> be if cell_div.className didn't exist with your weird javascript
> interpreter, but even then you wouldn't get wrap/hide/unwrap,
> since the only way to ever see unwrap is for this expression
> to be true: cell_div.className == 'cell_div_output_wrap'.
>
> So I'm really puzzled.  Are you using a laptop?
>
> function cycle_cell_output_type(id) {
>    /*
>    When called the cell with given id has its output cycled from one
> type to the next.
>    There are three types: word wrap, no word wrap, hidden.
>
>    INPUT:
>        id -- an integer
>    */
>    var cell_div = get_element('cell_div_output_' + id);
>
>    if (cell_div.className == 'cell_div_output_hidden' ||
> cell_div.className=='cell_div_output_running') {
>        cell_output_set_type(id, 'wrap');
>        return;
>    }
>
>    if (cell_div.className == 'cell_div_output_wrap') {
>        cell_output_set_type(id, 'nowrap');
>    } else {
>        cell_output_set_type(id, 'hidden');
>    }
> }

I'm doing homework, and I don't have time to troubleshoot this.  Check the 
preconditions.  If cell_div.className != 'cell_div_output_wrap' to begin with, 
it would exibit the behavior that Andrey and I are experiencing.  It's strange, 
though.  I get the incorrect behavior sometimes, and not others.  Later this 
week, I'll try to hunt this down.


--~--~---------~--~----~------------~-------~--~----~
To post to this group, send email to sage-devel@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/sage-devel
URLs: http://www.sagemath.org
-~----------~----~----~----~------~----~------~--~---

Reply via email to