-
Notifications
You must be signed in to change notification settings - Fork 174
Fix for issues #451 & #454 #460
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Pull Request Test Coverage Report for Build 1239
💛 - Coveralls |
|
Fix for Issue #454 also: visualizer.js script now calculates the height of the list before using it to create the Kinetic Stage. |
|
Can you yarn format and push again please! @lumos309 |
|
@jiachen247 done! |
873b6b1 to
a10544a
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Generally looks okay but for some reasons the CI is still breaking please make sure you yarn format and ensure all test cases are passing before pushing. Are you pushing with the no-verify flag?
|
@jiachen247 I made the changes you suggested and also edited the commenting style in the .scss file, and now it passes! |
|
Hmm, trying to build and run, but am getting this. Any idea what's happening? TypeError: Cannot read property 'init' of undefined
|
35c3bd7 to
a10544a
Compare
2111c1f to
a10544a
Compare
| */ | ||
| function draw(xs) { | ||
| stage = new Kinetic.Stage({ | ||
| width: 1000, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not really sure how to go about finding the width. It seems like it would be tricky for lists that contains pointers to other lists...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think you can find the width of the required window by visiting the lowest node on the right fringe of the tree. You start at the root and go right at each step until you reach a leaf. I think with the current tree drawing algorithm, you will find that that leaf is the node with the rightmost position.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The problem is drawings like these, where there are both left and right nodes to account for, as well as multiple references to the same object. Nonetheless I think I may have a solution, which I'm working on now.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok, I've sorted it out! Both width and height are now calculated dynamically.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The problem is drawings like these, where there are both left and right nodes to account for, as well as multiple references to the same object. Nonetheless I think I may have a solution, which I'm working on now.
Wow, that's a weird example. Great that you worked it out.
|
For this program I get: Note that we have replaced the function is_empty_list with is_null. |
|
Oh right, I'd forgotten about that. Updated. |
martin-henz
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Working fine.
|
Good job @lumos309!! |
|
Thanks @jiachen247 ! I can delete the branch now right? |
|
Please don't delete the branch. I have merged it already with the master branch. So you can just checkout the master branch, and your changes should be in there. We keep merged branches in the repo, for future reference. |

Issue #451: List viewport not resizing in y-direction.
Issue was caused by a previous bug fix that enabled overflow in the list visualiser panel, but limited the maximum height of the panel itself. Since overflow and scrolling now works properly even without the bug fix (tested on Chrome and Edge), it can be commented out to fix this current issue.