mirror of
https://github.com/nasa/openmct.git
synced 2025-02-01 00:45:41 +00:00
[Browse] Menu action called correctly
Both the menu gesture and the menu arrow now correctly call the menu action. #33.
This commit is contained in:
parent
809a6e457c
commit
c08f972ab4
@ -25,6 +25,6 @@
|
||||
<span ng-if="parameters.mode" class='action'>{{parameters.mode}}</span>
|
||||
<span class='type-name'>{{type.getName()}}</span>
|
||||
<span class='title-label'>{{model.name}}</span>
|
||||
<mct-representation key="'menu-arrow'"></mct-representation>
|
||||
<mct-representation key="'menu-arrow'" mct-object='domainObject'></mct-representation>
|
||||
</span>
|
||||
</div>
|
@ -36,7 +36,7 @@ define(
|
||||
* @constructor
|
||||
*/
|
||||
function MenuArrowController($scope) {
|
||||
var domainObject = $scope.domainObject,
|
||||
var //domainObject = $scope.domainObject,
|
||||
context;
|
||||
|
||||
function showMenu(event) {
|
||||
@ -44,18 +44,19 @@ define(
|
||||
|
||||
console.log('$scope ', $scope);
|
||||
console.log('$scope.domainObject ', $scope.domainObject);
|
||||
console.log('domainObject ', domainObject);
|
||||
//console.log('domainObject ', domainObject);
|
||||
console.log('event ', event);
|
||||
|
||||
context = {key: 'menu', event: event, domainObject: domainObject};
|
||||
domainObject.getCapability('action').perform(context);
|
||||
context = {key: 'menu', event: event, domainObject: $scope.domainObject};
|
||||
$scope.domainObject.getCapability('action').perform(context);
|
||||
}
|
||||
|
||||
/*
|
||||
// attempt to set the domain object
|
||||
$scope.$watch('domainObject', function (c) {
|
||||
domainObject = c;
|
||||
console.log('watcher called');
|
||||
});
|
||||
*/
|
||||
|
||||
return {
|
||||
showMenu: showMenu
|
||||
|
@ -50,7 +50,7 @@ define(
|
||||
function ContextMenuAction($compile, $document, $window, $rootScope, actionContext) {
|
||||
|
||||
function perform() {
|
||||
//console.log('in perform()');
|
||||
console.log('in perform()');
|
||||
var winDim = [$window.innerWidth, $window.innerHeight],
|
||||
eventCoors = [actionContext.event.pageX, actionContext.event.pageY],
|
||||
menuDim = GestureConstants.MCT_MENU_DIMENSIONS,
|
||||
|
Loading…
x
Reference in New Issue
Block a user