From a6d41cf98acf0948d24624891bae66741cd58ad0 Mon Sep 17 00:00:00 2001 From: Mikkel Kirkgaard Nielsen Date: Fri, 26 Jun 2020 09:39:45 +0200 Subject: [PATCH 1/2] Fix capitalisation of Background Settings pane * Align capitalisation of Background Settings pane with other panes (capital first letter) * Also fix reference to updated text in key:help.imagery.choosing (Key:help.imagery.offset already used capitals as in updated text) --- data/core.yaml | 4 ++-- dist/locales/en.json | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/data/core.yaml b/data/core.yaml index 8613416ad..785b83e36 100644 --- a/data/core.yaml +++ b/data/core.yaml @@ -655,7 +655,7 @@ en: suggestion: 'The "{label}" field is locked because there is a Wikidata tag. You can delete it or edit the tags in the "Tags" section.' background: title: Background - description: Background settings + description: Background Settings key: B backgrounds: Backgrounds none: None @@ -1428,7 +1428,7 @@ en: title: Background Imagery intro: "The background imagery that appears beneath the map data is an important resource for mapping. This imagery can be aerial photos collected from satellites, airplanes, and drones, or it can be scanned historical maps or other freely available source data." sources_h: "Imagery Sources" - choosing: "To see which imagery sources are available for editing, click the {layers} **Background settings** button on the side of the map." + choosing: "To see which imagery sources are available for editing, click the {layers} **Background Settings** button on the side of the map." sources: "By default, a [Bing Maps](https://www.bing.com/maps/) satellite layer is chosen as the background image. Depending on where you are editing, other imagery sources will be available. Some may be newer or have higher resolution, so it is always useful to check and see which layer is the best one to use as a mapping reference." offsets_h: "Adjusting Imagery Offset" offset: "Imagery is sometimes offset slightly from accurate map data. If you see a lot of roads or buildings shifted from the background imagery, it may be the imagery that's incorrect, so don't move them all to match the background. Instead, you can adjust the background so that it matches the existing data by expanding the \"Adjust Imagery Offset\" section at the bottom of the Background Settings pane." diff --git a/dist/locales/en.json b/dist/locales/en.json index aa37a8121..7bca0f5af 100644 --- a/dist/locales/en.json +++ b/dist/locales/en.json @@ -823,7 +823,7 @@ }, "background": { "title": "Background", - "description": "Background settings", + "description": "Background Settings", "key": "B", "backgrounds": "Backgrounds", "none": "None", @@ -1771,7 +1771,7 @@ "title": "Background Imagery", "intro": "The background imagery that appears beneath the map data is an important resource for mapping. This imagery can be aerial photos collected from satellites, airplanes, and drones, or it can be scanned historical maps or other freely available source data.", "sources_h": "Imagery Sources", - "choosing": "To see which imagery sources are available for editing, click the {layers} **Background settings** button on the side of the map.", + "choosing": "To see which imagery sources are available for editing, click the {layers} **Background Settings** button on the side of the map.", "sources": "By default, a [Bing Maps](https://www.bing.com/maps/) satellite layer is chosen as the background image. Depending on where you are editing, other imagery sources will be available. Some may be newer or have higher resolution, so it is always useful to check and see which layer is the best one to use as a mapping reference.", "offsets_h": "Adjusting Imagery Offset", "offset": "Imagery is sometimes offset slightly from accurate map data. If you see a lot of roads or buildings shifted from the background imagery, it may be the imagery that's incorrect, so don't move them all to match the background. Instead, you can adjust the background so that it matches the existing data by expanding the \"Adjust Imagery Offset\" section at the bottom of the Background Settings pane.", From 0f0f0637eedac0713a99a2325d018cfca15cc828 Mon Sep 17 00:00:00 2001 From: Quincy Morgan Date: Fri, 26 Jun 2020 17:18:35 -0400 Subject: [PATCH 2/2] Disable Move and Rotate menu buttons for touch interaction for now (re: #7599) --- dist/locales/en.json | 2 +- modules/operations/move.js | 2 ++ modules/operations/rotate.js | 2 ++ modules/ui/edit_menu.js | 15 ++++++++++----- 4 files changed, 15 insertions(+), 6 deletions(-) diff --git a/dist/locales/en.json b/dist/locales/en.json index e025410b6..0909d2005 100644 --- a/dist/locales/en.json +++ b/dist/locales/en.json @@ -13012,4 +13012,4 @@ } } } -} +} \ No newline at end of file diff --git a/modules/operations/move.js b/modules/operations/move.js index 800064cf6..f8e7a3ff6 100644 --- a/modules/operations/move.js +++ b/modules/operations/move.js @@ -76,5 +76,7 @@ export function operationMove(context, selectedIDs) { operation.title = t('operations.move.title'); operation.behavior = behaviorOperation(context).which(operation); + operation.mouseOnly = true; + return operation; } diff --git a/modules/operations/rotate.js b/modules/operations/rotate.js index 245945486..574acd99e 100644 --- a/modules/operations/rotate.js +++ b/modules/operations/rotate.js @@ -76,5 +76,7 @@ export function operationRotate(context, selectedIDs) { operation.title = t('operations.rotate.title'); operation.behavior = behaviorOperation(context).which(operation); + operation.mouseOnly = true; + return operation; } diff --git a/modules/ui/edit_menu.js b/modules/ui/edit_menu.js index b4d784879..c5a95f0cc 100644 --- a/modules/ui/edit_menu.js +++ b/modules/ui/edit_menu.js @@ -28,13 +28,18 @@ export function uiEditMenu(context) { var _menuSideMargin = 10; var editMenu = function(selection) { - if (!_operations.length) return; + + var isTouchMenu = _triggerType.includes('touch') || _triggerType.includes('pen'); + + var ops = _operations.filter(function(op) { + return !isTouchMenu || !op.mouseOnly; + }); + + if (!ops.length) return; var offset = [0, 0]; var viewport = context.surfaceRect(); - var isTouchMenu = _triggerType.includes('touch') || _triggerType.includes('pen'); - // Position the menu above the anchor for stylus and finger input // since the mapper's hand likely obscures the screen below the anchor var menuTop = isTouchMenu; @@ -48,7 +53,7 @@ export function uiEditMenu(context) { offset[0] = menuLeft ? -1 * (_menuSideMargin + menuWidth) : _menuSideMargin; - var menuHeight = _verticalPadding * 2 + _operations.length * buttonHeight; + var menuHeight = _verticalPadding * 2 + ops.length * buttonHeight; if (menuTop) { @@ -78,7 +83,7 @@ export function uiEditMenu(context) { .style('top', origin[1] + 'px'); var buttons = _menu.selectAll('.edit-menu-item') - .data(_operations); + .data(ops); // enter var buttonsEnter = buttons.enter()