Controls
Since version 3.5.0 you can force users to use certain controls before using all other editor
functions. In order to do that, you need to pass the editor.forceControls
option which contains
an array of objects in the following format:
{
control: "control-identifier", // e.g. crop, filter, adjustments
options: {
key: "value" // This object should contain options for the given control
}
}
Example: Force crop
In order to force a user to crop the input image to a square image, pass the following options:
var editor = new PhotoEditorSDK.UI.ReactUI({
editor: {
forceControls: [
{
control: "crop",
options: {
ratios: [
{ name: "square", ratio: 1 }
]
}
}
]
}
})