Created
April 3, 2023 14:58
-
-
Save rokinroj/e5ad4ae26ef951d217961270ff724111 to your computer and use it in GitHub Desktop.
Get Active Nested Content Element
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function getActiveFeature() { | |
let editorScope = $scope.$parent; | |
do { | |
editorScope = editorScope.$parent; | |
} while (!isCurrentNode(editorScope)); | |
this.editorScope = editorScope; | |
return editorScope; | |
} | |
function isCurrentNode(editorScope) { | |
if (editorScope.vm && editorScope.vm.hasOwnProperty('currentNode')) { | |
return true; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment