A.WidgetPositionAlignSuggestion Class
Widget extension, which can be used to suggest alignment points based on position attribute to base Widget class, through the Base.build method. It also tries to find the best position in case the widget doesn't fit it's constrainment node.
Methods
_afterPositionChangePAS
-
event
Fire after boundingBox
position changes.
Parameters:
-
event
Object
_afterRenderUIPAS
-
event
Fire after renderUI
method.
Parameters:
-
event
Object
_canWidgetAlignToNode
-
node
-
position
Returns true if the widget can fit inside it's constrainment node.
Parameters:
-
node
Object -
position
Object
_findBestPosition
-
node
Finds the position in which the widget fits without having to have its coordinates changed due to its constrainment node.
Parameters:
-
node
Object
_findBestPositionOutsideViewport
-
node
Finds the better widget's position when its anchor is outside the view port.
Parameters:
-
node
Object
_onUISetAlignPAS
-
node
Fire before _uiSetAlign
method.
Parameters:
-
node
Object
_setPositionAccordingPoints
()
protected
Sets the position according to the align points initially defined.
_syncPositionUI
-
val
-
prevVal
Sync the boundingBox
position CSS classes.
Parameters:
-
val
Object -
prevVal
Object
_uiSetPosition
-
val
-
prevVal
Set the boundingBox
position on the UI.
Parameters:
-
val
Object -
prevVal
Object
_validatePosition
-
value
Validates the value of position
attribute.
Parameters:
-
value
Object
Returns:
<p><p><p>True only if value is 'bottom', 'top', 'left' or 'right'.</p></p></p>
initializer
()
protected
Construction logic executed during WidgetPositionAlignSuggestion instantiation. Lifecycle.
Properties
ATTRS
Object
static
Static property used to define the default attribute configuration.
POSITION_ALIGN_SUGGESTION
Property defining the align points based on the suggested position
.