mirror of
https://github.com/GraphiteEditor/Graphite.git
synced 2026-09-23 03:28:11 +08:00
Merge branch 'master' into fix-range
This commit is contained in:
@@ -3,10 +3,6 @@
|
||||
use axum::routing::get;
|
||||
use axum::Router;
|
||||
use fern::colors::{Color, ColoredLevelConfig};
|
||||
use graphite_editor::application::Editor;
|
||||
use graphite_editor::messages::prelude::*;
|
||||
use graphite_editor::node_graph_executor::GraphRuntimeRequest;
|
||||
use graphite_editor::node_graph_executor::NODE_RUNTIME;
|
||||
use graphite_editor::node_graph_executor::*;
|
||||
use std::sync::Mutex;
|
||||
|
||||
|
||||
@@ -7,13 +7,14 @@
|
||||
|
||||
export let value: string;
|
||||
export let disabled = false;
|
||||
export let tooltip: string | undefined = undefined;
|
||||
|
||||
function setValue(newValue: ReferencePoint) {
|
||||
dispatch("value", newValue);
|
||||
}
|
||||
</script>
|
||||
|
||||
<div class="reference-point-input" class:disabled>
|
||||
<div class="reference-point-input" class:disabled title={tooltip}>
|
||||
<button on:click={() => setValue("TopLeft")} class="row-1 col-1" class:active={value === "TopLeft"} tabindex="-1" {disabled}><div /></button>
|
||||
<button on:click={() => setValue("TopCenter")} class="row-1 col-2" class:active={value === "TopCenter"} tabindex="-1" {disabled}><div /></button>
|
||||
<button on:click={() => setValue("TopRight")} class="row-1 col-3" class:active={value === "TopRight"} tabindex="-1" {disabled}><div /></button>
|
||||
|
||||
@@ -1340,6 +1340,9 @@ export class ReferencePointInput extends WidgetProps {
|
||||
value!: ReferencePoint;
|
||||
|
||||
disabled!: boolean;
|
||||
|
||||
@Transform(({ value }: { value: string }) => value || undefined)
|
||||
tooltip!: string | undefined;
|
||||
}
|
||||
|
||||
// WIDGET
|
||||
|
||||
Reference in New Issue
Block a user