mirror of
https://github.com/nasa/openmct.git
synced 2025-06-17 14:48:13 +00:00
Reorder api update (#2319)
* Added 'reorder' function to composition API * Re-implemented reordering in Elements * Make LAD table editable * Remove test spec focus * Fixing bugs with event listeners * Clean up listeners properly in Elements pool * Fixed race condition on drag-and-drop to initiate edit * Implement reordering in LAD tables * Reorder events emit full reorder plan * Fixed failing specs
This commit is contained in:
committed by
Deep Tailor
parent
a14f628ca3
commit
019d108bb2
@ -236,19 +236,15 @@ define([
|
||||
* @name remove
|
||||
*/
|
||||
CompositionCollection.prototype.reorder = function (oldIndex, newIndex, skipMutate) {
|
||||
if (!skipMutate) {
|
||||
this.provider.reorder(this.domainObject, oldIndex, newIndex);
|
||||
} else {
|
||||
this.emit('reorder', oldIndex, newIndex);
|
||||
}
|
||||
this.provider.reorder(this.domainObject, oldIndex, newIndex);
|
||||
};
|
||||
|
||||
/**
|
||||
* Handle reorder from provider.
|
||||
* @private
|
||||
*/
|
||||
CompositionCollection.prototype.onProviderReorder = function (oldIndex, newIndex) {
|
||||
this.reorder(oldIndex, newIndex, true);
|
||||
CompositionCollection.prototype.onProviderReorder = function (reorderMap) {
|
||||
this.emit('reorder', reorderMap);
|
||||
};
|
||||
|
||||
/**
|
||||
|
Reference in New Issue
Block a user