Add predicate mode

This commit is contained in:
Misode
2019-12-13 18:53:01 +01:00
parent d56b6d5495
commit 2ac16fd0e7
9 changed files with 77 additions and 43 deletions

View File

@@ -148,7 +148,7 @@ function copySource(el) {
function getPath(el) {
let $node = $(el).closest('[data-index]');
let index = $node.attr('data-index');
if (index === 'table') return [];
if (index === 'root') return [];
let parent = getPath($node.parent());
parent = parent.concat(index.split('.'));
return parent;