-
Notifications
You must be signed in to change notification settings - Fork 24
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
Extend JS API with createNode functionality and refactor #7998
Conversation
…riziation; fix that centering node did not work when new node was not activated
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.
Thanks for the new API and refactoring. The code looks good to me and I was unable to come up with an suggestions :)
Testing also went well without any problems 🎉
In short: Good Stuff
thank you! fyi, I added additionalCoordinates as optional parameters. |
Commit a646bd5 looks alright But sadly during testing I found that centerin doesn't properly work in the current version of the dev branch (deployed friday evening). Here is what I tested as input // Creating nodes at specific coordinates with varying options
webknossos.DEV.api.tracing.createNode([1596, 1596, 1538], {center: false, activate: true, branchpoint: true, additionalAxes: []});
webknossos.DEV.api.tracing.createNode([1596, 1596, 1538], {center: true, activate: true, branchpoint: true});
// Ignoring a ResizeObserver loop warning
console.js:13 Ignoring ResizeObserver loop completed with undelivered notifications.
// More node creations at different coordinates with specified options
webknossos.DEV.api.tracing.createNode([3184, 3514, 1024], {center: false, activate: true, branchpoint: true});
webknossos.DEV.api.tracing.createNode([3184, 3114, 1024], {center: true, activate: true, branchpoint: true});
webknossos.DEV.api.tracing.createNode([3290, 3622, 1024], {center: true, activate: true, branchpoint: true});
webknossos.DEV.api.tracing.createNode([3295, 3622, 1024], {center: true, activate: true, branchpoint: false});
webknossos.DEV.api.tracing.createNode([3718, 3491, 1024], {center: true, activate: true, branchpoint: false});
webknossos.DEV.api.tracing.createNode([3718, 3591, 1024], {center: true, activate: true, branchpoint: false});
webknossos.DEV.api.tracing.createNode([3718, 3691, 1024], {center: false, activate: true, branchpoint: false});
webknossos.DEV.api.tracing.createNode([3718, 3720, 1024], {center: true, activate: true, branchpoint: false});
webknossos.DEV.api.tracing.createNode([3778, 3720, 1024], {center: true, activate: true, branchpoint: false});
webknossos.DEV.api.tracing.createNode([3778, 3620, 1024], {center: true, activate: true, branchpoint: false});
webknossos.DEV.api.tracing.createNode([3778, 3420, 1024], {center: true, activate: true, branchpoint: false});
webknossos.DEV.api.tracing.createNode([3878, 3420, 1024], {center: true, activate: true, branchpoint: false}); When changing the y coordinate, the centering only worked on the y axis. When changing the x axis no centering / flycam moment happened :/ Could you please have another look at this 🙏 ? |
* rename setWaypoint to handleCreateNode in arbitrary controller * rename setWaypoint to handleNodeCreation * refactor * implement createNode in api_latest; refactor to allow better parameteriziation; fix that centering node did not work when new node was not activated * refactor getActiveNode accessor to not use a Maybe * refactor getActiveTree accessor to not use a Maybe * update changelog * remove unused import * allow to pass additionalCoordinates when creating nodes via API * set skipCenteringAnimationInThirdDimension to false when using api
api.tracing.createNode(position, options)
to the front-end API.URL of deployed dev instance (used for testing):
Steps to test:
webknossos.DEV.api.tracing.createNode([1596, 1596, 1538], {center: false, activate: true, branchpoint: true})
Issues:
(Please delete unneeded items, merge only when none are left open)