From a75eace135163643cd7aa2f7af668dc681abb7f6 Mon Sep 17 00:00:00 2001 From: Mattia Pezzotti <45800507+mattiapezzotti@users.noreply.github.com> Date: Thu, 7 Mar 2024 23:38:51 +0100 Subject: [PATCH] Fix for Point Tutorial (#10129) --- data/core.yaml | 1 + modules/ui/intro/point.js | 15 ++++++++++++++- 2 files changed, 15 insertions(+), 1 deletion(-) diff --git a/data/core.yaml b/data/core.yaml index 3b56fd894..5a13caeb3 100644 --- a/data/core.yaml +++ b/data/core.yaml @@ -2210,6 +2210,7 @@ en: add_point: "They mark a specific location, and describe what's there. **Press the {point_icon} {point} button to add a new point.**" place_point: "To place the new point on the map, position your mouse cursor where the point should go, then {leftclick} left-click or press `{space}`. **Move the mouse pointer over this building, then left-click or press `{space}`.**" place_point_touch: "To place the new point on the map, {tap_icon} tap the location where it should go. **Tap the center of this building.**" + place_point_error: "The point should be placed inside the building area, not on its outline. Let's try again." search_cafe: "There are many different features that can be represented by points. The point you just added is a cafe. **Search for '{preset}'.**" choose_cafe: "**Choose {preset} from the list.**" feature_editor: "The point is now marked as a cafe. Using the feature editor, we can add more information about the cafe." diff --git a/modules/ui/intro/point.js b/modules/ui/intro/point.js index dd8918c1b..0e40c9403 100644 --- a/modules/ui/intro/point.js +++ b/modules/ui/intro/point.js @@ -87,7 +87,20 @@ export function uiIntroPoint(context, reveal) { context.on('enter.intro', function(mode) { if (mode.id !== 'select') return chapter.restart(); _pointID = context.mode().selectedIDs()[0]; - continueTo(searchPreset); + + if (context.graph().geometry(_pointID) === 'vertex'){ + + //disallow all + context.map().on('move.intro drawn.intro', null); + context.on('enter.intro', null); + + reveal(pointBox, helpHtml('intro.points.place_point_error'), { + buttonText: t.html('intro.ok'), + buttonCallback: function() { return chapter.restart(); } + }); + } else { + continueTo(searchPreset); + } }); function continueTo(nextStep) {