Add rectangle tool to sketch mode (#2005)
* Initial draft rectangle appear on screen * rectangle tool extra * Fix draft lines in all quadrants * Wait for first click to set up draft rectangle * Working rectangle commit * Update toolbar icon and disabling logic * A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu) * fmt * Working tool, one remaining bug around naively updating sketch nodes * Break out rectangle AST utilities * Remove unused imports * Disable Rectangle tool if sketch is not empty * Use existing tools for generating tag names * Add snapshot test for tool * A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu) * Rerun CI * Add comments, remove unrelated changes * fix rectangle bug from bad ast * Make rectangle tool equippable when the line tool is equipped * Change snapshot test to check the draft rectangle instead of commited one * A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu) * A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu) * Rerun CI * A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu) * Rerun CI --------- Co-authored-by: Kurt Hutten Irev-Dev <k.hutten@protonmail.ch> Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
This commit is contained in:
@ -305,6 +305,16 @@ const CustomIconMap = {
|
||||
/>
|
||||
</svg>
|
||||
),
|
||||
rectangle: (
|
||||
<svg viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path
|
||||
fillRule="evenodd"
|
||||
clipRule="evenodd"
|
||||
d="M16 5H4V15H16V5ZM4 4H3V5V15V16H4H16H17V15V5V4H16H4Z"
|
||||
fill="currentColor"
|
||||
/>
|
||||
</svg>
|
||||
),
|
||||
refresh: (
|
||||
<svg viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path
|
||||
|
Reference in New Issue
Block a user