Opened 12 years ago

Closed 12 years ago

Last modified 11 years ago

#11334 closed defect (wontfix)

dojox.widget.Roller destroys undisplayed nodes making all references to certain items invalid

Reported by: the_drow Owned by: dante
Priority: high Milestone: tbd
Component: DojoX Widgets Version: 1.5.0rc1
Keywords: roller bug Cc:
Blocked By: Blocking:


To reach to a certain node in one of the elements you have to query it over and over again. This is inefficient and might be even critical on big rollers. See this example code:

                dojo.declare("ui.RollerItem", dijit._Widget, {
                    postCreate: function()
                    toggle: function()
                                    node: dojo.query(".slider_item_content", this.domNode)[0],
                                    duration: 1000

I have tried to modify it a bit but with no success so far.

Attachments (1)

NoInnerHTML_dojox.widget.Roller.diff (1.8 KB) - added by the_drow 12 years ago.

Download all attachments as: .zip

Change History (4)

comment:1 Changed 12 years ago by the_drow

Solved. note that this change might be breaking existing code as this keeps the nodes. I believe it's much more efficient and robust. Just one question, how does it know that this._roller is the srcRefNode?

Changed 12 years ago by the_drow

comment:2 Changed 12 years ago by dante

Resolution: wontfix
Status: newclosed

The roller works from an array of items[] ... It is only intended for light markup, and does not even require domNodes internally to operate. I would suggest releasing your DOM-based version as a subclass overriding the two functions you've changed. This works simply and as intended now.

comment:3 Changed 11 years ago by the_drow

I didn't use light markup myself and the current code makes it very hard to handle the DOM nodes inside. Also, you can't keep the state of your DOM which is a big problem. This solves many issues with complex cases. Why won't you accept it? Is it slower?

Note: See TracTickets for help on using tickets.