Files
iD/js/id/modes/browse.js
John Firebaugh 9f5ba8342d Convert DragNode to a mode
This makes the CSS more consistent and makes fixing #953
easier. Also, dragging now clears the selection and closes
any operations menu, which is good.

There's still a minor Chrome bug: it doesn't refresh the
cursor when the .behavior-hover class is removed.
2013-03-11 15:45:27 -07:00

30 lines
684 B
JavaScript

iD.modes.Browse = function(context) {
var mode = {
button: 'browse',
id: 'browse',
title: t('modes.browse.title'),
description: t('modes.browse.description'),
key: '1'
};
var behaviors = [
iD.behavior.Hover(),
iD.behavior.Select(context),
iD.behavior.Lasso(context),
iD.modes.DragNode(context).behavior];
mode.enter = function() {
behaviors.forEach(function(behavior) {
context.install(behavior);
});
};
mode.exit = function() {
behaviors.forEach(function(behavior) {
context.uninstall(behavior);
});
};
return mode;
};