diff --git a/modules/modes/index.js b/modules/modes/index.js index 98cefa8c1..4b2737be1 100644 --- a/modules/modes/index.js +++ b/modules/modes/index.js @@ -6,6 +6,6 @@ export { modeDragNode } from './drag_node'; export { modeDrawArea } from './draw_area'; export { modeDrawLine } from './draw_line'; export { modeMove } from './move'; -export { modeRotateWay } from './rotate_way'; +export { modeRotate } from './rotate'; export { modeSave } from './save'; export { modeSelect } from './select'; diff --git a/modules/modes/move.js b/modules/modes/move.js index f174d14ae..7ec0c3542 100644 --- a/modules/modes/move.js +++ b/modules/modes/move.js @@ -11,8 +11,12 @@ import { } from './index'; import { + operationCircularize, + operationDelete, + operationOrthogonalize, operationReflectLong, - operationReflectShort + operationReflectShort, + operationRotate } from '../operations/index'; @@ -25,8 +29,12 @@ export function modeMove(context, entityIDs, baseGraph) { var keybinding = d3keybinding('move'), behaviors = [ behaviorEdit(context), + operationCircularize(entityIDs, context).behavior, + operationDelete(entityIDs, context).behavior, + operationOrthogonalize(entityIDs, context).behavior, operationReflectLong(entityIDs, context).behavior, operationReflectShort(entityIDs, context).behavior, + operationRotate(entityIDs, context).behavior ], annotation = entityIDs.length === 1 ? t('operations.move.annotation.' + context.geometry(entityIDs[0])) : diff --git a/modules/modes/rotate_way.js b/modules/modes/rotate.js similarity index 84% rename from modules/modes/rotate_way.js rename to modules/modes/rotate.js index 80cf0147c..c75b0be8c 100644 --- a/modules/modes/rotate_way.js +++ b/modules/modes/rotate.js @@ -7,13 +7,13 @@ import { actionNoop, actionRotateWay } from '../actions/index'; import { behaviorEdit } from '../behavior/index'; -export function modeRotateWay(context, wayId) { +export function modeRotate(context, wayId) { var mode = { - id: 'rotate-way', + id: 'rotate', button: 'browse' }; - var keybinding = d3keybinding('rotate-way'), + var keybinding = d3keybinding('rotate'), edit = behaviorEdit(context); @@ -33,11 +33,11 @@ export function modeRotateWay(context, wayId) { ); context.surface() - .on('mousemove.rotate-way', rotate) - .on('click.rotate-way', finish); + .on('mousemove.rotate', rotate) + .on('click.rotate', finish); context.history() - .on('undone.rotate-way', undone); + .on('undone.rotate', undone); keybinding .on('⎋', cancel) @@ -84,11 +84,11 @@ export function modeRotateWay(context, wayId) { context.uninstall(edit); context.surface() - .on('mousemove.rotate-way', null) - .on('click.rotate-way', null); + .on('mousemove.rotate', null) + .on('click.rotate', null); context.history() - .on('undone.rotate-way', null); + .on('undone.rotate', null); keybinding.off(); }; diff --git a/modules/operations/rotate.js b/modules/operations/rotate.js index 431e56df9..a24c0e66e 100644 --- a/modules/operations/rotate.js +++ b/modules/operations/rotate.js @@ -1,5 +1,5 @@ import { t } from '../util/locale'; -import { modeRotateWay } from '../modes/index'; +import { modeRotate } from '../modes/index'; import { behaviorOperation } from '../behavior/index'; @@ -11,7 +11,7 @@ export function operationRotate(selectedIDs, context) { var operation = function() { - context.enter(modeRotateWay(context, entityId)); + context.enter(modeRotate(context, entityId)); };