#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: |
Description
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() { dojo.connect( this.domNode, "onmouseenter", this, "toggle"); }, toggle: function() { dojo.fx.wipeIn({ node: dojo.query(".slider_item_content", this.domNode)[0], duration: 1000 }).play(); } });
I have tried to modify it a bit but with no success so far.
Attachments (1)
Change History (4)
comment:1 Changed 11 years ago by
Changed 11 years ago by
Attachment: | NoInnerHTML_dojox.widget.Roller.diff added |
---|
comment:2 Changed 11 years ago by
Resolution: | → wontfix |
---|---|
Status: | new → closed |
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 10 years ago by
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?
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?