Fix `.default_view()` to view-left-of-data
							parent
							
								
									a63dd6c4f2
								
							
						
					
					
						commit
						77c472f300
					
				| 
						 | 
					@ -1028,6 +1028,12 @@ class ChartPlotWidget(pg.PlotWidget):
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        if index_field == 'time':
 | 
					        if index_field == 'time':
 | 
				
			||||||
            vr = viz.plot.viewRect()
 | 
					            vr = viz.plot.viewRect()
 | 
				
			||||||
 | 
					            vtl, vtr = vr.left(), vr.right()
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					            if vtl < datum_start:
 | 
				
			||||||
 | 
					                vtl = datum_start
 | 
				
			||||||
 | 
					                vtr = datum_stop
 | 
				
			||||||
 | 
					
 | 
				
			||||||
            (
 | 
					            (
 | 
				
			||||||
                abs_slc,
 | 
					                abs_slc,
 | 
				
			||||||
                read_slc,
 | 
					                read_slc,
 | 
				
			||||||
| 
						 | 
					@ -1035,11 +1041,14 @@ class ChartPlotWidget(pg.PlotWidget):
 | 
				
			||||||
 | 
					
 | 
				
			||||||
            ) = viz.flume.slice_from_time(
 | 
					            ) = viz.flume.slice_from_time(
 | 
				
			||||||
                array,
 | 
					                array,
 | 
				
			||||||
                start_t=vr.left(),
 | 
					                start_t=vtl,
 | 
				
			||||||
                stop_t=vr.right(),
 | 
					                stop_t=vtr,
 | 
				
			||||||
            )
 | 
					            )
 | 
				
			||||||
            iv_arr = array[mask]
 | 
					            iv_arr = array
 | 
				
			||||||
            index = iv_arr['index']
 | 
					            if mask is not None:
 | 
				
			||||||
 | 
					                iv_arr = array[mask]
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					            index = iv_arr['time']
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        else:
 | 
					        else:
 | 
				
			||||||
            index = array['index']
 | 
					            index = array['index']
 | 
				
			||||||
| 
						 | 
					@ -1358,8 +1367,8 @@ class ChartPlotWidget(pg.PlotWidget):
 | 
				
			||||||
        Update the named internal graphics from ``array``.
 | 
					        Update the named internal graphics from ``array``.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        '''
 | 
					        '''
 | 
				
			||||||
        flow = self._vizs[array_key or graphics_name]
 | 
					        viz = self._vizs[array_key or graphics_name]
 | 
				
			||||||
        return flow.update_graphics(
 | 
					        return viz.update_graphics(
 | 
				
			||||||
            array_key=array_key,
 | 
					            array_key=array_key,
 | 
				
			||||||
            **kwargs,
 | 
					            **kwargs,
 | 
				
			||||||
        )
 | 
					        )
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
		Reference in New Issue