File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -144,7 +144,7 @@ function ThreeJsViewer(){
144144 if ( this . selected ) this . selected . materials [ 0 ] . color . setHex ( this . UNSELECTED_COLOR ) ;
145145 this . selected = null ;
146146 }
147- this . onClick ( this . selected ? this . meshes [ this . selected . geometry . id ] : 'nothing' ) ;
147+ this . onClick ( this . selected ? this . meshes [ this . selected . geometry . id ] : null ) ;
148148 } ;
149149
150150 this . animate = function ( ) {
Load Diff This file was deleted.
Original file line number Diff line number Diff line change 6868 viewer = new ThreeJsViewer ( ) ;
6969 viewer . init ( $ ( '#viewerContainer' ) ) ;
7070 viewer . onClick = function ( id ) {
71- $ ( '#selection' ) . html ( id ) ;
71+ if ( id == null ) {
72+ $ ( '#selection' ) . html ( 'nothing' ) ;
73+ return ;
74+ }
75+ $ . ajax ( {
76+ url : '/rest/getDataObjectByGuid' ,
77+ data : 'roid=' + $ ( '#roids' ) . val ( ) + '&guid=' + id ,
78+ success : function ( data ) {
79+ var jqData = $ ( data ) ;
80+ var name = jqData . find ( 'name' ) . text ( ) ;
81+ var type = jqData . find ( 'type' ) . text ( ) ;
82+ $ ( '#selection' ) . html ( id + ' - ' + name + ' - ' + type ) ;
83+ }
84+ } ) ;
7285 } ;
7386 viewer . animate ( ) ;
7487 $ ( '#login' ) . submit ( function ( ) {
You can’t perform that action at this time.
0 commit comments