@@ -156,12 +156,12 @@ var MetadataPlot = Panel.extend({
156156 requiredKeys . push ( this . plotConfig [ k ] ) ;
157157 }
158158 } ) ;
159- keys = keys . concat ( [ '_0_item .name' , '_2_item .id' , '_bbox .x0' , '_bbox .y0' , '_bbox .x1' , '_bbox .y1' ] ) ;
159+ keys = keys . concat ( [ 'item .name' , 'item .id' , 'bbox .x0' , 'bbox .y0' , 'bbox .x1' , 'bbox .y1' ] ) ;
160160 if ( this . _currentAnnotations && this . _currentAnnotations . length > 1 ) {
161- keys = keys . concat ( [ '_1_annotation .name' ] ) ;
161+ keys = keys . concat ( [ 'annotation .name' ] ) ;
162162 }
163163 if ( this . _currentAnnotations && this . _currentAnnotations . length >= 1 ) {
164- keys = keys . concat ( [ '_3_annotation .id' , '_5_annotationelement .id' ] ) ;
164+ keys = keys . concat ( [ 'annotation .id' , 'annotationelement .id' ] ) ;
165165 }
166166 const fetch = {
167167 adjacentItems : ! ! this . plotConfig . folder ,
@@ -250,7 +250,7 @@ var MetadataPlot = Panel.extend({
250250 }
251251 return ;
252252 }
253- if ( plotData . colDict [ '_3_annotation .id' ] === undefined || plotData . colDict [ '_5_annotationelement .id' ] === undefined ) {
253+ if ( plotData . colDict [ 'annotation .id' ] === undefined || plotData . colDict [ 'annotationelement .id' ] === undefined ) {
254254 return ;
255255 }
256256 // evt is undefined when the selection is cleared
@@ -263,8 +263,8 @@ var MetadataPlot = Panel.extend({
263263 const elements = [ ] ;
264264 evt . points . forEach ( ( pt ) => {
265265 const row = plotData . data [ pt . pointIndex ] ;
266- const annotid = row [ plotData . colDict [ '_3_annotation .id' ] . index ] ;
267- const elid = row [ plotData . colDict [ '_5_annotationelement .id' ] . index ] ;
266+ const annotid = row [ plotData . colDict [ 'annotation .id' ] . index ] ;
267+ const elid = row [ plotData . colDict [ 'annotationelement .id' ] . index ] ;
268268 if ( annotid === undefined || elid === undefined ) {
269269 return ;
270270 }
@@ -286,14 +286,14 @@ var MetadataPlot = Panel.extend({
286286 } ,
287287
288288 onElementSelect : function ( elements ) {
289- if ( ! this . lastPlotData || ! this . lastPlotData . colDict [ '_5_annotationelement .id' ] || ! elements . models ) {
289+ if ( ! this . lastPlotData || ! this . lastPlotData . colDict [ 'annotationelement .id' ] || ! elements . models ) {
290290 return ;
291291 }
292292 const ids = { } ;
293293 elements . models . forEach ( ( el ) => {
294294 ids [ el . id ] = true ;
295295 } ) ;
296- const colidx = this . lastPlotData . colDict [ '_5_annotationelement .id' ] . index ;
296+ const colidx = this . lastPlotData . colDict [ 'annotationelement .id' ] . index ;
297297 const points = this . lastPlotData . data . map ( ( row , idx ) => ids [ row [ colidx ] ] ? idx : null ) . filter ( ( idx ) => idx !== null ) ;
298298 if ( ! points . length ) {
299299 return ;
@@ -335,12 +335,12 @@ var MetadataPlot = Panel.extend({
335335 _hoverText : function ( d , plotData ) {
336336 const used = { } ;
337337 let parts = [ ] ;
338- let key = '_0_item .name' ;
338+ let key = 'item .name' ;
339339 if ( plotData . adjacentItems && plotData . colDict [ key ] && d [ plotData . colDict [ key ] . index ] !== undefined && plotData . colDict [ key ] . distinctcount !== 1 ) {
340340 used [ key ] = true ;
341341 parts . push ( plotData . colDict [ key ] ) ;
342342 }
343- key = '_1_annotation .name' ;
343+ key = 'annotation .name' ;
344344 if ( plotData . colDict [ key ] && d [ plotData . colDict [ key ] . index ] !== undefined ) {
345345 used [ key ] = true ;
346346 parts . push ( plotData . colDict [ key ] ) ;
@@ -354,11 +354,11 @@ var MetadataPlot = Panel.extend({
354354 parts = parts . map ( ( col ) => `${ col . title } : ${ col . type === 'number' ? this . _formatNumber ( d [ col . index ] ) : d [ col . index ] } ` ) ;
355355
356356 const imageDict = {
357- id : '_2_item .id' ,
358- left : '_bbox .x0' ,
359- top : '_bbox .y0' ,
360- right : '_bbox .x1' ,
361- bottom : '_bbox .y1'
357+ id : 'item .id' ,
358+ left : 'bbox .x0' ,
359+ top : 'bbox .y0' ,
360+ right : 'bbox .x1' ,
361+ bottom : 'bbox .y1'
362362 } ;
363363 if ( Object . values ( imageDict ) . every ( ( v ) => plotData . colDict [ v ] && d [ plotData . colDict [ v ] . index ] !== undefined ) ) {
364364 d . image = { } ;
0 commit comments