@@ -126,7 +126,7 @@ void LfpTimescale::setPausedState(bool isPaused_)
126126 else {
127127 lfpDisplay->pause (true );
128128 isPaused = true ;
129- startTimer (50 );
129+ startTimer (200 );
130130 }
131131
132132 repaint ();
@@ -168,56 +168,6 @@ void LfpTimescale::mouseDrag(const juce::MouseEvent &e)
168168
169169 scrollTimescale (dragDeltaX);
170170
171-
172- /* if (e.mods.isLeftButtonDown()) // double check that we initiate only for left click and hold
173- {
174- if (e.mods.isCommandDown()) // CTRL + drag -> change channel spacing
175- {
176- // init state in our track zooming info struct
177- if (!lfpDisplay->trackZoomInfo.isScrollingX)
178- {
179- lfpDisplay->trackZoomInfo.isScrollingX = true;
180- lfpDisplay->trackZoomInfo.timescaleStartScale = timebase;
181- }
182-
183- float timescale = lfpDisplay->trackZoomInfo.timescaleStartScale;
184- float dTimescale=0;
185- int dragDeltaX = (e.getScreenPosition().getX() - e.getMouseDownScreenX()); // invert so drag up -> scale up
186-
187- // std::cout << dragDeltaX << std::endl;
188-
189- else
190- {
191- // TODO: (kelly) change this to scale appropriately for -dragDeltaX
192- if (timescale > 0.25)
193- dTimescale = 0.01 * dragDeltaX;
194- }
195-
196- if (timescale >= 1) // accelerate scrolling for large ranges
197- dTimescale *= 4;
198-
199- if (timescale >= 5)
200- dTimescale *= 4;
201-
202- if (timescale >= 10)
203- dTimescale *= 4;
204-
205- // round dTimescale to the nearest 0.005 sec
206- dTimescale = ((dTimescale + (0.005/2)) / 0.005) * 0.005;
207-
208- float newTimescale = timescale+dTimescale;
209-
210- if (newTimescale < 0.25) newTimescale = 0.250;
211- if (newTimescale > 20) newTimescale = 20;
212-
213- // don't bother updating if the new timebase is the same as the old (if clipped, for example)
214- if (timescale != newTimescale)
215- {
216- lfpDisplay->options->setTimebaseAndSelectionText(newTimescale);
217- setTimebase(canvasSplit->timebase);
218- }
219- }
220- }*/
221171}
222172
223173
0 commit comments