This property retrieves the currently applied components of the current job.
Retrieve the currently selected canvas and size
The currently selected canvas and size
Retrieve the currently selected output type
The currently selected output type
This property updates and sets the components to the current job.
Updates the current canvas and/or size. This can be used to change to a different size for the same canvas or a new canvas with new size altogether. This should not be used when the product is configured for dynamic sizing.
The canvas object or id to change to
The size object or id to change to
Optional
callback: (() => void)The callback function to call when the canvas and size have been updated. If the canvas/size is not being updated the callback will not be triggered.
Optional
applySmartLayout: booleanFlag to control if the canvas and size change should use smart layout. Smart layout will attempt to apply a similary named layout (category + name) for the target canvas based on the currently used layouts. If the layout is not found or none is used, this will have no effect.
Optional
refresh: booleanFlag to control if the editor would reinitialize itself. If additional operations are required after the canvas and size change, this should be set to false and the refresh should be called manually.
Optional
maintainFieldSize: booleanFlag to control if the field sizes should be maintained. If smart layout is used, we will use the new layout dimenions. If smart layout is not used, the field sizes will be adjusted proportionally to the new canvas size. If this flag is used, the field dimensions will not be adjusted (ignored when smart layout is used).
Updates the current dynamic size. Can only be used if the product is configured for dynamic sizing. The dimensions are in points and will be restricted to be within the min/max dimensions of the product. Step sizes are not enforced.
The new width in points
The new height in points
Optional
callback: (() => void)The optional callback. This will be called if the size was changed successfully. If the size could not be changed, no callback will be triggered.
Optional
applySmartLayout: booleanFlag to control if the canvas and size change should use smart layout. Smart layout will attempt to apply a similary named layout (category + name) for the target canvas based on the currently used layouts. If the layout is not found or none is used, this will have no effect.
Optional
refresh: booleanFlag to control if the editor would reinitialize itself. If additional operations are required after the canvas and size change, this should be set to false and the refresh should be called manually.
Optional
maintainFieldSize: booleanFlag to control if the field sizes should be maintained. If smart layout is used, we will use the new layout dimenions. If smart layout is not used, the field sizes will be adjusted proportionally to the new canvas size. If this flag is used, the field dimensions will not be adjusted (ignored when smart layout is used).
Optional
optionalPageId: stringOptional page id. If null, all pages will change the size. If the setup allows different aspect ratios for different pages, optionally you can configure the page id to change only the size of a single page.
Updates the current output type.
The output type object or id to change to
Boolean flag to control if the output type was changed
Updates the current stock item.
The stock item object or id to change to
Boolean flag to control if the stock item was changed
Generated using TypeDoc
The Global interface gives access to the global compontents which make up a MegaEdit product for the current job.
This includes
There are separate methods available to retrieve each of those components as they are currently applied to the job and methods available to set and update each component for the current job.