You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
// `FakeKeyPlus` is a nonfunctional key mapping that must be accompanied by its real `Equal` key counterpart. This is used only to set the canonical key label so it shows "+" instead of "=" in the UI.
Copy file name to clipboardExpand all lines: editor/src/messages/input_mapper/utility_types/input_keyboard.rs
+17-6Lines changed: 17 additions & 6 deletions
Original file line number
Diff line number
Diff line change
@@ -61,7 +61,7 @@ pub enum Key {
61
61
Digit7,
62
62
Digit8,
63
63
Digit9,
64
-
//
64
+
65
65
KeyA,
66
66
KeyB,
67
67
KeyC,
@@ -88,7 +88,7 @@ pub enum Key {
88
88
KeyX,
89
89
KeyY,
90
90
KeyZ,
91
-
//
91
+
92
92
Backquote,
93
93
Backslash,
94
94
BracketLeft,
@@ -197,6 +197,8 @@ pub enum Key {
197
197
Unidentified,
198
198
199
199
// Other keys that aren't part of the W3C spec
200
+
//
201
+
/// "Cmd" on Mac (not present on other platforms)
200
202
Command,
201
203
/// "Ctrl" on Windows/Linux, "Cmd" on Mac
202
204
Accel,
@@ -206,8 +208,14 @@ pub enum Key {
206
208
MouseBack,
207
209
MouseForward,
208
210
209
-
// This has to be the last element in the enum
210
-
NumKeys,
211
+
// Fake keys for displaying special labels in the UI
212
+
//
213
+
/// Not a physical key that can be pressed. May be used so that an actual shortcut bound to `Equal` can separately map this fake "key" as an additional binding to display the "+" shortcut label in the UI.
214
+
FakeKeyPlus,
215
+
/// Not a physical key that can be pressed. May be used so that an actual shortcut bound to all ten number keys (0, ..., 9) can separately map this fake "key" as an additional binding to display the "0–9" shortcut label in the UI.
216
+
FakeKeyNumbers,
217
+
218
+
_KeysVariantCount,// This has to be the last element in the enum
211
219
}
212
220
213
221
impl fmt::DisplayforKey{
@@ -293,7 +301,10 @@ impl fmt::Display for Key {
293
301
Self::MouseMiddle => "MMB",
294
302
Self::MouseBack => "Mouse Back",
295
303
Self::MouseForward => "Mouse Fwd",
296
-
Self::NumKeys => "0–9",
304
+
305
+
// Fake keys for displaying special labels in the UI
Copy file name to clipboardExpand all lines: node-graph/gcore/src/vector/vector_nodes.rs
+18-18Lines changed: 18 additions & 18 deletions
Original file line number
Diff line number
Diff line change
@@ -1141,11 +1141,11 @@ async fn sample_polyline(
1141
1141
.collect()
1142
1142
}
1143
1143
1144
-
/// Cuts a path at a given progress from 0 to 1 along the path, creating two new subpaths from the original one (if the path is initially open) or one open subpath (if the path is initially closed).
1144
+
/// Cuts a path at a given progression from 0 to 1 along the path, creating two new subpaths from the original one (if the path is initially open) or one open subpath (if the path is initially closed).
1145
1145
///
1146
-
/// If multiple subpaths make up the path, the whole number part of the progress value selects the subpath and the decimal part determines the position along it.
1146
+
/// If multiple subpaths make up the path, the whole number part of the progression value selects the subpath and the decimal part determines the position along it.
/// Determines the position of a point on the path, given by its progress from 0 to 1 along the path.
1244
+
/// Determines the position of a point on the path, given by its progression from 0 to 1 along the path.
1245
1245
///
1246
-
/// If multiple subpaths make up the path, the whole number part of the progress value selects the subpath and the decimal part determines the position along it.
1246
+
/// If multiple subpaths make up the path, the whole number part of the progression value selects the subpath and the decimal part determines the position along it.
1247
1247
#[node_macro::node(name("Position on Path"), category("Vector: Measure"), path(graphene_core::vector))]
1248
1248
asyncfnposition_on_path(
1249
1249
_:implCtx,
1250
1250
/// The path to traverse.
1251
1251
content:Table<Vector>,
1252
1252
/// The factor from the start to the end of the path, 0–1 for one subpath, 1–2 for a second subpath, and so on.
1253
-
progress:Fraction,
1253
+
progression:Fraction,
1254
1254
/// Swap the direction of the path.
1255
1255
reverse:bool,
1256
1256
/// Traverse the path using each segment's Bézier curve parameterization instead of the Euclidean distance. Faster to compute but doesn't respect actual distances.
/// Determines the angle of the tangent at a point on the path, given by its progress from 0 to 1 along the path.
1283
+
/// Determines the angle of the tangent at a point on the path, given by its progression from 0 to 1 along the path.
1284
1284
///
1285
-
/// If multiple subpaths make up the path, the whole number part of the progress value selects the subpath and the decimal part determines the position along it.
1285
+
/// If multiple subpaths make up the path, the whole number part of the progression value selects the subpath and the decimal part determines the position along it.
1286
1286
#[node_macro::node(name("Tangent on Path"), category("Vector: Measure"), path(graphene_core::vector))]
1287
1287
asyncfntangent_on_path(
1288
1288
_:implCtx,
1289
1289
/// The path to traverse.
1290
1290
content:Table<Vector>,
1291
1291
/// The factor from the start to the end of the path, 0–1 for one subpath, 1–2 for a second subpath, and so on.
1292
-
progress:Fraction,
1292
+
progression:Fraction,
1293
1293
/// Swap the direction of the path.
1294
1294
reverse:bool,
1295
1295
/// Traverse the path using each segment's Bézier curve parameterization instead of the Euclidean distance. Faster to compute but doesn't respect actual distances.
@@ -1307,12 +1307,12 @@ async fn tangent_on_path(
1307
1307
})
1308
1308
.collect::<Vec<_>>();
1309
1309
let bezpath_count = bezpaths.len()asf64;
1310
-
letprogress = progress.clamp(0., bezpath_count);
1311
-
letprogress = if reverse { bezpath_count - progress}else{progress};
1312
-
let index = ifprogress >= bezpath_count {(bezpath_count - 1.)asusize}else{progressasusize};
0 commit comments