cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Vuforia Studio Close All Popups

SOLVED
Highlighted
Regular Member

Vuforia Studio Close All Popups

Is there a way to close all of the popups that are currently visible without knowing what they are? I'm trying to avoid using a long list of 'hidepopup' for every single popup that could possibly be visible.

Tags (1)
1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted

Re: Vuforia Studio Close All Popups

Hello @jlbrenneke ,

I think the answer of your question is 'yes' this is possible. Please, try the following code:

$scope.closeAllPopups=function()
{
 wdgs=$scope.view.wdg
Object.keys(wdgs).forEach(function(key) { 
 wdg = wdgs[key]
 console.warn(wdg)
    if ( (('type' in wdg)==true) && ((wdg.type=='floatingpopup') || (wdg.type=='modal'))) {
            
      console.warn("POPUP=>modelWdgReset key="+key)
      // one of the next options
     //  $timeout($scope.$root.$broadcast('app.view["Home"].wdg["'+key+'"].svc.hidepopup'),100); 
       $scope.app.fn.triggerWidgetService(key,'hidepopup');
       									   }});
   $scope.$applyAsync();
}

View solution in original post

1 REPLY 1
Highlighted

Re: Vuforia Studio Close All Popups

Hello @jlbrenneke ,

I think the answer of your question is 'yes' this is possible. Please, try the following code:

$scope.closeAllPopups=function()
{
 wdgs=$scope.view.wdg
Object.keys(wdgs).forEach(function(key) { 
 wdg = wdgs[key]
 console.warn(wdg)
    if ( (('type' in wdg)==true) && ((wdg.type=='floatingpopup') || (wdg.type=='modal'))) {
            
      console.warn("POPUP=>modelWdgReset key="+key)
      // one of the next options
     //  $timeout($scope.$root.$broadcast('app.view["Home"].wdg["'+key+'"].svc.hidepopup'),100); 
       $scope.app.fn.triggerWidgetService(key,'hidepopup');
       									   }});
   $scope.$applyAsync();
}

View solution in original post

Announcements
Join an
AR Working Group!

Topics available:
AR/VR for Data Optimization AR/VR for Security and Control AR/VR for Inspection