Added more documentation to IgniteElement. Fixed ref function on IgniteTemplates accepting non function parameters.
This commit is contained in:
		| @@ -48,14 +48,27 @@ class IgniteProperty { | |||||||
|         this.patchArray(); |         this.patchArray(); | ||||||
|     } |     } | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * Gets the value of this IgniteProperty. | ||||||
|  |      * @returns {Any} The value of this IgniteProperty. | ||||||
|  |      */ | ||||||
|     get value() { |     get value() { | ||||||
|         return this._value; |         return this._value; | ||||||
|     } |     } | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * Sets the value of this IgniteProperty, this will reflect the value to any listeners on this property. | ||||||
|  |      * @param {Any} val The value to set. | ||||||
|  |      */ | ||||||
|     set value(val) { |     set value(val) { | ||||||
|         this.setValue(val, true); |         this.setValue(val, true); | ||||||
|     } |     } | ||||||
|  |  | ||||||
|  |     /** | ||||||
|  |      * Sets the value of this IngiteProperty with control of reflection. | ||||||
|  |      * @param {Any} val The value to set for this IgniteProperty. | ||||||
|  |      * @param {Boolean} reflect If true, this will reflect the value onto any listeners on this property. | ||||||
|  |      */ | ||||||
|     setValue(val, reflect) { |     setValue(val, reflect) { | ||||||
|         //If the ignore value change flag is set exit. |         //If the ignore value change flag is set exit. | ||||||
|         if (this.ignoreValueChange) { |         if (this.ignoreValueChange) { | ||||||
|   | |||||||
| @@ -508,7 +508,7 @@ class IgniteTemplate { | |||||||
|         if (refCallback instanceof IgniteProperty) { |         if (refCallback instanceof IgniteProperty) { | ||||||
|             this._callbacks.push(refCallback.attachOnChange((oldValue, newValue) => this.onRefChanged(refCallback, newValue))); |             this._callbacks.push(refCallback.attachOnChange((oldValue, newValue) => this.onRefChanged(refCallback, newValue))); | ||||||
|             this._refs.push(element => refCallback.value = element); |             this._refs.push(element => refCallback.value = element); | ||||||
|         } else { |         } else if (refCallback instanceof Function) { | ||||||
|             this._refs.push(refCallback); |             this._refs.push(refCallback); | ||||||
|         } |         } | ||||||
|  |  | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user