DynamicPropertyModel

Dynamic properties are effects like Opacity, Blur or Drop-shadow that can be applied to a morph as needed. Each of these is managed individually by this controller.

Constructor

new DynamicPropertyModel()

Methods

applyDefault()

Sets the currently selected property to the corresponding "default" value of that property. Note that this is not to be confused with the value we employ for resetting a property. Resetting a property will turn it into a neutral state. Default values on the other hand are decisively chosen to have a characteristic effect in order to illustrate what the property controls in the morph's appearance.

choose(prop, resetValueopt, applyDefaultopt)

Programatically sets the selected property of this dynamic property.

Parameters:
NameTypeAttributesDefaultDescription
propstring

The name of the dynamic property.

resetValueboolean<optional>
false

Wether or not to reset the previously selected property on the target morph.

applyDefaultboolean<optional>
false

Wether or not to apply the default value of the chosen property right away.

chooseDefault()

Automatically selects the first effect property currently available.

closePopup()

Closes the popup responsible for controlling the property.

confirm()

Update the current morph to reflect the changes.

getInitPopupProps()

Get the default configuration of the popup for this property.

openPopup()

Opens the popup responsible for controlling the property.

refreshItems()

Sets the selected property based on the selection in the UI controlled by the user.

removePropertyControl()

Removes this dynamic property from the current morph.

resetProperty()

Resets the currently controlled effect property back to its default value in order to "leave no trace behind".

selectProperty(resetValueopt, applyDefaultopt)

Sets the selected property based on the selection in the UI controlled by the user.

Parameters:
NameTypeAttributesDefaultDescription
resetValueboolean<optional>
false

Wether or not to reset the previously selected property on the target morph.

applyDefaultboolean<optional>
false

Wether or not to apply the default value of the chosen property right away.

togglePopup()

Toggles the popup that controls the current effect property.