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

Add the ability to set Action tooltip text #1473

Open
sheeley820 opened this issue Mar 29, 2024 · 0 comments
Open

Add the ability to set Action tooltip text #1473

sheeley820 opened this issue Mar 29, 2024 · 0 comments

Comments

@sheeley820
Copy link

sheeley820 commented Mar 29, 2024

Could we add the ability to customize the tooltip on Actions? Should be a simple change. Basically just reading a title prop from the actions.

Action:

finish: {
  text: getTranslation('actions.finish'),
  onClick(e) {
    this._map.pm.Draw[button.jsClass]._finishShape(e);
  },
  title: "Foo"
}

Then when creating the action elements:

if (action.title)
        actionNode.setAttribute('title', action.title);

This would primarily be for implementing custom actions, but I think the getTranslation('actions.finish') text could be used for the built in actions, eliminating any need for new translation work.

Thanks for all the good work. Your plugin rocks.

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

No branches or pull requests

1 participant