You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have a use case of changing a node style when certain position requirements are met, e.g. when hovering to a node, it will insert it as a child node, and while hovering below / above would insert it as an adjacent node, I need to detect this distinction to be able to change the styling.
By adding hooks, preferably on the placeholder position changes (e.g when a node is about to be added as a child node, I want to make the target parent node to have a different class).
I can create a pull request for the changes if required.
The text was updated successfully, but these errors were encountered:
afterMove(store){constclosestBranch=store.oneMoveStore?.info?.closestBranchconst{placeholder, targetTree}=storeif(closestBranch&&placeholder){constclosestNode=store.targetTree.getNodeByBranchEl(closestBranch)if(placeholder.parentElement.parentElement===closestBranch){// is childconsole.log('child');}elseif(placeholder.nextSibling===closestBranch){// is previous siblingconsole.log('previous');}elseif(placeholder.previousSibling===closestBranch){// is next siblingconsole.log('next');}}}
I have a use case of changing a node style when certain position requirements are met, e.g. when hovering to a node, it will insert it as a child node, and while hovering below / above would insert it as an adjacent node, I need to detect this distinction to be able to change the styling.
By adding hooks, preferably on the placeholder position changes (e.g when a node is about to be added as a child node, I want to make the target parent node to have a different class).
I can create a pull request for the changes if required.
The text was updated successfully, but these errors were encountered: