mirror of
https://github.com/nasa/openmct.git
synced 2025-06-13 04:38:15 +00:00
[JSDoc] Add annotations
Bulk-add JSDoc annotations, WTD-1482.
This commit is contained in:
@ -29,6 +29,8 @@ define(
|
||||
* The "Cancel" action; the action triggered by clicking Cancel from
|
||||
* Edit Mode. Exits the editing user interface and invokes object
|
||||
* capabilities to persist the changes that have been made.
|
||||
* @constructor
|
||||
* @memberof platform/commonUI/edit
|
||||
*/
|
||||
function CancelAction($location, urlService, context) {
|
||||
var domainObject = context.domainObject;
|
||||
@ -62,6 +64,7 @@ define(
|
||||
*
|
||||
* @returns {Promise} a promise that will be fulfilled when
|
||||
* cancellation has completed
|
||||
* @memberof platform/commonUI/edit.CancelAction#
|
||||
*/
|
||||
perform: function () {
|
||||
return doCancel(getEditorCapability())
|
||||
@ -84,4 +87,4 @@ define(
|
||||
|
||||
return CancelAction;
|
||||
}
|
||||
);
|
||||
);
|
||||
|
@ -42,6 +42,7 @@ define(
|
||||
* mode (typically triggered by the Edit button.) This will
|
||||
* show the user interface for editing (by way of a change in
|
||||
* route)
|
||||
* @memberof platform/commonUI/edit
|
||||
* @constructor
|
||||
*/
|
||||
function EditAction($location, navigationService, $log, context) {
|
||||
@ -63,6 +64,7 @@ define(
|
||||
return {
|
||||
/**
|
||||
* Enter edit mode.
|
||||
* @memberof platform/commonUI/edit.EditAction#
|
||||
*/
|
||||
perform: function () {
|
||||
navigationService.setNavigation(domainObject);
|
||||
@ -87,4 +89,4 @@ define(
|
||||
|
||||
return EditAction;
|
||||
}
|
||||
);
|
||||
);
|
||||
|
@ -29,6 +29,8 @@ define(
|
||||
|
||||
/**
|
||||
* Add one domain object to another's composition.
|
||||
* @constructor
|
||||
* @memberof platform/commonUI/edit
|
||||
*/
|
||||
function LinkAction(context) {
|
||||
var domainObject = (context || {}).domainObject,
|
||||
@ -58,6 +60,7 @@ define(
|
||||
return {
|
||||
/**
|
||||
* Perform this action.
|
||||
* @memberof platform/commonUI/edit.LinkAction#
|
||||
*/
|
||||
perform: function () {
|
||||
return selectedId && doLink();
|
||||
@ -67,4 +70,4 @@ define(
|
||||
|
||||
return LinkAction;
|
||||
}
|
||||
);
|
||||
);
|
||||
|
@ -38,6 +38,7 @@ define(
|
||||
* @param {DialogService} dialogService a service which will show the dialog
|
||||
* @param {DomainObject} object the object to be edited
|
||||
* @param {ActionContext} context the context in which this action is performed
|
||||
* @memberof platform/commonUI/edit
|
||||
* @constructor
|
||||
*/
|
||||
function PropertiesAction(dialogService, context) {
|
||||
@ -77,6 +78,7 @@ define(
|
||||
* Perform this action.
|
||||
* @return {Promise} a promise which will be
|
||||
* fulfilled when the action has completed.
|
||||
* @memberof platform/commonUI/edit.PropertiesAction#
|
||||
*/
|
||||
perform: function () {
|
||||
var type = object.getCapability('type');
|
||||
@ -106,3 +108,4 @@ define(
|
||||
|
||||
);
|
||||
|
||||
|
||||
|
@ -37,6 +37,7 @@ define(
|
||||
* @param {TypeImpl} type the type of domain object for which properties
|
||||
* will be specified
|
||||
* @param {DomainObject} the object for which properties will be set
|
||||
* @memberof platform/commonUI/edit
|
||||
* @constructor
|
||||
* @memberof module:common/actions/properties-dialog
|
||||
*/
|
||||
@ -47,6 +48,7 @@ define(
|
||||
/**
|
||||
* Get sections provided by this dialog.
|
||||
* @return {FormStructure} the structure of this form
|
||||
* @memberof platform/commonUI/edit.PropertiesDialog#
|
||||
*/
|
||||
getFormStructure: function () {
|
||||
return {
|
||||
@ -66,6 +68,7 @@ define(
|
||||
* Get the initial state of the form shown by this dialog
|
||||
* (based on the object model)
|
||||
* @returns {object} initial state of the form
|
||||
* @memberof platform/commonUI/edit.PropertiesDialog#
|
||||
*/
|
||||
getInitialFormValue: function () {
|
||||
// Start with initial values for properties
|
||||
@ -77,6 +80,7 @@ define(
|
||||
},
|
||||
/**
|
||||
* Update a domain object model based on the value of a form.
|
||||
* @memberof platform/commonUI/edit.PropertiesDialog#
|
||||
*/
|
||||
updateModel: function (model, formValue) {
|
||||
// Update all properties
|
||||
@ -91,4 +95,4 @@ define(
|
||||
|
||||
return PropertiesDialog;
|
||||
}
|
||||
);
|
||||
);
|
||||
|
@ -37,6 +37,7 @@ define(
|
||||
*
|
||||
* @param {DomainObject} object the object to be removed
|
||||
* @param {ActionContext} context the context in which this action is performed
|
||||
* @memberof platform/commonUI/edit
|
||||
* @constructor
|
||||
* @memberof module:editor/actions/remove-action
|
||||
*/
|
||||
@ -47,6 +48,7 @@ define(
|
||||
* Check whether an object ID matches the ID of the object being
|
||||
* removed (used to filter a parent's composition to handle the
|
||||
* removal.)
|
||||
* @memberof platform/commonUI/edit.RemoveAction#
|
||||
*/
|
||||
function isNotObject(otherObjectId) {
|
||||
return otherObjectId !== object.getId();
|
||||
@ -55,6 +57,7 @@ define(
|
||||
/**
|
||||
* Mutate a parent object such that it no longer contains the object
|
||||
* which is being removed.
|
||||
* @memberof platform/commonUI/edit.RemoveAction#
|
||||
*/
|
||||
function doMutate(model) {
|
||||
model.composition = model.composition.filter(isNotObject);
|
||||
@ -63,6 +66,7 @@ define(
|
||||
/**
|
||||
* Invoke persistence on a domain object. This will be called upon
|
||||
* the removed object's parent (as its composition will have changed.)
|
||||
* @memberof platform/commonUI/edit.RemoveAction#
|
||||
*/
|
||||
function doPersist(domainObject) {
|
||||
var persistence = domainObject.getCapability('persistence');
|
||||
@ -74,6 +78,7 @@ define(
|
||||
* capability.
|
||||
* @param {ContextCapability} contextCapability the "context" capability
|
||||
* of the domain object being removed.
|
||||
* @memberof platform/commonUI/edit.RemoveAction#
|
||||
*/
|
||||
function removeFromContext(contextCapability) {
|
||||
var parent = contextCapability.getParent();
|
||||
@ -89,6 +94,7 @@ define(
|
||||
* Perform this action.
|
||||
* @return {module:core/promises.Promise} a promise which will be
|
||||
* fulfilled when the action has completed.
|
||||
* @memberof platform/commonUI/edit.RemoveAction#
|
||||
*/
|
||||
perform: function () {
|
||||
return $q.when(object.getCapability('context'))
|
||||
@ -113,4 +119,4 @@ define(
|
||||
|
||||
return RemoveAction;
|
||||
}
|
||||
);
|
||||
);
|
||||
|
@ -30,6 +30,8 @@ define(
|
||||
* The "Save" action; the action triggered by clicking Save from
|
||||
* Edit Mode. Exits the editing user interface and invokes object
|
||||
* capabilities to persist the changes that have been made.
|
||||
* @constructor
|
||||
* @memberof platform/commonUI/edit
|
||||
*/
|
||||
function SaveAction($location, urlService, context) {
|
||||
var domainObject = context.domainObject;
|
||||
@ -57,6 +59,7 @@ define(
|
||||
*
|
||||
* @returns {Promise} a promise that will be fulfilled when
|
||||
* cancellation has completed
|
||||
* @memberof platform/commonUI/edit.SaveAction#
|
||||
*/
|
||||
perform: function () {
|
||||
return doSave().then(returnToBrowse);
|
||||
@ -78,4 +81,4 @@ define(
|
||||
|
||||
return SaveAction;
|
||||
}
|
||||
);
|
||||
);
|
||||
|
@ -35,6 +35,8 @@ define(
|
||||
* Meant specifically for use by EditableDomainObject and the
|
||||
* associated cache; the constructor signature is particular
|
||||
* to a pattern used there and may contain unused arguments.
|
||||
* @constructor
|
||||
* @memberof platform/commonUI/edit
|
||||
*/
|
||||
return function EditableCompositionCapability(
|
||||
contextCapability,
|
||||
@ -54,4 +56,4 @@ define(
|
||||
);
|
||||
};
|
||||
}
|
||||
);
|
||||
);
|
||||
|
@ -35,6 +35,8 @@ define(
|
||||
* Meant specifically for use by EditableDomainObject and the
|
||||
* associated cache; the constructor signature is particular
|
||||
* to a pattern used there and may contain unused arguments.
|
||||
* @constructor
|
||||
* @memberof platform/commonUI/edit
|
||||
*/
|
||||
return function EditableContextCapability(
|
||||
contextCapability,
|
||||
@ -72,4 +74,4 @@ define(
|
||||
return capability;
|
||||
};
|
||||
}
|
||||
);
|
||||
);
|
||||
|
@ -35,6 +35,8 @@ define(
|
||||
* Meant specifically for use by EditableDomainObject and the
|
||||
* associated cache; the constructor signature is particular
|
||||
* to a pattern used there and may contain unused arguments.
|
||||
* @constructor
|
||||
* @memberof platform/commonUI/edit
|
||||
*/
|
||||
return function EditableLookupCapability(
|
||||
contextCapability,
|
||||
@ -115,4 +117,4 @@ define(
|
||||
return capability;
|
||||
};
|
||||
}
|
||||
);
|
||||
);
|
||||
|
@ -35,6 +35,8 @@ define(
|
||||
* Meant specifically for use by EditableDomainObject and the
|
||||
* associated cache; the constructor signature is particular
|
||||
* to a pattern used there and may contain unused arguments.
|
||||
* @constructor
|
||||
* @memberof platform/commonUI/edit
|
||||
*/
|
||||
function EditablePersistenceCapability(
|
||||
persistenceCapability,
|
||||
@ -62,4 +64,4 @@ define(
|
||||
|
||||
return EditablePersistenceCapability;
|
||||
}
|
||||
);
|
||||
);
|
||||
|
@ -35,6 +35,8 @@ define(
|
||||
* Meant specifically for use by EditableDomainObject and the
|
||||
* associated cache; the constructor signature is particular
|
||||
* to a pattern used there and may contain unused arguments.
|
||||
* @constructor
|
||||
* @memberof platform/commonUI/edit
|
||||
*/
|
||||
return function EditableRelationshipCapability(
|
||||
relationshipCapability,
|
||||
@ -54,4 +56,4 @@ define(
|
||||
);
|
||||
};
|
||||
}
|
||||
);
|
||||
);
|
||||
|
@ -39,6 +39,8 @@ define(
|
||||
* Meant specifically for use by EditableDomainObject and the
|
||||
* associated cache; the constructor signature is particular
|
||||
* to a pattern used there and may contain unused arguments.
|
||||
* @constructor
|
||||
* @memberof platform/commonUI/edit
|
||||
*/
|
||||
return function EditorCapability(
|
||||
persistenceCapability,
|
||||
@ -83,6 +85,7 @@ define(
|
||||
* object (and not other objects with associated changes)
|
||||
* @returns {Promise} a promise that will be fulfilled after
|
||||
* persistence has completed.
|
||||
* @memberof platform/commonUI/edit.EditorCapability#
|
||||
*/
|
||||
save: function (nonrecursive) {
|
||||
return nonrecursive ?
|
||||
@ -95,6 +98,7 @@ define(
|
||||
* been retrieved and modified during the editing session)
|
||||
* @returns {Promise} a promise that will be fulfilled after
|
||||
* cancellation has completed.
|
||||
* @memberof platform/commonUI/edit.EditorCapability#
|
||||
*/
|
||||
cancel: function () {
|
||||
return resolvePromise(undefined);
|
||||
@ -102,6 +106,7 @@ define(
|
||||
/**
|
||||
* Check if there are any unsaved changes.
|
||||
* @returns {boolean} true if there are unsaved changes
|
||||
* @memberof platform/commonUI/edit.EditorCapability#
|
||||
*/
|
||||
dirty: function () {
|
||||
return cache.dirty();
|
||||
@ -109,4 +114,4 @@ define(
|
||||
};
|
||||
};
|
||||
}
|
||||
);
|
||||
);
|
||||
|
@ -33,6 +33,7 @@ define(
|
||||
|
||||
/**
|
||||
* Controller which supplies action instances for Save/Cancel.
|
||||
* @memberof platform/commonUI/edit
|
||||
* @constructor
|
||||
*/
|
||||
function EditActionController($scope) {
|
||||
@ -51,4 +52,4 @@ define(
|
||||
|
||||
return EditActionController;
|
||||
}
|
||||
);
|
||||
);
|
||||
|
@ -33,6 +33,7 @@ define(
|
||||
* Controller which is responsible for populating the scope for
|
||||
* Edit mode; introduces an editable version of the currently
|
||||
* navigated domain object into the scope.
|
||||
* @memberof platform/commonUI/edit
|
||||
* @constructor
|
||||
*/
|
||||
function EditController($scope, $q, navigationService) {
|
||||
@ -55,6 +56,7 @@ define(
|
||||
/**
|
||||
* Get the domain object which is navigated-to.
|
||||
* @returns {DomainObject} the domain object that is navigated-to
|
||||
* @memberof platform/commonUI/edit.EditController#
|
||||
*/
|
||||
navigatedObject: function () {
|
||||
return navigatedObject;
|
||||
@ -64,6 +66,7 @@ define(
|
||||
* away from Edit mode while unsaved changes are present.
|
||||
* @returns {string} the warning to show, or undefined if
|
||||
* there are no unsaved changes
|
||||
* @memberof platform/commonUI/edit.EditController#
|
||||
*/
|
||||
getUnloadWarning: function () {
|
||||
var editorCapability = navigatedObject &&
|
||||
@ -79,4 +82,4 @@ define(
|
||||
|
||||
return EditController;
|
||||
}
|
||||
);
|
||||
);
|
||||
|
@ -28,6 +28,7 @@ define(
|
||||
|
||||
/**
|
||||
* Supports the Library and Elements panes in Edit mode.
|
||||
* @memberof platform/commonUI/edit
|
||||
* @constructor
|
||||
*/
|
||||
function EditPanesController($scope) {
|
||||
@ -56,6 +57,7 @@ define(
|
||||
* Get the root-level domain object, as reported by the
|
||||
* represented domain object.
|
||||
* @returns {DomainObject} the root object
|
||||
* @memberof platform/commonUI/edit.EditPanesController#
|
||||
*/
|
||||
getRoot: function () {
|
||||
return root;
|
||||
@ -65,4 +67,4 @@ define(
|
||||
|
||||
return EditPanesController;
|
||||
}
|
||||
);
|
||||
);
|
||||
|
@ -31,6 +31,7 @@ define(
|
||||
* to this attribute will be evaluated during page navigation events
|
||||
* and, if it returns a truthy value, will be used to populate a
|
||||
* prompt to the user to confirm this navigation.
|
||||
* @memberof platform/commonUI/edit
|
||||
* @constructor
|
||||
* @param $window the window
|
||||
*/
|
||||
@ -102,4 +103,4 @@ define(
|
||||
return MCTBeforeUnload;
|
||||
|
||||
}
|
||||
);
|
||||
);
|
||||
|
@ -68,6 +68,8 @@ define(
|
||||
* which need to behave differently in edit mode,
|
||||
* and provides a "working copy" of the object's
|
||||
* model to allow changes to be easily cancelled.
|
||||
* @constructor
|
||||
* @memberof platform/commonUI/edit
|
||||
*/
|
||||
function EditableDomainObject(domainObject, $q) {
|
||||
// The cache will hold all domain objects reached from
|
||||
@ -109,4 +111,4 @@ define(
|
||||
|
||||
return EditableDomainObject;
|
||||
}
|
||||
);
|
||||
);
|
||||
|
@ -51,6 +51,7 @@ define(
|
||||
* an argument, and returns an editable domain object as its
|
||||
* result.
|
||||
* @param $q Angular's $q, for promise handling
|
||||
* @memberof platform/commonUI/edit
|
||||
* @constructor
|
||||
* @memberof module:editor/object/editable-domain-object-cache
|
||||
*/
|
||||
@ -66,6 +67,7 @@ define(
|
||||
*
|
||||
* @param {DomainObject} domainObject the regular domain object
|
||||
* @returns {DomainObject} the domain object in an editable form
|
||||
* @memberof platform/commonUI/edit.EditableDomainObjectCache#
|
||||
*/
|
||||
getEditableObject: function (domainObject) {
|
||||
var type = domainObject.getCapability('type');
|
||||
@ -94,6 +96,7 @@ define(
|
||||
* Check if a domain object is (effectively) the top-level
|
||||
* object in this editable subgraph.
|
||||
* @returns {boolean} true if it is the root
|
||||
* @memberof platform/commonUI/edit.EditableDomainObjectCache#
|
||||
*/
|
||||
isRoot: function (domainObject) {
|
||||
return domainObject === root;
|
||||
@ -104,6 +107,7 @@ define(
|
||||
* included in the bulk save invoked when editing completes.
|
||||
*
|
||||
* @param {DomainObject} domainObject the domain object
|
||||
* @memberof platform/commonUI/edit.EditableDomainObjectCache#
|
||||
*/
|
||||
markDirty: function (domainObject) {
|
||||
dirty[domainObject.getId()] = domainObject;
|
||||
@ -114,12 +118,14 @@ define(
|
||||
* save operation.)
|
||||
*
|
||||
* @param {DomainObject} domainObject the domain object
|
||||
* @memberof platform/commonUI/edit.EditableDomainObjectCache#
|
||||
*/
|
||||
markClean: function (domainObject) {
|
||||
delete dirty[domainObject.getId()];
|
||||
},
|
||||
/**
|
||||
* Initiate a save on all objects that have been cached.
|
||||
* @memberof platform/commonUI/edit.EditableDomainObjectCache#
|
||||
*/
|
||||
saveAll: function () {
|
||||
// Get a list of all dirty objects
|
||||
@ -140,6 +146,7 @@ define(
|
||||
/**
|
||||
* Check if any objects have been marked dirty in this cache.
|
||||
* @returns {boolean} true if objects are dirty
|
||||
* @memberof platform/commonUI/edit.EditableDomainObjectCache#
|
||||
*/
|
||||
dirty: function () {
|
||||
return Object.keys(dirty).length > 0;
|
||||
@ -150,3 +157,4 @@ define(
|
||||
return EditableDomainObjectCache;
|
||||
}
|
||||
);
|
||||
|
||||
|
@ -31,6 +31,7 @@ define(
|
||||
* made editable, to support a group that can be saved all-at-once.
|
||||
* This is useful in Edit mode, which is launched for a specific
|
||||
* object but may contain changes across many objects.
|
||||
* @memberof platform/commonUI/edit
|
||||
* @constructor
|
||||
*/
|
||||
function EditableModelCache() {
|
||||
@ -47,6 +48,7 @@ define(
|
||||
* Get this domain object's model from the cache (or
|
||||
* place it in the cache if it isn't in the cache yet)
|
||||
* @returns a clone of the domain object's model
|
||||
* @memberof platform/commonUI/edit.EditableModelCache#
|
||||
*/
|
||||
getCachedModel: function (domainObject) {
|
||||
var id = domainObject.getId();
|
||||
@ -60,4 +62,4 @@ define(
|
||||
|
||||
return EditableModelCache;
|
||||
}
|
||||
);
|
||||
);
|
||||
|
@ -30,6 +30,7 @@ define(
|
||||
* Policy controlling when the `edit` and/or `properties` actions
|
||||
* can appear as applicable actions of the `view-control` category
|
||||
* (shown as buttons in the top-right of browse mode.)
|
||||
* @memberof platform/commonUI/edit
|
||||
* @constructor
|
||||
*/
|
||||
function EditActionPolicy() {
|
||||
@ -54,6 +55,7 @@ define(
|
||||
* @param {Action} action the action
|
||||
* @param context the context
|
||||
* @returns {boolean} true if not disallowed
|
||||
* @memberof platform/commonUI/edit.EditActionPolicy#
|
||||
*/
|
||||
allow: function (action, context) {
|
||||
var key = action.getMetadata().key,
|
||||
@ -79,4 +81,4 @@ define(
|
||||
|
||||
return EditActionPolicy;
|
||||
}
|
||||
);
|
||||
);
|
||||
|
@ -28,6 +28,7 @@ define(
|
||||
|
||||
/**
|
||||
* Policy controlling which views should be visible in Edit mode.
|
||||
* @memberof platform/commonUI/edit
|
||||
* @constructor
|
||||
*/
|
||||
function EditableViewPolicy() {
|
||||
@ -38,6 +39,7 @@ define(
|
||||
* @param {Action} action the action
|
||||
* @param domainObject the domain object which will be viewed
|
||||
* @returns {boolean} true if not disallowed
|
||||
* @memberof platform/commonUI/edit.EditableViewPolicy#
|
||||
*/
|
||||
allow: function (view, domainObject) {
|
||||
// If a view is flagged as non-editable, only allow it
|
||||
@ -54,4 +56,4 @@ define(
|
||||
|
||||
return EditableViewPolicy;
|
||||
}
|
||||
);
|
||||
);
|
||||
|
@ -41,6 +41,7 @@ define(
|
||||
* and may be reused for different domain objects and/or
|
||||
* representations resulting from changes there.
|
||||
*
|
||||
* @memberof platform/commonUI/edit
|
||||
* @constructor
|
||||
*/
|
||||
function EditRepresenter($q, $log, scope) {
|
||||
@ -113,10 +114,12 @@ define(
|
||||
* definition of the representation in use
|
||||
* @param {DomainObject} domainObject the domain object
|
||||
* being represented
|
||||
* @memberof platform/commonUI/edit.EditRepresenter#
|
||||
*/
|
||||
represent: represent,
|
||||
/**
|
||||
* Release any resources associated with this representer.
|
||||
* @memberof platform/commonUI/edit.EditRepresenter#
|
||||
*/
|
||||
destroy: destroy
|
||||
};
|
||||
@ -124,4 +127,4 @@ define(
|
||||
|
||||
return EditRepresenter;
|
||||
}
|
||||
);
|
||||
);
|
||||
|
@ -38,6 +38,7 @@ define(
|
||||
*
|
||||
* @param structure toolbar structure, as provided by view definition
|
||||
* @param {Function} commit callback to invoke after changes
|
||||
* @memberof platform/commonUI/edit
|
||||
* @constructor
|
||||
*/
|
||||
function EditToolbar(structure, commit) {
|
||||
@ -221,6 +222,7 @@ define(
|
||||
* Set the current selection. Visisbility of sections
|
||||
* and items in the toolbar will be updated to match this.
|
||||
* @param {Array} s the new selection
|
||||
* @memberof platform/commonUI/edit.EditToolbar#
|
||||
*/
|
||||
setSelection: function (s) {
|
||||
selection = s;
|
||||
@ -231,6 +233,7 @@ define(
|
||||
* Get the structure of the toolbar, as appropriate to
|
||||
* pass to `mct-toolbar`.
|
||||
* @returns the toolbar structure
|
||||
* @memberof platform/commonUI/edit.EditToolbar#
|
||||
*/
|
||||
getStructure: function () {
|
||||
return toolbarStructure;
|
||||
@ -239,6 +242,7 @@ define(
|
||||
* Get the current state of the toolbar, as appropriate
|
||||
* to two-way bind to the state handled by `mct-toolbar`.
|
||||
* @returns {Array} state of the toolbar
|
||||
* @memberof platform/commonUI/edit.EditToolbar#
|
||||
*/
|
||||
getState: function () {
|
||||
return toolbarState;
|
||||
@ -248,6 +252,7 @@ define(
|
||||
* @param {number} index the index of the corresponding
|
||||
* element in the state array
|
||||
* @param value the new value to convey to the selection
|
||||
* @memberof platform/commonUI/edit.EditToolbar#
|
||||
*/
|
||||
updateState: function (index, value) {
|
||||
return updateProperties(properties[index], value);
|
||||
@ -259,3 +264,4 @@ define(
|
||||
}
|
||||
);
|
||||
|
||||
|
||||
|
@ -33,6 +33,7 @@ define(
|
||||
* The EditToolbarRepresenter populates the toolbar in Edit mode
|
||||
* based on a view's definition.
|
||||
* @param {Scope} scope the Angular scope of the representation
|
||||
* @memberof platform/commonUI/edit
|
||||
* @constructor
|
||||
*/
|
||||
function EditToolbarRepresenter(scope, element, attrs) {
|
||||
@ -136,10 +137,12 @@ define(
|
||||
* definition of the representation in use
|
||||
* @param {DomainObject} domainObject the domain object
|
||||
* being represented
|
||||
* @memberof platform/commonUI/edit.EditToolbarRepresenter#
|
||||
*/
|
||||
represent: (attrs || {}).toolbar ? represent : noop,
|
||||
/**
|
||||
* Release any resources associated with this representer.
|
||||
* @memberof platform/commonUI/edit.EditToolbarRepresenter#
|
||||
*/
|
||||
destroy: (attrs || {}).toolbar ? destroy : noop
|
||||
};
|
||||
@ -147,4 +150,4 @@ define(
|
||||
|
||||
return EditToolbarRepresenter;
|
||||
}
|
||||
);
|
||||
);
|
||||
|
@ -37,6 +37,7 @@ define(
|
||||
* * The selection, for single selected elements within the
|
||||
* view.
|
||||
*
|
||||
* @memberof platform/commonUI/edit
|
||||
* @constructor
|
||||
*/
|
||||
function EditToolbarSelection() {
|
||||
@ -106,22 +107,26 @@ define(
|
||||
/**
|
||||
* Check if an object is currently selected.
|
||||
* @returns true if selected, otherwise false
|
||||
* @memberof platform/commonUI/edit.EditToolbarSelection#
|
||||
*/
|
||||
selected: isSelected,
|
||||
/**
|
||||
* Select an object.
|
||||
* @param obj the object to select
|
||||
* @returns {boolean} true if selection changed
|
||||
* @memberof platform/commonUI/edit.EditToolbarSelection#
|
||||
*/
|
||||
select: select,
|
||||
/**
|
||||
* Clear the current selection.
|
||||
* @returns {boolean} true if selection changed
|
||||
* @memberof platform/commonUI/edit.EditToolbarSelection#
|
||||
*/
|
||||
deselect: deselect,
|
||||
/**
|
||||
* Get the currently-selected object.
|
||||
* @returns the currently selected object
|
||||
* @memberof platform/commonUI/edit.EditToolbarSelection#
|
||||
*/
|
||||
get: get,
|
||||
/**
|
||||
@ -129,6 +134,7 @@ define(
|
||||
* the view itself.)
|
||||
* @param [proxy] the view proxy (if setting)
|
||||
* @returns the current view proxy
|
||||
* @memberof platform/commonUI/edit.EditToolbarSelection#
|
||||
*/
|
||||
proxy: proxy,
|
||||
/**
|
||||
@ -136,6 +142,7 @@ define(
|
||||
* selection proxy. It is generally not advisable to
|
||||
* mutate this array directly.
|
||||
* @returns {Array} all selections
|
||||
* @memberof platform/commonUI/edit.EditToolbarSelection#
|
||||
*/
|
||||
all: all
|
||||
};
|
||||
@ -143,4 +150,4 @@ define(
|
||||
|
||||
return EditToolbarSelection;
|
||||
}
|
||||
);
|
||||
);
|
||||
|
Reference in New Issue
Block a user