@@ -1876,16 +1876,11 @@ void LfpTimescale::mouseDrag(const juce::MouseEvent &e)
18761876 {
18771877 if (e.mods .isCommandDown ()) // CTRL + drag -> change channel spacing
18781878 {
1879- // lfpDisplay->options-
18801879 // init state in our track zooming info struct
18811880 if (!lfpDisplay->trackZoomInfo .isScrollingX )
18821881 {
18831882 lfpDisplay->trackZoomInfo .isScrollingX = true ;
18841883 lfpDisplay->trackZoomInfo .timescaleStartScale = timebase;
1885- // lfpDisplay->trackZoomInfo.zoomPivotRatioY = (getY() + e.getMouseDownY())/(float)lfpDisplay->getHeight();
1886- // lfpDisplay->trackZoomInfo.zoomPivotRatioX = (getX() + e.getMouseDownX())/(float)lfpDisplay->getWidth();
1887- // lfpDisplay->trackZoomInfo.zoomPivotViewportOffset = getPosition() + e.getMouseDownPosition() - canvas->viewport->getViewPosition();
1888-
18891884 }
18901885
18911886 float timescale = lfpDisplay->trackZoomInfo .timescaleStartScale ;
@@ -1927,31 +1922,6 @@ void LfpTimescale::mouseDrag(const juce::MouseEvent &e)
19271922 lfpDisplay->options ->setTimebaseAndSelectionText (newTimescale);
19281923 setTimebase (canvas->timebase );
19291924 }
1930- //
1931- // // constrain the spread resizing to max and min values;
1932- // if (newHeight < lfpDisplay->trackZoomInfo.minZoomHeight)
1933- // {
1934- // newHeight = lfpDisplay->trackZoomInfo.minZoomHeight;
1935- // }
1936- // else if (newHeight > lfpDisplay->trackZoomInfo.maxZoomHeight)
1937- // {
1938- // newHeight = lfpDisplay->trackZoomInfo.maxZoomHeight;
1939- // }
1940- //
1941- // // set channel heights for all channel
1942- // lfpDisplay->setChannelHeight(newHeight);
1943- // lfpDisplay->setBounds(0,0,lfpDisplay->getWidth()-0, lfpDisplay->getChannelHeight()*lfpDisplay->drawableChannels.size()); // update height so that the scrollbar is correct
1944- //
1945- // canvas->viewport->setViewPositionProportionately(lfpDisplay->trackZoomInfo.zoomPivotRatioX, lfpDisplay->trackZoomInfo.zoomPivotRatioY);
1946- //
1947- // int newViewportY = lfpDisplay->trackZoomInfo.zoomPivotRatioY * lfpDisplay->getHeight() - lfpDisplay->trackZoomInfo.zoomPivotViewportOffset.getY();
1948- // if (newViewportY < 0) newViewportY = 0; // make sure we don't adjust beyond the edge of the actual view
1949- //
1950- // canvas->viewport->setViewPosition(lfpDisplay->trackZoomInfo.zoomPivotRatioX, newViewportY);
1951- //
1952- // setTimebase(newHeight); // update combobox
1953- //
1954- // canvas->fullredraw = true;//issue full redraw - scrolling without modifier doesnt require a full redraw
19551925 }
19561926 }
19571927}
0 commit comments