mirror of
https://github.com/penpot/penpot.git
synced 2025-12-11 22:14:05 +01:00
✨ Add drop grid cells in wasm
This commit is contained in:
committed by
Belén Albeza
parent
52a4fc6030
commit
8dcb376b18
@@ -21,7 +21,7 @@ use options::RenderOptions;
|
||||
use surfaces::{SurfaceId, Surfaces};
|
||||
|
||||
use crate::performance;
|
||||
use crate::shapes::{modified_children_ids, Corners, Fill, Shape, StructureEntry, Type};
|
||||
use crate::shapes::{Corners, Fill, Shape, StructureEntry, Type};
|
||||
use crate::tiles::{self, PendingTiles, TileRect};
|
||||
use crate::uuid::Uuid;
|
||||
use crate::view::Viewbox;
|
||||
@@ -929,7 +929,7 @@ impl RenderState {
|
||||
node_render_state.get_children_clip_bounds(element, modifiers.get(&element.id));
|
||||
|
||||
let mut children_ids =
|
||||
modified_children_ids(element, structure.get(&element.id), false);
|
||||
element.modified_children_ids(structure.get(&element.id), false);
|
||||
|
||||
// Z-index ordering on Layouts
|
||||
if element.has_layout() {
|
||||
@@ -1019,7 +1019,7 @@ impl RenderState {
|
||||
let Some(root) = tree.get(&Uuid::nil()) else {
|
||||
return Err(String::from("Root shape not found"));
|
||||
};
|
||||
let root_ids = modified_children_ids(root, structure.get(&root.id), false);
|
||||
let root_ids = root.modified_children_ids(structure.get(&root.id), false);
|
||||
|
||||
// If we finish processing every node rendering is complete
|
||||
// let's check if there are more pending nodes
|
||||
@@ -1118,7 +1118,7 @@ impl RenderState {
|
||||
self.update_tile_for(&shape);
|
||||
} else {
|
||||
// We only need to rebuild tiles from the first level.
|
||||
let children = modified_children_ids(&shape, structure.get(&shape.id), false);
|
||||
let children = shape.modified_children_ids(structure.get(&shape.id), false);
|
||||
for child_id in children.iter() {
|
||||
nodes.push(*child_id);
|
||||
}
|
||||
@@ -1148,7 +1148,7 @@ impl RenderState {
|
||||
self.update_tile_for(&shape);
|
||||
}
|
||||
|
||||
let children = modified_children_ids(&shape, structure.get(&shape.id), false);
|
||||
let children = shape.modified_children_ids(structure.get(&shape.id), false);
|
||||
for child_id in children.iter() {
|
||||
nodes.push(*child_id);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user