Skip to content

Commit

Permalink
Walkthrough: Ignore new point if the user added it to the line edge
Browse files Browse the repository at this point in the history
  • Loading branch information
bhousel committed Sep 4, 2024
1 parent f26a9b8 commit d368cdc
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions modules/ui/intro/point.js
Original file line number Diff line number Diff line change
Expand Up @@ -99,9 +99,10 @@ export function uiIntroPoint(context, curtain) {
_onModeChange = () => resolve(searchPresetAsync);
_onStableChange = (difference) => {
const created = difference.created();
if (created.length === 1) {
_pointID = created[0].id;
}
if (created.length !== 1) return;
const entity = created[0];
if (entity.geometry(difference._head) !== 'point') return;
_pointID = created[0].id;
};

const textID = (context.lastPointerType === 'mouse') ? 'place_point' : 'place_point_touch';
Expand Down

0 comments on commit d368cdc

Please sign in to comment.