mirror of
https://github.com/GraphiteEditor/Graphite.git
synced 2026-09-23 04:28:12 +08:00
Implement dynamic table attributes to generalize the graphic-specific Table type (#4050)
* Feature-gate serde derives behind cfg_attr in all runtime node graph type crates * Refactor Table to move its hard-coded fields into an attributes field * Encapsulate TableRow/TableRowRef/TableRowMut attribute fields behind accessor methods * Remove TaggedValue::GraphicUnused * Refactor Table<T> to use dynamic attributes instead fixed names * Fix code review soundness concerns * Add todo work * Replace row-oriented Table<T> API with column-oriented access * Fix attribute propagation bugs ---------
This commit is contained in:
@@ -646,10 +646,12 @@ mod test_artboard {
|
||||
|
||||
/// Check if all of the artboards exist in any ordering
|
||||
async fn has_artboards(editor: &mut EditorTestUtils, mut expected: Vec<ArtboardLayoutDocument>) {
|
||||
let artboards = get_artboards(editor)
|
||||
.await
|
||||
.iter()
|
||||
.map(|row| ArtboardLayoutDocument::new(row.element.location, row.element.dimensions))
|
||||
let artboards = get_artboards(editor).await;
|
||||
let artboards = (0..artboards.len())
|
||||
.map(|index| {
|
||||
let element = artboards.element(index).unwrap();
|
||||
ArtboardLayoutDocument::new(element.location, element.dimensions)
|
||||
})
|
||||
.collect::<Vec<_>>();
|
||||
assert_eq!(artboards.len(), expected.len(), "incorrect len: actual {:?}, expected {:?}", artboards, expected);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user