Skip to content
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

feat(tools): custom keybinds and layer independent tool keybinds #464

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

chrisj
Copy link
Contributor

@chrisj chrisj commented May 12, 2023


🔥 Preview 🔥: https://neuroglancer--pr464-jqtohdii.web.app
Updated at Thu Feb 22 2024 17:27:49 GMT+0000 (Coordinated Universal Time) for commit bc4f166
Expires: Invalid Date


declare var NEUROGLANCER_DEFAULT_STATE_FRAGMENT: string|undefined;

type CustomBinding = {
layer: string, tool: string, protocol?: string,
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

tool should be a json object, not just a string, as some tools support options

});
}

const nameToLayer: {[key: string]: UserLayerConstructor|undefined} = {};
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This already exists as layerTypes in neuroglancer/layer.ts

@jakobtroidl
Copy link

@jbms, is it possible to get this merged? We need this feature in ng for proofreading H01 with CAVE.

@chrisj
Copy link
Contributor Author

chrisj commented Feb 22, 2024

Updated this pull request with the ability to unbind existing keybinds with a false value and also with the latest code formatting.

Side note: I am curious if you have vs code (if that is what you use) config set up to automatically do correct imports. My current issue is that I have to manually add the # before src, fix import order, and split out type only imports.

Example config

{
  "keym": {
    "layer": "segmentation",
    "tool": "grapheneMergeSegments",
    "provider": "graphene"
  },
  "keyc": {
    "layer": "segmentation",
    "tool": "grapheneMulticutSegments",
    "provider": "graphene"
  },
  "keyf": {
    "layer": "segmentation",
    "tool": "grapheneFindPath",
    "provider": "graphene"
  },
  "keyx": false
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants