mirror of
https://github.com/zsviczian/obsidian-excalidraw-plugin.git
synced 2025-08-06 05:46:28 +00:00
Merge pull request #378 from 1-2-3/master
Ignore individual arrows in Fixed spacing and Fixed vertical distance scripts
This commit is contained in:
@@ -15,7 +15,8 @@ const spacing = parseInt (await utils.inputPrompt("spacing?","number","8"));
|
||||
if(isNaN(spacing)) {
|
||||
return;
|
||||
}
|
||||
const elements=ea.getViewSelectedElements();
|
||||
const elements=ea.getViewSelectedElements()
|
||||
.filter(els => !(els.length === 1 && els[0].type ==="arrow")); // ignore individual arrows
|
||||
const topGroups = ea.getMaximumGroups(elements);
|
||||
const groups = topGroups.sort((lha,rha) => lha[0].x - rha[0].x);
|
||||
|
||||
|
||||
@@ -15,7 +15,8 @@ const spacing = parseInt (await utils.inputPrompt("spacing?","number","8"));
|
||||
if(isNaN(spacing)) {
|
||||
return;
|
||||
}
|
||||
const elements=ea.getViewSelectedElements();
|
||||
const elements=ea.getViewSelectedElements()
|
||||
.filter(els => !(els.length === 1 && els[0].type ==="arrow")); // ignore individual arrows
|
||||
const topGroups = ea.getMaximumGroups(elements);
|
||||
const groups = topGroups.sort((lha,rha) => lha[0].y - rha[0].y);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user