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

Community Tip - Need to share some code when posting a question or reply? Make sure to use the "Insert code sample" menu option. Learn more! X

Wayfinder settings /adjustments of waypoints

IB_10645210
12-Amethyst

Wayfinder settings /adjustments of waypoints

Hello dear PTC community,

My 3D model is not huge ( 35 inches long) and  I need to adjust the frequency of my waypoints ( for example to  0.5 inches between 2 waypoints).

Please advise how can I do it.

 Also please advise how I can rescale and adjust the transparency for Wayfinder widget in terms of parameters in CSS.

Thank you. 

 

1 ACCEPTED SOLUTION

Accepted Solutions

Hi @IB_10645210 ,

let suppose that you have one wayfinder Widget e.g. wayfinder1- with 16 waypoint items . The follow JavaScript code will set the position to a grid  4 X 4 = 16

 

//------------------------------------------------------------
$scope.Test=function(){
var wdgs=$scope.app.view.Home.wdg; 
  for(wdg in wdgs)
  {   
  if(hasWdgProp(wdgs[wdg],'selectedWaypointIndex')) //only wayfinder widget has this property
    { let count=0;
     let arr_size= wdgs[wdg].waypointsData.length
  
     for (i=0; i<arr_size; i++) {
       //4 grids
     a1=i % 4
     a2= (i -a1) /4
      wdgs[wdg].waypointsData[i].position.x=-0.5+0.25*a1
      wdgs[wdg].waypointsData[i].position.y=0.1+0.25*a2
      wdgs[wdg].waypointsData[i].position.z=0
      $scope.$applyAsync();}
    }
     $scope.$applyAsync();
  }
};
//======================================================================

 

where z=0

x is starting with         0.5, 0.75,1.0,1.25

and y respectively       0.1, 0.35, 6 , 8.25

View solution in original post

4 REPLIES 4

Hi @IB_10645210 ,

let suppose that you have one wayfinder Widget e.g. wayfinder1- with 16 waypoint items . The follow JavaScript code will set the position to a grid  4 X 4 = 16

 

//------------------------------------------------------------
$scope.Test=function(){
var wdgs=$scope.app.view.Home.wdg; 
  for(wdg in wdgs)
  {   
  if(hasWdgProp(wdgs[wdg],'selectedWaypointIndex')) //only wayfinder widget has this property
    { let count=0;
     let arr_size= wdgs[wdg].waypointsData.length
  
     for (i=0; i<arr_size; i++) {
       //4 grids
     a1=i % 4
     a2= (i -a1) /4
      wdgs[wdg].waypointsData[i].position.x=-0.5+0.25*a1
      wdgs[wdg].waypointsData[i].position.y=0.1+0.25*a2
      wdgs[wdg].waypointsData[i].position.z=0
      $scope.$applyAsync();}
    }
     $scope.$applyAsync();
  }
};
//======================================================================

 

where z=0

x is starting with         0.5, 0.75,1.0,1.25

and y respectively       0.1, 0.35, 6 , 8.25

@RolandRaytchev 

Thank you for your response.

Do you know how I can rescale and adjust the transparency for the Wayfinder widget in terms of parameters in CSS?

 

This guy>>>>>>>>>>IB_10645210_0-1696266509722.png

I noticed you have some code for different devices. So our user test showed that some Samsung Ulta S22,S23 have some UI issues that we didn't have on other devices. Please advise troubleshooting for such issue.

I attached the test project here ,I used to verify

Thank you so much!!!!

Top Tags