You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
28 lines
1.0 KiB
28 lines
1.0 KiB
define(["dojo/_base/declare", "dojo/on"], function(declare, on){ |
|
|
|
return declare("dojox.mobile.TransitionEvent", null, { |
|
// summary: |
|
// A class used to trigger view transitions. |
|
|
|
constructor: function(/*DomNode*/target, /*Object*/transitionOptions, /*Event?*/triggerEvent){ |
|
// summary: |
|
// Creates a transition event. |
|
// target: |
|
// The DOM node that initiates the transition (for example a ListItem). |
|
// transitionOptions: |
|
// Contains the transition options. |
|
// triggerEvent: |
|
// The event that triggered the transition (for example a touch event on a ListItem). |
|
this.transitionOptions = transitionOptions; |
|
this.target = target; |
|
this.triggerEvent = triggerEvent||null; |
|
}, |
|
|
|
dispatch: function(){ |
|
// summary: |
|
// Dispatches this transition event. Emits a "startTransition" event on the target. |
|
var opts = {bubbles:true, cancelable:true, detail: this.transitionOptions, triggerEvent: this.triggerEvent}; |
|
var evt = on.emit(this.target,"startTransition", opts); |
|
} |
|
}); |
|
});
|
|
|