Meet us at Print 18. Chicago, IL. Sept. 30 - Oct. 2.

ILocationDefaultConfig Interface

A structure defining the default location of text elements.

For example, you can add a custom button to the Toolbox as follows:

example
{
    "widgets": {
        "Toolbox": {
            "buttons": [{
                "translationKeyTitle": "Toolbox.TITLE_ADD_CUSTOM_TEXT",
                "iconClass": "cc-icon-add-text",
                "action": "customtext",
                "itemConfig": {
                    "name":  "CardID",
                    "text": "1234 ABCD 5678",
                    "color": "rgb(193,0,32)",
                    "isVariable":  true,
                    "location": {
                        "originX": "right",
                        "originY": "top",
                        "x": "50%",
                        "y": "0%"
                    },
                    "textPermissions": {
                        "allowChangeText": false
                    }
                }
            }]
        }
    }
}

Properties

originX

originX: OriginPointType

The origin of coordinates.

originY

originY: OriginPointType

The origin of coordinates.

x

x: string | number

The x coordinate, in either points or percent of available width. The default value is 0, which is equal to the left edge.

y

y: string | number

The y coordinate, in either points or percent of available height. The default value is 0, which is equal to the bottom edge.