FlowTranslateComposer source
Specializes TranslateComposer
Properties
-
acceptsActiveTarget :boolean source
-
Whether or not this target can accept user focus and become the activeTarget This matches up with the
document.activeElement
property purpose-wise; Events from components that should be dispatched as logically occurring at the point of user focus should be dispatched at the activeTargetBy default a target does not accept this responsibility.
Inherited From: Default Value: - false
-
allowFloats :boolean source
-
Allow (@link translateX} and translateY to be floats?
Inherited From: Default Value: - false
-
axis :string source
-
Which axis translation is restricted to.
Can be "vertical", "horizontal" or "both".
Inherited From: Default Value: - "both"
-
component :Component source
-
The Montage
Component
thisComposer
is attached to. Each composer is attached to a single component. By default, most composer will listen to DOM events on this component's element. This is also the component whose draw cycle is affected byneedsFrame
andframe
.Inherited From: Default Value: - null
-
convertCssPixelsPropertyStringToNumber source
-
-
element :Element source
-
The DOM element where the composer will listen for events. If no element is specified then the composer will use the element associated with its
component
property.Subclasses may want to set their
element
to something other than the component's element duringload
for certain event patterns. One common pattern is to set element towindow
to listen for events anywhere on the page.Inherited From: Default Value: - null
-
flow source
-
-
frame source
-
-
handleWheel source
-
-
hasMomentum :boolean source
-
Whether to keep translating after the user has releases the cursor.
Inherited From: Default Value: - true
-
invertAxis :boolean source
-
Invert direction of translation on both axes.
This inverts the effect of cursor motion on both axes. For example if set to true moving the mouse up will increase the value of translateY instead of decreasing it.
Depends on invertXAxis and invertYAxis.
Inherited From: Default Value: - false
-
invertXAxis :boolean source
-
Invert direction of translation along the X axis.
This inverts the effect of left/right cursor motion on translateX.
Inherited From: Default Value: - false
-
invertYAxis :boolean source
-
Invert direction of translation along the Y axis.
This inverts the effect of up/down cursor motion on translateX.
Inherited From: Default Value: - false
-
isActiveTarget :boolean <readonly> source
-
Whether or not this is the activeTarget
This is a getter and is not bindable. Bind to
defaultEventManager.activeTarget == this
.Inherited From: -
lazyLoad source
-
This property controls when the component will call this composer's
load
method, which is where the composer adds its event listeners:- If
false
, the component will callload
during the next draw cycle after the composer is added to it. - If
true
, the component will callload
after itsprepareForActivationEvents
.
Delaying the creation of event listeners can improve performance.
Inherited From: Default Value: - false
- If
-
linearScrollingVector source
-
A constant 2d vector used to transform a drag vector into a scroll vector
-
maxScroll source
-
-
maxTranslateX :number source
-
The maximum value translateX can take. If set to null then there is no maximum.
Inherited From: Default Value: - null
-
maxTranslateY :number source
-
The maximum value translateY can take. If set to null then there is no maximum.
Inherited From: Default Value: - null
-
minScroll source
-
-
minTranslateX :number source
-
The minimum value translateX can take. If set to null then there is no minimum.
Inherited From: Default Value: - null
-
minTranslateY :number source
-
The minimum value translateY can take. If set to null then there is no minimum.
Inherited From: Default Value: - null
-
needsFrame :boolean source
-
This property should be set to 'true' when the composer wants to have its
frame()
method executed during the next draw cycle. Setting this property to 'true' will cause Montage to schedule a new draw cycle if one has not already been scheduled.Inherited From: Default Value: - false
-
nextTarget :Component source
-
Which target to distribute an event after this when distributing events throughout a graph of targets.
Inherited From: -
pointerSpeedMultiplier :number source
-
How many pixels to translate by for each pixel of cursor movement.
Inherited From: Default Value: - 1
-
scroll source
-
-
startTranslateSpeed :number source
-
How fast the cursor has to be moving before translating starts. Only applied when another component has claimed the pointer.
Inherited From: Default Value: - 500
-
stealChildrenPointerThreshold :number source
-
Time, in ms, between touchstart and touchmove to consider when stealing the pointer from its children. The default value is based on the values we got when measuring on different devices iPad: 127.5 Nexus 10 (4.2.2): 153.5
Inherited From: -
translateStride source
-
-
translateX :number source
-
Amount of translation in the X (left/right) direction. Can be inverted with invertXAxis, and restricted to a range with minTranslateX and {@link maxTranslateX}.
Inherited From: Default Value: - 0
-
translateY :number source
-
Amount of translation in the Y (up/down) direction. Can be inverted with invertYAxis, and restricted to a range with minTranslateY and {@link maxTranslateY}.
Inherited From: Default Value: - 0
Methods
-
didBecomeActiveTarget() source
-
Called after to this target became the activeTarget
Inherited From: -
dispatchEvent(event) source
-
Dispatches the specified event with this target as the event's proximal target
Parameters:
Name Type Description event
Event The event object to dispatch
Inherited From: -
dispatchEventNamed(type, canBubble, cancelable, detail) source
-
Creates and dispatches an event with the specified properties with this target as the event's proximal target
Parameters:
Name Type Description type
string The type of the event to dispatch
canBubble
boolean Whether or not the event can bubble
cancelable
boolean Whether or not the event can be cancelled
detail
Object The optional detail object of the event
Inherited From: -
removeEventListener(type, listener, useCapture) source
-
Removes an event listener from the object.
Parameters:
Name Type Description type
string The event type.
listener
object | function The listener object or function.
useCapture
boolean The phase of the event listener.
Inherited From: -
surrendersActiveTarget(newTarget) → {boolean} source
-
Ask this target to surrender its activeTarget status.
Parameters:
Name Type Description newTarget
Target the Target that is about to become the
activeTarget
Inherited From: Returns: boolean
Whether or not to surrender activeTarget status
-
unload() source
-
The
component
will callunload
when the composer is removed from the component or the component is removed.Subclasses should override
unload
to do any necessary cleanup, such as removing event listeners.Inherited From: -
willBecomeActiveTarget(oldTarget) source
-
Called prior to this target becoming the activeTarget
Parameters:
Name Type Description oldTarget
Target the current activeTarget
Inherited From:
Generated from v0.14.14