Re: zoom for HTML5 tool file is weak compared to program zoom

by PacWood » Tue Mar 13, 2018 9:27 pm

While re-reading the post, I noticed I did not copy this line in the previous post:

"UP.setAerialViewCenteredOnSelectionEnabled(true);"

Below is the code with the missing line at the end.

Code: Select all

<script>

  var HPC =  viewHome("viewerCanvas",   
           homeUrl,          
           onerror,          
           onprogression,     
          {roundsPerMinute: 0,                    
           navigationPanel: "default",             
           levelsAndCamerasListId: "levelsAndCameras",         
         selectableLevels: ["Level 1", "Level 2"],        
           activateCameraSwitchKey: true                       
          });  
          
    
   console.log(HPC);
   var UP = HPC.getUserPreferences;
   console.log(UP);
   UP.setAerialViewCenteredOnSelectionEnabled(true);
   
</script>
Below is a screen shot of the console log while running the above script that is in the .html file.

The console shows an "undefined".

Am I accessing the User Preference correctly?

thank you.





Image