diff --git a/modules/operations/reflect.js b/modules/operations/reflect.js index 413d8226e..9a3ffad97 100644 --- a/modules/operations/reflect.js +++ b/modules/operations/reflect.js @@ -31,8 +31,13 @@ export function operationReflect(selectedIDs, context, axis) { operation.available = function() { - return selectedIDs.length > 1 || - context.entity(selectedIDs[0]).type !== 'node'; + return _.some(selectedIDs, hasArea); + + function hasArea(id) { + var entity = context.entity(id); + return (entity.type === 'way' && entity.isClosed()) || + (entity.type ==='relation' && entity.isMultipolygon()); + } }; diff --git a/modules/operations/rotate.js b/modules/operations/rotate.js index 78e42a9a8..aa7359f09 100644 --- a/modules/operations/rotate.js +++ b/modules/operations/rotate.js @@ -18,8 +18,13 @@ export function operationRotate(selectedIDs, context) { operation.available = function() { - return selectedIDs.length > 1 || - context.entity(selectedIDs[0]).type !== 'node'; + return _.some(selectedIDs, hasArea); + + function hasArea(id) { + var entity = context.entity(id); + return (entity.type === 'way' && entity.isClosed()) || + (entity.type ==='relation' && entity.isMultipolygon()); + } };