mirror of
https://github.com/FoggedLens/iD.git
synced 2026-05-14 21:28:11 +02:00
Call annotation as a function instead of a property
This is because, like tooltip(), it doesn't always make sense to call it, and it should never get called if the operation is not available.
This commit is contained in:
@@ -15,9 +15,9 @@ export function behaviorOperation(context) {
|
||||
d3.event.preventDefault();
|
||||
var disabled = which.disabled();
|
||||
if (disabled) {
|
||||
uiFlash(2000, 500).text(which.tooltip);
|
||||
uiFlash(2500, 500).text(which.tooltip);
|
||||
} else {
|
||||
var annotation = which.annotation || which.title;
|
||||
var annotation = which.annotation() || which.title;
|
||||
uiFlash(1500, 250).text(annotation);
|
||||
which();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user