question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Timeline summary window box can shrink unexpectedly

See original GitHub issue

Prerequisites

Description

Dragging the Timeline’s summary window box toward the right edge of the summary window will cause it to jump around and in the process slowly shrink.

Steps to Reproduce

  1. Create a sphere graph
  2. Open the timeline view, making sure the summary window is visible
  3. Drag the box in the summary window to the right edge
  4. Keep trying to drag the box across and notice the timeline jump around and the box slowly shrink

Expected behaviour: Summary window box is not affected by forcing box beyond current summary window bounds Actual behaviour: Summary window box shrinks when trying to go past summary window bounds

Reproduces how often: 100%

Additional Information

The main effect of this bug is that it acts as an unexpected zoom in

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:7

github_iconTop GitHub Comments

1reaction
antares1470commented, May 14, 2020

I finally worked it out, going one step up the function chain from performDrag() you get the following function:

private void handleDragging(final MouseEvent t) {
     //Resize POV if necessary:
     if (isResizingLeft || isResizingRight) {
          resizePOV(t);
     } else { // If we aren't resizing we are dragging:
          // only drag on 'x' press:
          performDrag(t);
     }

     // Update the origin as we have had some movement:
     origin = t.getX();
}

The issue here ends up being the final line which assumes that there has been movement when actually movement only occurs if it meets the boolean conditions within the functions. Since origin was used to help determine how far we have moved, this incorrect assumption from the last line of the above function is what is causing the problem.

Moving this line to within the if conditions of the functions it calls seems to fix the issue

0reactions
antares1470commented, May 14, 2020

performDrag() in OverviewPanel is where it is determined whether or not dragging the summary box should be done. Whether it is done or not is determined by the following if condition in the function:

// Only perform drag if it is within the bounds of the histogram:
if (0.0 <= newX && (newX + rect.getWidth()) < histogram.getWidth()) {...

I don’t think there is an issue with the if condition as this is used elsewhere and makes sense. What I have discovered during debugging though is that histogram.getWidth() may be changing value unexpectedly. This function will run multiple times depending on the size of the drag but every time the if condition evaluates to true this results in the histogram width changing somehow and I’m unsure as to why or how. Someone with more knowledge in this may be able to explain more as to what is actually being measured for the histogram width but my understanding is that it shouldn’t be changed by this.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Randomly shrinking timeline window - Avid Community
Since about MC 5.0 I've noticed my timeline window will randomly make itself extremely small and relocate to the upperleft corner of my ......
Read more >
Pages randomly appear completely "blank/white" until I resize ...
When I clicked new issue the page just turned white until I resized the chrome window. What is the expected behavior? ... What...
Read more >
Optimize Cumulative Layout Shift - web.dev
Cumulative Layout Shift (CLS) is a metric that quantifies how often users experience sudden shifts in page content.
Read more >
Arrange the Final Cut Pro main window - Apple Support
The main areas of the Final Cut Pro window include the browser, viewer, timeline, sidebar, and inspector. You can show, hide, and resize...
Read more >
Create timeline animations in Adobe Photoshop
Learn how to create timeline animations in Adobe Photoshop. ... You can also preview the animation in the Save For Web dialog box....
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found