Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 2 additions & 15 deletions .github/workflows/website.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,9 @@ on:
- master
paths:
- website/**
- frontend/eslint.config.js
- frontend/eslint-require-data-selectors.js
- frontend/package-lock.json
pull_request:
paths:
- website/**
- frontend/eslint.config.js
- frontend/eslint-require-data-selectors.js
- frontend/package-lock.json
env:
CARGO_TERM_COLOR: always
INDEX_HTML_HEAD_INCLUSION: <script defer data-domain="graphite.art" data-api="/visit/event" src="/visit/script.hash.js"></script>
Expand All @@ -36,10 +30,6 @@ jobs:
uses: actions/setup-node@v6
with:
node-version-file: .nvmrc
cache: npm
cache-dependency-path: |
frontend/package-lock.json
website/package-lock.json

- name: 🕸 Install Zola
uses: taiki-e/install-action@v2
Expand All @@ -65,12 +55,9 @@ jobs:
cargo run -p crate-hierarchy-viz -- website/generated
cargo run -p editor-message-tree -- website/generated

- name: 🔧 Install website and frontend npm dependencies
- name: 🔧 Install website npm dependencies
run: |
# The website is linted by the frontend's ESLint config and the tools it installs
cd frontend
npm ci
cd ../website
cd website
npm ci

- name: 📃 Generate node catalog documentation
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
use super::utility_types::TransformIn;
use super::utility_types::{DraggedShapeSize, TransformIn};
use crate::messages::portfolio::document::utility_types::document_metadata::LayerNodeIdentifier;
use crate::messages::portfolio::document::utility_types::network_interface::NodeTemplate;
use crate::messages::prelude::*;
Expand Down Expand Up @@ -107,6 +107,16 @@ pub enum GraphOperationMessage {
transform_in: TransformIn,
skip_rerender: bool,
},
/// Move a rectangle or ellipse layer's scale off the Transform node and into its size inputs.
BakeShapeScale {
layer: LayerNodeIdentifier,
},
/// Write a rectangle or ellipse size from the size captured at the start of a bounds drag.
/// The gesture scale is whatever is on the Transform right now. The stored size is replaced, not multiplied again.
WriteDraggedShapeSize {
layer: LayerNodeIdentifier,
size: DraggedShapeSize,
},
Vector {
layer: LayerNodeIdentifier,
modification_type: VectorModificationType,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -164,6 +164,16 @@ impl MessageHandler<GraphOperationMessage, GraphOperationMessageContext<'_>> for
modify_inputs.transform_set(transform, transform_in, skip_rerender);
}
}
GraphOperationMessage::BakeShapeScale { layer } => {
if let Some(mut modify_inputs) = ModifyInputsContext::new_with_layer(layer, network_interface, responses) {
modify_inputs.bake_scale_into_shape_generator();
}
}
GraphOperationMessage::WriteDraggedShapeSize { layer, size } => {
if let Some(mut modify_inputs) = ModifyInputsContext::new_with_layer(layer, network_interface, responses) {
modify_inputs.write_dragged_shape_size(size);
}
}
GraphOperationMessage::Vector { layer, modification_type } => {
if layer == LayerNodeIdentifier::ROOT_PARENT {
log::error!("Cannot run Vector on ROOT_PARENT");
Expand Down
Loading