mirror of
https://github.com/FoggedLens/iD.git
synced 2026-05-30 03:39:36 +02:00
Rename permitted -> enabled and add to more actions
This commit is contained in:
@@ -10,7 +10,7 @@
|
||||
//
|
||||
iD.actions.UnjoinNode = function(nodeId, newNodeId) {
|
||||
var action = function(graph) {
|
||||
if (!action.permitted(graph))
|
||||
if (!action.enabled(graph))
|
||||
return graph;
|
||||
|
||||
var node = graph.entity(nodeId);
|
||||
@@ -29,7 +29,7 @@ iD.actions.UnjoinNode = function(nodeId, newNodeId) {
|
||||
return graph;
|
||||
};
|
||||
|
||||
action.permitted = function(graph) {
|
||||
action.enabled = function(graph) {
|
||||
return graph.parentWays(graph.entity(nodeId)).length >= 2;
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user