Skip to content

Commit 451f762

Browse files
committed
change lasoo to lasso
1 parent 9907a38 commit 451f762

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, NodeGraphErrorDiagnostic, Transform,
5+
BoxSelection, ContextMenuInformation, FrontendClickTargets, FrontendGraphInput, FrontendGraphOutput, FrontendNode, FrontendNodeType, LassoSelection, NodeGraphErrorDiagnostic, 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
@@ -153,18 +153,18 @@ pub struct BoxSelection {
153153
}
154154

155155
#[derive(Clone, Debug, PartialEq, serde::Serialize, serde::Deserialize, specta::Type)]
156-
pub struct LasooSelection {
156+
pub struct LassoSelection {
157157
pub points: String,
158158
}
159159

160-
impl FromIterator<glam::DVec2> for LasooSelection {
160+
impl FromIterator<glam::DVec2> for LassoSelection {
161161
fn from_iter<I: IntoIterator<Item = glam::DVec2>>(iter: I) -> Self {
162162
let mut points = String::new();
163163
for coordinate in iter {
164164
use std::fmt::Write;
165165
write!(&mut points, "{},{} ", coordinate.x, coordinate.y).unwrap();
166166
}
167-
LasooSelection { points }
167+
LassoSelection { points }
168168
}
169169
}
170170

frontend/src/components/views/Graph.svelte

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -777,9 +777,9 @@
777777
></div>
778778
{/if}
779779

780-
{#if $nodeGraph.lasoo}
781-
<svg class="lasoo-selection" style:clip-path={`polygon(${$nodeGraph.lasoo.points})`}>
782-
<polygon points={$nodeGraph.lasoo.points} stroke="#00a8ff" stroke-width="1px" fill="rgba(0, 168, 255, 0.05)" />
780+
{#if $nodeGraph.lasso}
781+
<svg class="lasso-selection" style:clip-path={`polygon(${$nodeGraph.lasso.points})`}>
782+
<polygon points={$nodeGraph.lasso.points} stroke="#00a8ff" stroke-width="1px" fill="rgba(0, 168, 255, 0.05)" />
783783
</svg>
784784
{/if}
785785

@@ -1376,7 +1376,7 @@
13761376
border: 1px solid #00a8ff;
13771377
}
13781378
1379-
.lasoo-selection {
1379+
.lasso-selection {
13801380
position: absolute;
13811381
pointer-events: none;
13821382
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 {
@@ -158,7 +158,7 @@ export class Box {
158158
readonly endY!: number;
159159
}
160160

161-
export class Lasoo {
161+
export class Lasso {
162162
readonly points!: string;
163163
}
164164

@@ -1673,7 +1673,7 @@ export const messageMakers: Record<string, MessageMaker> = {
16731673
TriggerVisitLink,
16741674
UpdateActiveDocument,
16751675
UpdateBox,
1676-
UpdateLasoo,
1676+
UpdateLasso,
16771677
UpdateClickTargets,
16781678
UpdateContextMenuInformation,
16791679
UpdateDialogButtons,

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

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import { type Editor } from "@graphite/editor";
44
import type { NodeGraphError } from "@graphite/messages";
55
import {
66
type Box,
7-
type Lasoo,
7+
type Lasso,
88
type FrontendClickTargets,
99
type ContextMenuInformation,
1010
type FrontendNode,
@@ -13,7 +13,7 @@ import {
1313
ClearAllNodeGraphWires,
1414
SendUIMetadata,
1515
UpdateBox,
16-
UpdateLasoo,
16+
UpdateLasso,
1717
UpdateClickTargets,
1818
UpdateContextMenuInformation,
1919
UpdateInSelectedNetwork,
@@ -34,7 +34,7 @@ import {
3434
export function createNodeGraphState(editor: Editor) {
3535
const { subscribe, update } = writable({
3636
box: undefined as Box | undefined,
37-
lasoo: undefined as Lasoo | undefined,
37+
lasso: undefined as Lasso | undefined,
3838
clickTargets: undefined as FrontendClickTargets | undefined,
3939
contextMenuInformation: undefined as ContextMenuInformation | undefined,
4040
error: undefined as NodeGraphError | undefined,
@@ -71,9 +71,9 @@ export function createNodeGraphState(editor: Editor) {
7171
return state;
7272
});
7373
});
74-
editor.subscriptions.subscribeJsMessage(UpdateLasoo, (updateLasoo) => {
74+
editor.subscriptions.subscribeJsMessage(UpdateLasso, (updateLasso) => {
7575
update((state) => {
76-
state.lasoo = updateLasoo.lasoo;
76+
state.lasso = updateLasso.lasso;
7777
return state;
7878
});
7979
});

0 commit comments

Comments
 (0)