Commit 6188329e authored by Rurik Bugdanov's avatar Rurik Bugdanov
Browse files

x3dom_init.js

- remove backquotes incompatibles with minification
parent b6453ceb
Loading
Loading
Loading
Loading
+320 −321
Original line number Diff line number Diff line
@@ -435,24 +435,24 @@ X3DOMObject.prototype.createMarker = function(x,y,z,id){
        size  = self.data.markers[index].size/2;
    }

    var html = `
    <group id='`+id+`' class='`+sph_class+`'>
    <switch whichChoice='0'>
    <transform translation='`+x+` `+y+` `+z+`' rotation='0 0 0 0'>
        <shape class='shapemarker'> 
        <appearance> 
            <material diffuseColor='`+color+`' transparency='0.0' myColor='`+color+`'></material>
        </appearance> 
        <Sphere DEF="sphere" radius="`+size+`" />
        </shape> 
    </transform>
    </switch>
    </group>
    `;
    var html = [
      '<group id="'+id+'" class="'+sph_class+'">',
      '  <switch whichChoice="0">',
      '    <transform translation="'+x+' '+y+' '+z+'" rotation="0 0 0 0">',
      '      <shape class="shapemarker">',
      '        <appearance>',
      '          <material diffuseColor="'+color+'" transparency="0.0" myColor="'+color+'"></material>',
      '        </appearance>',
      '        <Sphere DEF="sphere" radius="'+size+'" />',
      '      </shape>',
      '    </transform>',
      '  </switch>',
      '</group>'
    ].join('\n');

    var sphere_element = $(html);

    $(this.element).find("scene").append(sphere_element);
    $('scene',this.element).append(sphere_element);

    //var shape = $(sphere_element).find("shape");
    //var id_prefix = $(sphere_element).attr("id").substr(0,7);
@@ -1187,42 +1187,42 @@ X3DOMObject.displayViewInfo = function(e){
    //Map.marker.setAltitude(camera.y);
    //Map.marker.setElevation(camera.e*Math.PI/180);

    var msg = `
<table>
<tr>
    <td></td>
    <td colspan='3' align='center'>position, m</td>
    <td colspan='3' align='center'>orientation, &deg;</td>
</tr>
<tr>
    <th></th>
    <th style='width:60px;'>x</th>
    <th style='width:60px;'>y</th>
    <th style='width:60px;'>z</th>
    <th>azimuth</th>
    <th>elevation</th>
    <th>skew</th>
</tr>
<tr>
    <td>mouse</td>
    <td>`+mouse.x+`</td>
    <td>`+mouse.y+`</td>
    <td>`+mouse.z+`</td>
    <td>`+mouse.a+`</td>
    <td>`+mouse.e+`</td>
    <td>`+mouse.s+`</td>
</tr>
<tr>
    <td>camera</td>
    <td>`+camera.x+`</td>
    <td>`+camera.y+`</td>
    <td>`+camera.z+`</td>
    <td>`+camera.a+`</td>
    <td>`+camera.e+`</td>
    <td>`+camera.s+`</td>
</tr>
</table>
`;
    var msg = [
'<table>',
'<tr>',
'    <td></td>',
'    <td colspan="3" align="center">position, m</td>',
'    <td colspan="3" align="center">orientation, &deg;</td>',
'</tr>',
'<tr>',
'    <th></th>',
'    <th style="width:60px;">x</th>',
'    <th style="width:60px;">y</th>',
'    <th style="width:60px;">z</th>',
'    <th>azimuth</th>',
'    <th>elevation</th>',
'    <th>skew</th>',
'</tr>',
'<tr>',
'    <td>mouse</td>',
'    <td>'+mouse.x+'</td>',
'    <td>'+mouse.y+'</td>',
'    <td>'+mouse.z+'</td>',
'    <td>'+mouse.a+'</td>',
'    <td>'+mouse.e+'</td>',
'    <td>'+mouse.s+'</td>',
'</tr>',
'<tr>',
'    <td>camera</td>',
'    <td>'+camera.x+'</td>',
'    <td>'+camera.y+'</td>',
'    <td>'+camera.z+'</td>',
'    <td>'+camera.a+'</td>',
'    <td>'+camera.e+'</td>',
'    <td>'+camera.s+'</td>',
'</tr>',
'</table>'
].join('\n');

    if (SETTINGS.viewinfo){
        ui_showMessage("window-viewinfo",msg);
@@ -1287,4 +1287,3 @@ X3DOMObject.displayMarkInfo = function(index){
    }

}