Classes
Members
componentPolicy :StylePolicy
Returns the policy that is wrapped by the component descriptor.
- StylePolicy
currentModuleSource :string
The current source of the module object that manages the source code this component is defined in.
- string
Methods
adjournChange(change) → {boolean}
Given a change, returns wether or not we can delay the reconciliation of that change to a later time. This can be beneficial, since we sometimes want to avoid degrading performance when properties that are expensive to reconcile are changed in quick succession.
Name | Type | Description |
---|---|---|
change | object | The change to check. |
- Type:
- boolean
equals(otherTracker, componentName) → {boolean}
Compares two trackers in order to check if they are equivalent.
Name | Type | Description |
---|---|---|
otherTracker | ComponentChangeTracker | |
componentName | string | Name of the component to track. |
- Type:
- boolean
ignoreChange(change) → {boolean}
Filter function that allows us to check if we need to reconcile a particular change or not. ChangeTrackers work on a whitelisting policy. That is, for a change to even be considered, it needs have set the meta property reconcileChanges
to true
.
Name | Type | Description |
---|---|---|
change | object | The change object to check |
- Type:
- boolean
isPositionedByLayout(aMorph) → {boolean}
Checks if a given morph's position is dictacted by a layout. In those cases reconciling position changes can be skipped.
Name | Type | Description |
---|---|---|
aMorph | Morph | The morph to check for. |
- Type:
- boolean
onceChangesProcessed() → {Promise.<boolean>}
. When processing changes have to wait for the module system, since the writing of files to the file system is asynchronous. This method returns a promise that will resolve once all the changes that are being processed by the tracker have been effective.
- Type:
- Promise.<boolean>
(async) processChangeInComponent(change)
Called in response to changes in the component morph in order to reconcile these changes in the source code as well as the currently initialized policy object.
Name | Type | Description |
---|---|---|
change | object | The change to reconcile. |
whenReady() → {Promise.<boolean>}
Returns a promise that once resolves denotes that the tracker is ready to reconcile changes with the module.
- Type:
- Promise.<boolean>