mirror of
https://github.com/FoggedLens/iD.git
synced 2026-03-20 18:13:30 +00:00
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.
30 lines
684 B
JavaScript
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;
|
|
};
|