Events

The web-to-print editor events. To subscribe to an event use the Editor.subscribe method.

example

The following snippet subscribes to the BoundsNotification event and outputs the event arguments to the console:

var editor = null;
CustomersCanvas.IframeApi.loadEditor(iframe, productDefinition)
    .then(function(e) {
        editor = e;
        editor.subscribe(CustomersCanvas.IframeApi.PostMessage.Events.BoundsNotification, 
            function(args) 
            { 
                console.log("BoundsNotification fired."); 
                console.log(JSON.stringify(args, null, 4)); 
            })
    });

Properties

Static BoundsNotification

BoundsNotification: string

This event allows for getting product measurments during customization.

Static FullScreen

FullScreen: string

This event fires when the editor is switched to the full screen mode.

Static FullWindow

FullWindow: string

This event fires when the editor is switched to the full window mode.

Static ModalClose

ModalClose: string

This event fires when the editor is closed in a modal window.

Static ModalOpen

ModalOpen: string

This event fires when the editor is opened in a modal window.

Static OriginalSize

OriginalSize: string

This event fires when the editor is switched to the original size mode.

Static RevertProduct

RevertProduct: string

This event fires when a user reverts a product in the editor.