Skip to content

Add the ability to set Action tooltip text #1473

Open
@sheeley820

Description

@sheeley820

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions