ChangeFloatingObjectAlignmentPositionCommand.execute(settings) Method
Executes the ChangeFloatingObjectAlignmentPositionCommand command by applying the specified setting.
May result in taking no action if the command’s state does not allow command execution. Use the object’s getState method to check the command state.
Declaration
execute(
settings: FloatingObjectAlignmentPositionSettings
): boolean
Parameters
Name | Type | Description |
---|---|---|
settings | FloatingObjectAlignmentPositionSettings | A FloatingObjectAlignmentPositionSettings object specifying alignment position settings. |
Returns
Type | Description |
---|---|
boolean | A Boolean value identifying whether method execution was successful or failed. |
Remarks
The execute method checks the command state (obtained using the getState method) before executing, and decides whether the action can be performed.
Usage example (it is implied that selection is set to an inline or floating picture object):
var settings = {
horizontalPositionAlignment: ASPx.FloatingObjectHorizontalPositionAlignment.Center,
horizontalPositionType: ASPx.FloatingObjectHorizontalPositionType.Page,
verticalPositionAlignment: ASPx.FloatingObjectVerticalPositionAlignment.Top,
verticalPositionType: ASPx.FloatingObjectVerticalPositionType.Page,
};
rich.commands.changeFloatingObjectAlignmentPosition.execute(settings);
See Also