Last change
on this file since 532 was
483,
checked in by hendrikvanantwerpen, 11 years ago
|
Added Dojo 1.9.3 release.
|
File size:
1.0 KB
|
Line | |
---|
1 | define(["dojo/_base/declare", "dojo/on"], function(declare, on){ |
---|
2 | |
---|
3 | return declare("dojox.mobile.TransitionEvent", null, { |
---|
4 | // summary: |
---|
5 | // A class used to trigger view transitions. |
---|
6 | |
---|
7 | constructor: function(/*DomNode*/target, /*Object*/transitionOptions, /*Event?*/triggerEvent){ |
---|
8 | // summary: |
---|
9 | // Creates a transition event. |
---|
10 | // target: |
---|
11 | // The DOM node that initiates the transition (for example a ListItem). |
---|
12 | // transitionOptions: |
---|
13 | // Contains the transition options. |
---|
14 | // triggerEvent: |
---|
15 | // The event that triggered the transition (for example a touch event on a ListItem). |
---|
16 | this.transitionOptions = transitionOptions; |
---|
17 | this.target = target; |
---|
18 | this.triggerEvent = triggerEvent||null; |
---|
19 | }, |
---|
20 | |
---|
21 | dispatch: function(){ |
---|
22 | // summary: |
---|
23 | // Dispatches this transition event. Emits a "startTransition" event on the target. |
---|
24 | var opts = {bubbles:true, cancelable:true, detail: this.transitionOptions, triggerEvent: this.triggerEvent}; |
---|
25 | var evt = on.emit(this.target,"startTransition", opts); |
---|
26 | } |
---|
27 | }); |
---|
28 | }); |
---|
Note: See
TracBrowser
for help on using the repository browser.