mirror of
https://github.com/FoggedLens/iD.git
synced 2026-02-13 01:02:58 +00:00
Place -> Point
We decided to use geometric terms for the modes.
This commit is contained in:
@@ -126,7 +126,7 @@ a.selected {
|
||||
cursor:url(../img/cursor-draw.png) 9 9, auto;
|
||||
}
|
||||
|
||||
#map.add-place:hover {
|
||||
#map.add-point:hover {
|
||||
cursor:url(../img/cursor-draw-marker.png) 18 18, auto;
|
||||
}
|
||||
|
||||
@@ -295,7 +295,7 @@ button.action .label {
|
||||
/* Definitions for every icon */
|
||||
|
||||
.icon.browse { background-position: 0px 0px;}
|
||||
.icon.add-place { background-position: -20px 0px;}
|
||||
.icon.add-point { background-position: -20px 0px;}
|
||||
.icon.add-line { background-position: -40px 0px;}
|
||||
.icon.add-area { background-position: -60px 0px;}
|
||||
.icon.undo { background-position: -80px 0px;}
|
||||
@@ -312,7 +312,7 @@ button.action .label {
|
||||
.icon.layers { background-position: -300px 0px;}
|
||||
|
||||
/*.active .icon.browse { background-position: 0px -20px;}
|
||||
.active .icon.add-place { background-position: -20px -20px;}
|
||||
.active .icon.add-point { background-position: -20px -20px;}
|
||||
.active .icon.add-line { background-position: -40px -20px;}
|
||||
.active .icon.add-area { background-position: -60px -20px;}
|
||||
.active .icon.undo { background-position: -80px -20px;}
|
||||
@@ -329,7 +329,7 @@ button.action .label {
|
||||
.active .icon.layers { background-position: -300px -20px;}*/
|
||||
|
||||
button[disabled] .icon.browse { background-position: 0px -40px;}
|
||||
button[disabled] .icon.add-place { background-position: -20px -40px;}
|
||||
button[disabled] .icon.add-point { background-position: -20px -40px;}
|
||||
button[disabled] .icon.add-line { background-position: -40px -40px;}
|
||||
button[disabled] .icon.add-area { background-position: -60px -40px;}
|
||||
button[disabled] .icon.undo { background-position: -80px -40px;}
|
||||
|
||||
@@ -64,7 +64,7 @@
|
||||
<script src='js/id/modes.js'></script>
|
||||
<script src='js/id/modes/drag_features.js'></script>
|
||||
<script src='js/id/modes/add_area.js'></script>
|
||||
<script src='js/id/modes/add_place.js'></script>
|
||||
<script src='js/id/modes/add_point.js'></script>
|
||||
<script src='js/id/modes/add_line.js'></script>
|
||||
<script src='js/id/modes/browse.js'></script>
|
||||
<script src='js/id/modes/draw_area.js'></script>
|
||||
|
||||
@@ -29,7 +29,7 @@ window.iD = function(container) {
|
||||
.attr('class', 'buttons-joined');
|
||||
|
||||
var buttons = buttons_joined.selectAll('button.add-button')
|
||||
.data([iD.modes.Browse(), iD.modes.AddPlace(), iD.modes.AddLine(), iD.modes.AddArea()])
|
||||
.data([iD.modes.Browse(), iD.modes.AddPoint(), iD.modes.AddLine(), iD.modes.AddArea()])
|
||||
.enter().append('button')
|
||||
.attr('class', function (mode) { return mode.title + ' add-button'; })
|
||||
.attr('data-original-title', function (mode) { return mode.description; })
|
||||
@@ -198,7 +198,7 @@ window.iD = function(container) {
|
||||
controller.enter(iD.modes.AddArea());
|
||||
})
|
||||
.on('p', function(evt, mods) {
|
||||
controller.enter(iD.modes.AddPlace());
|
||||
controller.enter(iD.modes.AddPoint());
|
||||
})
|
||||
.on('r', function(evt, mods) {
|
||||
controller.enter(iD.modes.AddLine());
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
iD.modes.AddPlace = function() {
|
||||
iD.modes.AddPoint = function() {
|
||||
var mode = {
|
||||
id: 'add-place',
|
||||
title: 'Place',
|
||||
id: 'add-point',
|
||||
title: 'Point',
|
||||
description: 'Restaurants, monuments, and postal boxes are points.'
|
||||
};
|
||||
|
||||
@@ -12,27 +12,27 @@ iD.modes.AddPlace = function() {
|
||||
history = mode.history,
|
||||
controller = mode.controller;
|
||||
|
||||
map.hint('Click on the map to add a place.');
|
||||
map.hint('Click on the map to add a point.');
|
||||
|
||||
map.surface.on('click.addplace', function() {
|
||||
map.surface.on('click.addpoint', function() {
|
||||
var node = iD.Node({loc: map.mouseCoordinates(), _poi: true});
|
||||
|
||||
history.perform(
|
||||
iD.actions.AddNode(node),
|
||||
'added a place');
|
||||
'added a point');
|
||||
|
||||
controller.enter(iD.modes.Select(node));
|
||||
});
|
||||
|
||||
map.keybinding().on('⎋.addplace', function() {
|
||||
map.keybinding().on('⎋.addpoint', function() {
|
||||
controller.exit();
|
||||
});
|
||||
};
|
||||
|
||||
mode.exit = function() {
|
||||
mode.map.hint(false);
|
||||
mode.map.surface.on('click.addplace', null);
|
||||
mode.map.keybinding().on('⎋.addplace', null);
|
||||
mode.map.surface.on('click.addpoint', null);
|
||||
mode.map.keybinding().on('⎋.addpoint', null);
|
||||
d3.select('#map').attr('class', null);
|
||||
};
|
||||
|
||||
@@ -63,7 +63,7 @@
|
||||
|
||||
<script src='../js/id/modes.js'></script>
|
||||
<script src='../js/id/modes/add_area.js'></script>
|
||||
<script src='../js/id/modes/add_place.js'></script>
|
||||
<script src='../js/id/modes/add_point.js'></script>
|
||||
<script src='../js/id/modes/add_line.js'></script>
|
||||
<script src='../js/id/modes/browse.js'></script>
|
||||
<script src='../js/id/modes/drag_features.js'></script>
|
||||
@@ -110,7 +110,7 @@
|
||||
<script src="spec/graph/history.js"></script>
|
||||
<script src="spec/graph/way.js"></script>
|
||||
|
||||
<script src="spec/modes/add_place.js"></script>
|
||||
<script src="spec/modes/add_point.js"></script>
|
||||
|
||||
<script src="spec/renderer/background.js"></script>
|
||||
<script src="spec/renderer/hash.js"></script>
|
||||
|
||||
@@ -46,7 +46,7 @@
|
||||
<script src="spec/graph/history.js"></script>
|
||||
<script src="spec/graph/way.js"></script>
|
||||
|
||||
<script src="spec/modes/add_place.js"></script>
|
||||
<script src="spec/modes/add_point.js"></script>
|
||||
|
||||
<script src="spec/renderer/background.js"></script>
|
||||
<script src="spec/renderer/hash.js"></script>
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
describe("iD.modes.AddPlace", function () {
|
||||
describe("iD.modes.AddPoint", function () {
|
||||
var container, map, history, controller, mode;
|
||||
|
||||
beforeEach(function () {
|
||||
@@ -9,7 +9,7 @@ describe("iD.modes.AddPlace", function () {
|
||||
|
||||
container.call(map);
|
||||
|
||||
mode = iD.modes.AddPlace();
|
||||
mode = iD.modes.AddPoint();
|
||||
controller.enter(mode);
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user