Skip to content

Commit

Permalink
Fix z-index on inner group node
Browse files Browse the repository at this point in the history
  • Loading branch information
StefansArya committed Jan 9, 2024
1 parent 4a19e9b commit 0e4ee3d
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions nodes/Decoration/Group/Default.sf
Original file line number Diff line number Diff line change
Expand Up @@ -227,10 +227,11 @@ class extends Blackprint.Interface{
let indexInModel = modelIfaceList.indexOf(temp);

if(lowestIndex == -1 || lowestIndex > indexInModel){
lowestIndex = indexInModel;

if(temp.namespace === "Decoration/Group/Default")
1; // ToDo: fix z-index when it's in front of another group node
if(temp.namespace === "Decoration/Group/Default"){
let isInnerGroup = (temp.x > this.x && temp.w < this.w) || (temp.y > this.y && temp.h < this.h);
if(isInnerGroup) lowestIndex = indexInModel;
}
else lowestIndex = indexInModel;
}

if(temp.namespace === "Decoration/Group/Default") {
Expand Down

0 comments on commit 0e4ee3d

Please sign in to comment.