Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
Clear All
new posts

    setShowResizeBar bug

    I have code using setShowResizeBar(true), but it doesn't work correctly when resizing panels. This can be seen in the video.


    Version v12.1p_2022-11-02/Pro Deployment (2022-11-02)
    Last edited by Hirn; 31 Mar 2023, 00:47.

    #2
    Hello Hirn, thanks for the video, but we can't debug a video, and there are thousands of different things that could be wrong in your application code that could cause this kind of problem.

    Please let us know if you have a way for us to reproduce this problem. The ideal thing is always a standalone, runnable test case.

    If you don't have time to try to make this reproducible, consider purchasing consulting hours, so we can do an "over the shoulder" debugging session, and find the problem for you (regardless of whether it's a framework issue or application issue).

    Comment


      #3
      Hello dear Isomorphic
      I have solved my problem and I think you will be interested in this solution...
      I had the code....
      Code:
      Timeline tasksLine = new Timeline();
      .....
      .....
      tasksLine.setShowResizeBar(true);
      I have added 2 event handlers

      Code:
      tasksLine.getTimelineView().addResizedHandler(new ResizedHandler() {
                  @Override
                  public void onResized(ResizedEvent event) {
                      int w0 = tasksLine.getWidth();
                      int w1 = tasksLine.getTimelineView().getWidth();
                      console.log("on resized view: " + w0 + " : " + w1);
                  }
              });
      tasksLine.addResizedHandler(new ResizedHandler() {
                  @Override
                  public void onResized(ResizedEvent event) {
                      int w0 = tasksLine.getWidth();
                      int w1 = tasksLine.getTimelineView().getWidth();
                      console.log("on resized : " + w0 + " : " + w1);
      
                  }
              });
      and I noticed that the first handler (tasksLine.getTimelineView().addResizedHandler) is sometimes not called. Then I added the following code to the second event handler and the error stopped showing itself.
      Code:
      tasksLine.addResizedHandler(new ResizedHandler() {
                  @Override
                  public void onResized(ResizedEvent event) {
                      int w0 = tasksLine.getWidth();
                      int w1 = tasksLine.getTimelineView().getWidth();
                      if(w0 != w1) {
                            tasksLine.getTimelineView().setWidth(w0);
                      }
                  }
              });
      Last edited by Hirn; 6 Apr 2023, 02:31.

      Comment

      Working...
      X