Fix missing artboard layer icon
This commit is contained in:
parent
415d4b578a
commit
2f880fa035
|
|
@ -2714,6 +2714,7 @@ impl NodeGraphMessageHandler {
|
||||||
let clippable = layer.can_be_clipped(network_interface.document_metadata());
|
let clippable = layer.can_be_clipped(network_interface.document_metadata());
|
||||||
let data = LayerPanelEntry {
|
let data = LayerPanelEntry {
|
||||||
id: node_id,
|
id: node_id,
|
||||||
|
reference: network_interface.reference(&node_id, &[]).and_then(|x| x.as_ref()).cloned().unwrap_or_default(),
|
||||||
alias: network_interface.display_name(&node_id, &[]),
|
alias: network_interface.display_name(&node_id, &[]),
|
||||||
in_selected_network: selection_network_path.is_empty(),
|
in_selected_network: selection_network_path.is_empty(),
|
||||||
children_allowed,
|
children_allowed,
|
||||||
|
|
|
||||||
|
|
@ -34,6 +34,7 @@ impl serde::Serialize for JsRawBuffer {
|
||||||
#[derive(Debug, Clone, serde::Serialize, serde::Deserialize, PartialEq, Eq, specta::Type)]
|
#[derive(Debug, Clone, serde::Serialize, serde::Deserialize, PartialEq, Eq, specta::Type)]
|
||||||
pub struct LayerPanelEntry {
|
pub struct LayerPanelEntry {
|
||||||
pub id: NodeId,
|
pub id: NodeId,
|
||||||
|
pub reference: String,
|
||||||
pub alias: String,
|
pub alias: String,
|
||||||
#[serde(rename = "inSelectedNetwork")]
|
#[serde(rename = "inSelectedNetwork")]
|
||||||
pub in_selected_network: bool,
|
pub in_selected_network: bool,
|
||||||
|
|
|
||||||
|
|
@ -134,12 +134,12 @@ impl DocumentToolData {
|
||||||
LayoutGroup::Row {
|
LayoutGroup::Row {
|
||||||
widgets: vec![
|
widgets: vec![
|
||||||
IconButton::new("SwapVertical", 16)
|
IconButton::new("SwapVertical", 16)
|
||||||
.tooltip_label("Swap")
|
.tooltip_label("Swap Working Colors")
|
||||||
.tooltip_shortcut(action_shortcut!(ToolMessageDiscriminant::SwapColors))
|
.tooltip_shortcut(action_shortcut!(ToolMessageDiscriminant::SwapColors))
|
||||||
.on_update(|_| ToolMessage::SwapColors.into())
|
.on_update(|_| ToolMessage::SwapColors.into())
|
||||||
.widget_instance(),
|
.widget_instance(),
|
||||||
IconButton::new("WorkingColors", 16)
|
IconButton::new("WorkingColors", 16)
|
||||||
.tooltip_label("Reset")
|
.tooltip_label("Reset Working Colors")
|
||||||
.tooltip_shortcut(action_shortcut!(ToolMessageDiscriminant::ResetColors))
|
.tooltip_shortcut(action_shortcut!(ToolMessageDiscriminant::ResetColors))
|
||||||
.on_update(|_| ToolMessage::ResetColors.into())
|
.on_update(|_| ToolMessage::ResetColors.into())
|
||||||
.widget_instance(),
|
.widget_instance(),
|
||||||
|
|
|
||||||
|
|
@ -644,15 +644,15 @@
|
||||||
{@html $nodeGraph.thumbnails.get(listing.entry.id)}
|
{@html $nodeGraph.thumbnails.get(listing.entry.id)}
|
||||||
{/if}
|
{/if}
|
||||||
</div>
|
</div>
|
||||||
{#if listing.entry.name === "Artboard"}
|
{#if listing.entry.reference === "Artboard"}
|
||||||
<IconLabel icon="Artboard" class="layer-type-icon" />
|
<IconLabel icon="Artboard" class="layer-type-icon" tooltipLabel="Artboard" />
|
||||||
{/if}
|
{/if}
|
||||||
<LayoutRow class="layer-name" on:dblclick={() => onEditLayerName(listing)}>
|
<LayoutRow class="layer-name" on:dblclick={() => onEditLayerName(listing)}>
|
||||||
<input
|
<input
|
||||||
data-text-input
|
data-text-input
|
||||||
type="text"
|
type="text"
|
||||||
value={listing.entry.alias}
|
value={listing.entry.alias}
|
||||||
placeholder={listing.entry.name}
|
placeholder={listing.entry.reference}
|
||||||
disabled={!listing.editingName}
|
disabled={!listing.editingName}
|
||||||
on:blur={() => onEditLayerNameDeselect(listing)}
|
on:blur={() => onEditLayerNameDeselect(listing)}
|
||||||
on:keydown={(e) => e.key === "Escape" && onEditLayerNameDeselect(listing)}
|
on:keydown={(e) => e.key === "Escape" && onEditLayerNameDeselect(listing)}
|
||||||
|
|
@ -842,7 +842,6 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
.layer-type-icon {
|
.layer-type-icon {
|
||||||
flex: 0 0 auto;
|
|
||||||
margin-left: 8px;
|
margin-left: 8px;
|
||||||
margin-right: -4px;
|
margin-right: -4px;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -745,10 +745,6 @@
|
||||||
|
|
||||||
<style lang="scss" global>
|
<style lang="scss" global>
|
||||||
.number-input {
|
.number-input {
|
||||||
input {
|
|
||||||
text-align: center;
|
|
||||||
}
|
|
||||||
|
|
||||||
&.narrow {
|
&.narrow {
|
||||||
--widget-height: 20px;
|
--widget-height: 20px;
|
||||||
}
|
}
|
||||||
|
|
@ -973,5 +969,9 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
input {
|
||||||
|
text-align: center;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|
|
||||||
|
|
@ -827,13 +827,10 @@ export class UpdateDocumentLayerDetails extends JsMessage {
|
||||||
export class LayerPanelEntry {
|
export class LayerPanelEntry {
|
||||||
id!: bigint;
|
id!: bigint;
|
||||||
|
|
||||||
name!: string;
|
reference!: string;
|
||||||
|
|
||||||
alias!: string;
|
alias!: string;
|
||||||
|
|
||||||
@Transform(({ value }: { value: string }) => value || undefined)
|
|
||||||
debugLayerIdTooltip!: string | undefined;
|
|
||||||
|
|
||||||
inSelectedNetwork!: boolean;
|
inSelectedNetwork!: boolean;
|
||||||
|
|
||||||
childrenAllowed!: boolean;
|
childrenAllowed!: boolean;
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue