Skip to main content
1-Visitor
April 28, 2021
Question

Multiple scan widget in 3D eyewear

  • April 28, 2021
  • 2 replies
  • 3152 views

I'm having a concern regarding scan widget in 3D eyewear.

 

Is it possible to have multiple scan widgets in one project?

 

Currently I'm using 2 scan widgets, the first scanning will display first popup, and the second scanning should display second popup. But now, during second scanning, after value has been acquired, the first and second popup display simultaneously. 

 

Since 3D eyewear does not supporting popup, I'm using 3D label and 3D button for both popup.  

 

Need you guys response at your earliest convenience.

 

Thanks

2 replies

16-Pearl
April 28, 2021

Hi RahSyi,

 

Maybe it is easier to use just one scan widget. You can transfere the scanned value to your js by putting this in the js field of "acquired value" in your scan widged:

openPopup(view.wdg["scan-1"].scannedValue);

 

Then, you can use something like this in your js code:


$scope.openPopup = function(scannedValue) {

switch (scannedValue) {
case 'popup-1':
$scope.view.wdg['popup-1'].visible=true;
$scope.view.wdg['popup-2'].visible=false;
$scope.view.wdg['popup-3'].visible=false;
$scope.view.wdg['popup-4'].visible=false;
break;
case "popup-2":
$scope.view.wdg['popup-1'].visible=false;
$scope.view.wdg['popup-2'].visible=true;
$scope.view.wdg['popup-3'].visible=false;
$scope.view.wdg['popup-4'].visible=false;
break;
case "popup-3":
$scope.view.wdg['popup-1'].visible=false;
$scope.view.wdg['popup-2'].visible=false;
$scope.view.wdg['popup-3'].visible=true;
$scope.view.wdg['popup-4'].visible=false;
break;
case "popup-4":
$scope.view.wdg['popup-1'].visible=false;
$scope.view.wdg['popup-2'].visible=false;
$scope.view.wdg['popup-3'].visible=false;
$scope.view.wdg['popup-4'].visible=true;
break;
}}

 

ASM1-VisitorAuthor
1-Visitor
April 28, 2021

actually, I'm using 3DLabel and 3D buttons for popup since popup widget not available and supported in 3D eyewear. 

 

Any other solution that I can try? 

 

Thanks

16-Pearl
April 28, 2021

No problem, just replace the regarding lines, e.g.:

instead of :

$scope.view.wdg['popup-1'].visible=true;

 

use:

$scope.view.wdg['label-1'].visible=true;

 

or use 3DPanels to group the widgeds to be displayed.

16-Pearl
April 29, 2021

Widgets:

scan-1, scan-2, scan-3

3DPressButton-1, 3DPressButton-2, 3DPressButton-3

3DLabel-1, 3DLabel-2, 3DLabel-3

 

['scan-x']['scannedValue'] is Bind to ['3DLabel-x']['text']

Same thing happens here, one scanned value acquired, all labels are shown.

 

$timeout could be a workaround

$scope.app.show1 = function(){
 $timeout(function{
 $scope.view.wdg['3DLabel-1'].visible = true;
 $scope.view.wdg['3DLabel-2'].visible = false;
 $scope.view.wdg['3DLabel-3'].visible = false;
 }, 10)
}

 

ASM1-VisitorAuthor
1-Visitor
April 30, 2021

@dsgnrClarK,

 

Thank you for your reply.

 

I've tried your suggestion, but there's no widgets appear. 

16-Pearl
May 3, 2021