Interface IEditablePropertyOption
interface IEditablePropertyOption {
embedded?: boolean;
max?: number;
min?: number;
notifiers?: {
activatePreviewCommand?: boolean;
callback?: (
scene: Nullable<Scene>,
block: any,
) => boolean | void | undefined;
onValidation?: (block: any, propertyName: string) => boolean;
rebuild?: boolean;
update?: boolean;
};
options?: IEditablePropertyListOption[];
}
embedded?: boolean;
max?: number;
min?: number;
notifiers?: {
activatePreviewCommand?: boolean;
callback?: (
scene: Nullable<Scene>,
block: any,
) => boolean | void | undefined;
onValidation?: (block: any, propertyName: string) => boolean;
rebuild?: boolean;
update?: boolean;
};
options?: IEditablePropertyListOption[];
}
Properties
Optionalembedded
embedded?: boolean
Define if the property is displayed inside the source block or in a separate property tab
Optionalmax
max?: number
max value
Optionalmin
min?: number
min value
Optionalnotifiers
notifiers?: {
activatePreviewCommand?: boolean;
callback?: (
scene: Nullable<Scene>,
block: any,
) => boolean | void | undefined;
onValidation?: (block: any, propertyName: string) => boolean;
rebuild?: boolean;
update?: boolean;
}
activatePreviewCommand?: boolean;
callback?: (
scene: Nullable<Scene>,
block: any,
) => boolean | void | undefined;
onValidation?: (block: any, propertyName: string) => boolean;
rebuild?: boolean;
update?: boolean;
}
notifiers: indicates which actions to take when the property is changed
Type Declaration
-
OptionalactivatePreviewCommand?: booleanthe onPreviewCommandActivated observer of the preview manager should be triggered
-
Optionalcallback?: (scene: Nullable<Scene>, block: any) => boolean | void | undefineda callback to trigger
-
OptionalonValidation?: (block: any, propertyName: string) => booleana callback to validate the property. Returns true if the property is ok, else false. If false, the rebuild/update/callback events won't be called
-
Optionalrebuild?: booleanthe entity should be rebuilt
-
Optionalupdate?: booleanthe preview should be updated
Optionaloptions
list of the options for a variable of type list
Interface that defines the options available for an editable property