Skip to content

Commit bcba72f

Browse files
committed
change lasoo to lasso
1 parent f4959b9 commit bcba72f

File tree

5 files changed

+20
-20
lines changed

5 files changed

+20
-20
lines changed

editor/src/messages/frontend/frontend_message.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ use super::utility_types::{DocumentDetails, MouseCursorIcon, OpenDocument};
22
use crate::messages::app_window::app_window_message_handler::AppWindowPlatform;
33
use crate::messages::layout::utility_types::widget_prelude::*;
44
use crate::messages::portfolio::document::node_graph::utility_types::{
5-
BoxSelection, ContextMenuInformation, FrontendClickTargets, FrontendGraphInput, FrontendGraphOutput, FrontendNode, FrontendNodeType, LasooSelection, Transform,
5+
BoxSelection, ContextMenuInformation, FrontendClickTargets, FrontendGraphInput, FrontendGraphOutput, FrontendNode, FrontendNodeType, LassoSelection, Transform,
66
};
77
use crate::messages::portfolio::document::utility_types::nodes::{JsRawBuffer, LayerPanelEntry, RawBuffer};
88
use crate::messages::portfolio::document::utility_types::wires::{WirePath, WirePathUpdate};
@@ -152,9 +152,9 @@ pub enum FrontendMessage {
152152
#[serde(rename = "box")]
153153
box_selection: Option<BoxSelection>,
154154
},
155-
UpdateLasoo {
156-
#[serde(rename = "lasoo")]
157-
lasoo_selection: Option<LasooSelection>,
155+
UpdateLasso {
156+
#[serde(rename = "lasso")]
157+
lasso_selection: Option<LassoSelection>,
158158
},
159159
UpdateContextMenuInformation {
160160
#[serde(rename = "contextMenuInformation")]

editor/src/messages/portfolio/document/node_graph/utility_types.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -161,18 +161,18 @@ pub struct BoxSelection {
161161
}
162162

163163
#[derive(Clone, Debug, PartialEq, serde::Serialize, serde::Deserialize, specta::Type)]
164-
pub struct LasooSelection {
164+
pub struct LassoSelection {
165165
pub points: String,
166166
}
167167

168-
impl FromIterator<glam::DVec2> for LasooSelection {
168+
impl FromIterator<glam::DVec2> for LassoSelection {
169169
fn from_iter<I: IntoIterator<Item = glam::DVec2>>(iter: I) -> Self {
170170
let mut points = String::new();
171171
for coordinate in iter {
172172
use std::fmt::Write;
173173
write!(&mut points, "{},{} ", coordinate.x, coordinate.y).unwrap();
174174
}
175-
LasooSelection { points }
175+
LassoSelection { points }
176176
}
177177
}
178178

frontend/src/components/views/Graph.svelte

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -787,9 +787,9 @@
787787
></div>
788788
{/if}
789789

790-
{#if $nodeGraph.lasoo}
791-
<svg class="lasoo-selection" style:clip-path={`polygon(${$nodeGraph.lasoo.points})`}>
792-
<polygon points={$nodeGraph.lasoo.points} stroke="#00a8ff" stroke-width="1px" fill="rgba(0, 168, 255, 0.05)" />
790+
{#if $nodeGraph.lasso}
791+
<svg class="lasso-selection" style:clip-path={`polygon(${$nodeGraph.lasso.points})`}>
792+
<polygon points={$nodeGraph.lasso.points} stroke="#00a8ff" stroke-width="1px" fill="rgba(0, 168, 255, 0.05)" />
793793
</svg>
794794
{/if}
795795

@@ -1382,7 +1382,7 @@
13821382
border: 1px solid #00a8ff;
13831383
}
13841384
1385-
.lasoo-selection {
1385+
.lasso-selection {
13861386
position: absolute;
13871387
pointer-events: none;
13881388
z-index: 2;

frontend/src/messages.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,8 @@ export class UpdateBox extends JsMessage {
2929
readonly box!: Box | undefined;
3030
}
3131

32-
export class UpdateLasoo extends JsMessage {
33-
readonly lasoo!: Lasoo | undefined;
32+
export class UpdateLasso extends JsMessage {
33+
readonly lasso!: Lasso | undefined;
3434
}
3535

3636
export class UpdateClickTargets extends JsMessage {
@@ -173,7 +173,7 @@ export class Box {
173173
readonly endY!: number;
174174
}
175175

176-
export class Lasoo {
176+
export class Lasso {
177177
readonly points!: string;
178178
}
179179

@@ -1677,7 +1677,7 @@ export const messageMakers: Record<string, MessageMaker> = {
16771677
TriggerVisitLink,
16781678
UpdateActiveDocument,
16791679
UpdateBox,
1680-
UpdateLasoo,
1680+
UpdateLasso,
16811681
UpdateClickTargets,
16821682
UpdateContextMenuInformation,
16831683
UpdateDialogButtons,

frontend/src/state-providers/node-graph.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import { writable } from "svelte/store";
33
import { type Editor } from "@graphite/editor";
44
import {
55
type Box,
6-
type Lasoo,
6+
type Lasso,
77
type FrontendClickTargets,
88
type ContextMenuInformation,
99
type FrontendNode,
@@ -12,7 +12,7 @@ import {
1212
ClearAllNodeGraphWires,
1313
SendUIMetadata,
1414
UpdateBox,
15-
UpdateLasoo,
15+
UpdateLasso,
1616
UpdateClickTargets,
1717
UpdateContextMenuInformation,
1818
UpdateInSelectedNetwork,
@@ -32,7 +32,7 @@ import {
3232
export function createNodeGraphState(editor: Editor) {
3333
const { subscribe, update } = writable({
3434
box: undefined as Box | undefined,
35-
lasoo: undefined as Lasoo | undefined,
35+
lasso: undefined as Lasso | undefined,
3636
clickTargets: undefined as FrontendClickTargets | undefined,
3737
contextMenuInformation: undefined as ContextMenuInformation | undefined,
3838
layerWidths: new Map<bigint, number>(),
@@ -68,9 +68,9 @@ export function createNodeGraphState(editor: Editor) {
6868
return state;
6969
});
7070
});
71-
editor.subscriptions.subscribeJsMessage(UpdateLasoo, (updateLasoo) => {
71+
editor.subscriptions.subscribeJsMessage(UpdateLasso, (updateLasso) => {
7272
update((state) => {
73-
state.lasoo = updateLasoo.lasoo;
73+
state.lasso = updateLasso.lasso;
7474
return state;
7575
});
7676
});

0 commit comments

Comments
 (0)