Class Events
Events supported in the Design Editor.
Package: @aurigma/design-editor-iframe
Remarks
To subscribe to an event, use the `subscribe()` method.
Examples
The following snippet subscribes to the BoundsNotification
and PrintAreaBoundsChanged
events and outputs their arguments to the console.
var editor = null;
CustomersCanvas.IframeApi.loadEditor(iframe, productDefinition)
.then((e) => {
editor = e;
editor.subscribe(CustomersCanvas.IframeApi.PostMessage.Events.BoundsNotification, (args) => {
console.log("BoundsNotification was triggered.");
console.log(JSON.stringify(args, null, 4));
});
editor.subscribe(CustomersCanvas.IframeApi.PostMessage.Events.PrintAreaBoundsChanged, (args) => {
console.log("PrintAreaBoundsChanged");
console.log(args);
});
});
Properties
AssetManagerClosed
Fires when the Image Manager closes.
Declaration
static AssetManagerClosed: string;
Property Value
Type | Description |
---|---|
string | Fires when the Image Manager closes. |
AssetManagerOpened
Fires when the Image Manager opens.
Declaration
static AssetManagerOpened: string;
Property Value
Type | Description |
---|---|
string | Fires when the Image Manager opens. |
BoundsNotification
Declaration
static BoundsNotification: string;
Property Value
Type | Description |
---|---|
string | Allows for getting product measurements during customization. |
CanRedoChanged
Fires when the Redo button gets enabled in the editor.
Declaration
static CanRedoChanged: string;
Property Value
Type | Description |
---|---|
string | Fires when the Redo button gets enabled in the editor. |
CanUndoChanged
Fires when the Undo button gets enabled in the editor.
Declaration
static CanUndoChanged: string;
Property Value
Type | Description |
---|---|
string | Fires when the Undo button gets enabled in the editor. |
CustomButtonClicked
Fires when the custom button clicked.
Declaration
static CustomButtonClicked: string;
Property Value
Type | Description |
---|---|
string | Fires when the custom button clicked. |
FullScreen
Fires when the editor is switched to the full screen mode.
Declaration
static FullScreen: string;
Property Value
Type | Description |
---|---|
string | Fires when the editor is switched to the full screen mode. |
FullWindow
Fires when the editor is switched to the full window mode.
Declaration
static FullWindow: string;
Property Value
Type | Description |
---|---|
string | Fires when the editor is switched to the full window mode. |
ItemAdded
Fires when a design element is added to the product.
Declaration
static ItemAdded: string;
Property Value
Type | Description |
---|---|
string | Fires when a design element is added to the product. |
ItemChanged
Fires when the design element is changed in the editor.
Declaration
static ItemChanged: string;
Property Value
Type | Description |
---|---|
string | Fires when the design element is changed in the editor. |
ItemRemoved
Fires when a design element is removed from the product.
Declaration
static ItemRemoved: string;
Property Value
Type | Description |
---|---|
string | Fires when a design element is removed from the product. |
ModalClose
Fires when the editor is closed in a modal window.
Declaration
static ModalClose: string;
Property Value
Type | Description |
---|---|
string | Fires when the editor is closed in a modal window. |
ModalOpen
Fires when the editor is opened in a modal window.
Declaration
static ModalOpen: string;
Property Value
Type | Description |
---|---|
string | Fires when the editor is opened in a modal window. |
OnImageDpiChanged
Fires when a user resizes images.
Declaration
static OnImageDpiChanged: string;
Property Value
Type | Description |
---|---|
string | Fires when a user resizes images. |
OnSurfaceChanged
Fires when a user switches surfaces.
Declaration
static OnSurfaceChanged: string;
Property Value
Type | Description |
---|---|
string | Fires when a user switches surfaces. |
OriginalSize
Fires when the editor is switched to the original size mode.
Declaration
static OriginalSize: string;
Property Value
Type | Description |
---|---|
string | Fires when the editor is switched to the original size mode. |
PopupOpen
Fires when a dialog box opens. Deprecated. Instead, you can subscribe to Events.UIElementStateChange with the TextPopup
argument.
Declaration
static PopupOpen: string;
Property Value
Type | Description |
---|---|
string | Fires when a dialog box opens. Deprecated. Instead, you can subscribe to Events.UIElementStateChange with the |
PrintAreaBoundsChanged
Fires when the size of a print area changes, for example, after using `setPrintAreas()`.
Declaration
static PrintAreaBoundsChanged: string;
Property Value
Type | Description |
---|---|
string | Fires when the size of a print area changes, for example, after using `setPrintAreas()`. |
RedoProduct
Fires when a user clicks the Redo button.
Declaration
static RedoProduct: string;
Property Value
Type | Description |
---|---|
string | Fires when a user clicks the Redo button. |
RevertProduct
Fires when a user reverts a product in the editor.
Declaration
static RevertProduct: string;
Property Value
Type | Description |
---|---|
string | Fires when a user reverts a product in the editor. |
SelectedItemsChanged
Fires when a design element from the collection is changed in the editor.
Declaration
static SelectedItemsChanged: string;
Property Value
Type | Description |
---|---|
string | Fires when a design element from the collection is changed in the editor. |
UIElementStateChange
Fires when TextPopup
, BottomToolbar.Zoom
, or BottomToolbar.Settings
popups is opened or closed in the editor. Arguments of this event look as follows: {element: "BottomToolbar.Zoom", isOpen: true}
.
Declaration
static UIElementStateChange: string;
Property Value
Type | Description |
---|---|
string | Fires when |
UndoProduct
Fires when a user clicks the Undo button.
Declaration
static UndoProduct: string;
Property Value
Type | Description |
---|---|
string | Fires when a user clicks the Undo button. |