Opened 12 years ago

Closed 12 years ago

#3869 closed defect (fixed)

dojo.fx.slideTo code inconsistent with summary in fx.js

Reported by: guest Owned by: alex
Priority: high Milestone: 0.9
Component: fx Version: 0.9
Keywords: Cc: jayant.b.sai@…
Blocked By: Blocking:

Description

I am using 0.9.0beta. In the fx.js, the dojo.fx.slideTo's summary states 'Returns an animation that will slide "node" defined in args Object from its current position to the position defined in args.coords. addition mixin args needed: coords: { top: Decimal?, left: Decimal? }.

But on trying to use this FX, it doesn't work. The animate properties currently are:

top: { start: top, end: args.top||0 },
left: { start: left, end: args.left||0 }

They should be the following to be consistent with the summary:

top: { start: top, end: args.coords.top||0 },
left: { start: left, end: args.coords.left||0 }

Attachments (1)

test_slideTo.html (1.9 KB) - added by dante 12 years ago.
a couple dojo.fx.slideTo examples

Download all attachments as: .zip

Change History (6)

comment:1 Changed 12 years ago by Adam Peller

Milestone: 0.9

comment:2 Changed 12 years ago by alex

Owner: changed from Bryan Forbes to alex
Status: newassigned

Changed 12 years ago by dante

Attachment: test_slideTo.html added

a couple dojo.fx.slideTo examples

comment:3 Changed 12 years ago by dante

i personally prefer the code-way (as opposed to the doc-way) so suggest the docs get updated to reflect as such. adding in a coords{} (unless you eventually want to support bottom: and right:) object is cumbersome, and sort of breaks the mixin idea.

pottedmeat has ideas on how to accurately define object params via pseudo-objects in code docs ...

comment:4 Changed 12 years ago by alex

I also like the way the code handles this today. We should fix docs as a result.

comment:5 Changed 12 years ago by bill

Resolution: fixed
Status: assignedclosed

(In [9900]) Fix comment to match code. Fixes #3869.

Note: See TracTickets for help on using tickets.