Added uuid function to element class to easily allow generating uuid's. May move this later. Added reflect() option to reflect properties once changed via a function or another property. Added onResize function that adds a resize observer to the element constructed by a template and cleans it up nicely. Added onTouch event helper function. Modified reflect callback to allow calling functions or setting the value of a property.
This commit is contained in:
@ -63,7 +63,7 @@ class IgniteProperty {
|
||||
//If we want to reflect the value then bubble it up.
|
||||
if (reflect) {
|
||||
this.ignoreValueChange = true; //Ignore changes incase we are connected to any reflected properties.
|
||||
this.reflected.forEach(reflect => reflect.value = val);
|
||||
this.reflected.forEach(reflect => reflect instanceof Function ? reflect(val) : (reflect.value = val));
|
||||
this.ignoreValueChange = false;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user