Skip to content

Commit 0d04ff0

Browse files
authored
Merge pull request #172 from alajillo/oss22_logic
Fixed #150 - insert block from main frame, apply placeholder depth
2 parents ffd95be + 3beaf5d commit 0d04ff0

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

js/board/BoardFrame.js

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,7 @@ define([
6161
vp_note_display: true,
6262
viewDepthNumber: false,
6363
indentCount: 4,
64+
currentParentBlock : null,
6465
...this.state
6566
};
6667

@@ -759,6 +760,10 @@ define([
759760
// add to specific position
760761
this.blockList.splice(position, 0, block);
761762
}
763+
if(this.currentParentBlock){
764+
this.moveBlock(position, position, this.currentParentBlock);
765+
this.currentParentBlock = null;
766+
}
762767
return block;
763768
}
764769

@@ -807,6 +812,8 @@ define([
807812
movingBlock.setGroupBlock();
808813
}
809814
this.reloadBlockList();
815+
}else if(parentBlock){
816+
this.currentParentBlock = parentBlock
810817
}
811818
}
812819

0 commit comments

Comments
 (0)