Closed Bug 128970 Opened 22 years ago Closed 22 years ago

cycleView does not cycle in the ViewsArray.

Categories

(Other Applications :: ChatZilla, defect)

All
Linux
defect
Not set
minor

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: tanaka, Assigned: rginda)

References

()

Details

Attachments

(1 file)

To cycle in "client.viewsArray", change the function,

function cycleView (amount)
{
    var len = client.viewsArray.length;
    if (len <= 1)
        return;
    
    var tb = getTabForObject (client.currentObject);
    if (!tb)
        return;
    
    var vk = Number(tb.getAttribute("viewKey"));
    var destKey = (vk + amount) % len; /* wrap around */

    setCurrentObject (client.viewsArray[destKey].source);
}
The rewrite looks logically identical to what you have...  patch incoming.
Status: UNCONFIRMED → NEW
Ever confirmed: true
Attached patch above changesSplinter Review
Comment on attachment 72555 [details] [diff] [review]
above changes

r=rginda
Attachment #72555 - Flags: review+
Keywords: patch, review
checked in
Status: NEW → RESOLVED
Closed: 22 years ago
Resolution: --- → FIXED
Product: Core → Other Applications
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: