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:
-
eventObject
_afterRenderUIPAS
-
event
Fire after renderUI method.
Parameters:
-
eventObject
_canWidgetAlignToNode
-
node -
position
Returns true if the widget can fit inside it's constrainment node.
Parameters:
-
nodeObject -
positionObject
_findBestPosition
-
node
Finds the position in which the widget fits without having to have its coordinates changed due to its constrainment node.
Parameters:
-
nodeObject
_findBestPositionOutsideViewport
-
node
Finds the better widget's position when its anchor is outside the view port.
Parameters:
-
nodeObject
_onUISetAlignPAS
-
node
Fire before _uiSetAlign method.
Parameters:
-
nodeObject
_setPositionAccordingPoints
()
protected
Sets the position according to the align points initially defined.
_syncPositionUI
-
val -
prevVal
Sync the boundingBox position CSS classes.
Parameters:
-
valObject -
prevValObject
_uiSetPosition
-
val -
prevVal
Set the boundingBox position on the UI.
Parameters:
-
valObject -
prevValObject
_validatePosition
-
value
Validates the value of position attribute.
Parameters:
-
valueObject
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.