fix: icons weren't remove on children
This commit is contained in:
parent
ab4d99c3ba
commit
8772699ed6
@ -226,6 +226,7 @@ export const CsComponent = ({
|
|||||||
|
|
||||||
deleteNodes.forEach((nodeId) => {//Ноды
|
deleteNodes.forEach((nodeId) => {//Ноды
|
||||||
cy?.remove(cy?.$("#" + nodeId))
|
cy?.remove(cy?.$("#" + nodeId))
|
||||||
|
removeButtons(nodeId)
|
||||||
updateQuestion(nodeId, question => {
|
updateQuestion(nodeId, question => {
|
||||||
question.content.rule.parentId = ""
|
question.content.rule.parentId = ""
|
||||||
question.content.rule.main = []
|
question.content.rule.main = []
|
||||||
@ -370,7 +371,7 @@ if (e.cy().data('firstNode') !== 'root') {
|
|||||||
if (e.cy().data('firstNode') === undefined)
|
if (e.cy().data('firstNode') === undefined)
|
||||||
e.cy().data('firstNode','nonroot')
|
e.cy().data('firstNode','nonroot')
|
||||||
const parent = e.cy().edges(`[target="${e.id()}"]`)[0].source()
|
const parent = e.cy().edges(`[target="${e.id()}"]`)[0].source()
|
||||||
const wing = (parent.data('children') === 1) ? 0 : parent.data('subtreeWidth') / 2
|
const wing = (parent.data('children') === 1) ? 0 : parent.data('subtreeWidth') / 2 + 50
|
||||||
const lastOffset = parent.data('lastChild')
|
const lastOffset = parent.data('lastChild')
|
||||||
const step = wing * 2 / (parent.data('children') - 1)
|
const step = wing * 2 / (parent.data('children') - 1)
|
||||||
//e.removeData('subtreeWidth')
|
//e.removeData('subtreeWidth')
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user