0
Fork 0
mirror of https://github.com/penpot/penpot.git synced 2025-03-13 16:21:57 -05:00

add new snap to gid btn and icon

This commit is contained in:
elhombretecla 2017-03-22 12:26:57 +01:00
parent 0cd3442d86
commit 80ff709729
3 changed files with 73 additions and 1 deletions

File diff suppressed because one or more lines are too long

After

Width:  |  Height:  |  Size: 8.6 KiB

View file

@ -333,6 +333,17 @@
{:d
"m456.73499 552.40637c-37.03948 0.55553-74.13146-0.0579-111.19268 0.16864-103.75485 0-207.5097 0-311.264546 0-13.378707 4.87752-25.1288586 14.40338-30.965554 27.59878-5.4848905 9.55437-1.8671196 21.00046-2.90252482 31.44964 0 135.52059 0 271.04119 0 406.56177 6.28640122 17.3263 21.49629082 33.3779 40.99047482 33.5963 132.07284 1.2119 264.18356 0.1387 396.27102 0.2146 10.09638-0.5821 20.80251 1.1486 30.50925-0.907 14.91841-6.1906 28.43314-18.8709 31.57859-35.2667 0.11288-143.11195 0.0226-286.31 0.0516-429.4547-5.85142-16.19374-19.35885-30.4674-36.60791-33.81848-2.14743-0.22947-4.31215-0.20837-6.4677-0.14285zM97.272275 593.8968c17.193555 0.44644 34.497565-0.6536 51.588765 1.75977 5.46534 5.38378 2.18232 13.95144 3.48522 20.6441 0.30391 28.0139 1.53524 56.27544-1.31081 84.13248-3.33 5.94455-11.54189 2.74028-16.92404 3.97018-29.26161 0.45356-58.770975 1.68478-87.878338-1.20257-5.932256-3.34253-2.73049-11.53903-3.960263-16.92204-0.45574-29.25904-1.679227-58.76512 1.198599-87.87041 3.325068-5.95374 11.5233-2.69657 16.896671-4.01939 12.29604-0.42155 24.602036-0.45212 36.904196-0.49212zm152.855735 0c17.19355 0.44644 34.49756-0.6536 51.58875 1.75977 5.46434 5.38405 2.1828 13.95126 3.48522 20.6441 0.30391 28.0139 1.53525 56.27544-1.31081 84.13248-3.33006 5.94455-11.5419 2.7403-16.92403 3.97018-29.26162 0.45356-58.77098 1.68478-87.87834-1.20257-5.93082-3.34298-2.73116-11.53915-3.96028-16.92204-0.45846-29.25631-1.67385-58.75535 1.19465-87.86049 3.31705-5.96652 11.52774-2.70656 16.90262-4.02931 12.29538-0.42156 24.60072-0.45212 36.90222-0.49212zm152.85572 0c17.20128 0.45264 34.51487-0.6624 51.61256 1.7677 5.41388 5.4045 2.20292 13.93815 3.46246 20.63421 0.29842 28.0184 1.5392 56.28568-1.31383 84.14634-3.34635 5.92716-11.53861 2.7296-16.92207 3.95757-29.25905 0.45511-58.76527 1.68367-87.87038-1.19987-5.94111-3.33402-2.73896-11.54122-3.96823-16.92403-0.45719-29.25672-1.67637-58.75801 1.19664-87.86248 3.31678-5.9644 11.52676-2.70429 16.90064-4.02732 12.29538-0.42156 24.60071-0.45212 36.90221-0.49212zM97.272275 746.75252c17.193555 0.44645 34.497565-0.6536 51.588765 1.75978 5.46534 5.38377 2.18232 13.95144 3.48522 20.6441 0.30391 28.01388 1.53524 56.27543-1.31081 84.13247-3.33075 5.94485-11.54343 2.73914-16.92603 3.96947-29.26096 0.45323-58.769584 1.68379-87.876348-1.20185-5.931836-3.34263-2.729601-11.53926-3.960263-16.92205-0.45574-29.25904-1.679227-58.76511 1.198599-87.8704 3.325068-5.95374 11.5233-2.69658 16.896671-4.01939 12.29604-0.42155 24.602036-0.45213 36.904196-0.49213zm152.855735 0c17.19355 0.44645 34.49756-0.6536 51.58875 1.75978 5.46434 5.38405 2.1828 13.95126 3.48522 20.6441 0.30391 28.01388 1.53525 56.27543-1.31081 84.13247-3.33084 5.94504-11.54327 2.73954-16.92604 3.96947-29.25839 0.45423-58.76389 1.68166-87.86839-1.19986-5.94217-3.3335-2.73724-11.54157-3.96822-16.92404-0.45846-29.25631-1.67385-58.75534 1.19465-87.86048 3.31705-5.96653 11.52774-2.70657 16.90262-4.02931 12.29538-0.42156 24.60072-0.45213 36.90222-0.49213zm152.85572 0c17.20128 0.45264 34.51487-0.66239 51.61256 1.76771 5.41388 5.4045 2.20292 13.93815 3.46246 20.6342 0.29842 28.0184 1.5392 56.28568-1.31383 84.14634-3.34875 5.93378-11.53227 2.71295-16.92206 3.9563-29.259 0.45697-58.76523 1.68226-87.87039-1.19859-5.94111-3.33402-2.73896-11.54122-3.96823-16.92404-0.45719-29.25672-1.67637-58.758 1.19664-87.86247 3.31678-5.9644 11.52676-2.70429 16.90064-4.02732 12.29538-0.42156 24.60071-0.45213 36.90221-0.49213zM97.272275 899.60825c17.192315 0.44719 34.494715-0.65282 51.584795 1.75977 5.47318 5.37848 2.18417 13.95237 3.48919 20.6441 0.30719 28.0113 1.52877 56.26515-1.30486 84.12258-3.32192 5.9583-11.54623 2.7497-16.92999 3.9801-29.25903 0.4558-58.765115 1.6792-87.870403-1.1986-5.941105-3.334-2.738955-11.54124-3.968198-16.92405-0.453371-29.26202-1.684029-58.77352 1.202567-87.88032 3.333596-5.94075 11.52021-2.69037 16.892703-4.01146 12.296067-0.42133 24.602002-0.45375 36.904196-0.49212zm152.855735 0c17.19355 0.44832 34.49779-0.65503 51.58875 1.76175 5.46502 5.38318 2.1825 13.95011 3.48522 20.64212 0.30601 28.01241 1.53115 56.26886-1.30684 84.12658-3.32378 5.9546-11.54496 2.7453-16.928 3.9761-29.25904 0.4558-58.76512 1.6792-87.8704-1.1986-5.94088-3.3343-2.73915-11.54118-3.96822-16.92405-0.45835-29.25622-1.67401-58.75578 1.19465-87.86048 3.31525-5.96723 11.52783-2.71042 16.90262-4.0313 12.29541-0.42134 24.60068-0.45375 36.90222-0.49212zm152.85572 0c17.2013 0.45298 34.51506-0.66367 51.61256 1.76969 5.41468 5.40339 2.20187 13.93687 3.46246 20.63221 0.30083 28.01544 1.53442 56.27728-1.30987 84.13645-3.33348 5.9431-11.54111 2.737-16.92403 3.9682-29.26202 0.4534-58.77352 1.6841-87.88033-1.2026-5.93062-3.3411-2.73141-11.53805-3.96028-16.92005-0.45834-29.25622-1.674-58.75578 1.19466-87.86048 3.31539-5.96708 11.52777-2.71053 16.90262-4.0313 12.2954-0.42134 24.60068-0.45375 36.90221-0.49212z"}]]]))
(def grid-snap
(html
[:svg
{:viewBox "0 0 500 500.00001"
:height "500"
:width "500"}
[:g
[:path
{:d
"M459.973.006c-1.08-.015-2.16.006-3.24.04-37.038.554-74.13-.06-111.19.167H34.277C20.9 5.09 9.15 14.617 3.312 27.813c-5.484 9.554-1.866 21-2.902 31.45v406.56c6.287 17.326 21.496 33.38 40.99 33.597 44.353.407 88.71.545 133.07.566 6.783-.516 18.45-3.515 19.887-17.91V224.533l.022.002s.493-26.49 25.386-30.117h25.488c1.625-.006 3.25-.022 4.875-.027.556.015 1.114.017 1.67.028h146.31c1.624-.006 3.25-.022 4.874-.027.558.015 1.116.016 1.674.028h77.924l-.06-.164s16.418.397 17.212-16.95c.016-.334.052-.623.08-.925-.005-47.46-.013-94.922-.003-142.374C493.96 17.812 480.453 3.54 463.204.187c-1.074-.114-2.15-.166-3.23-.18zM97.27 41.536c17.195.446 34.5-.654 51.59 1.76 5.467 5.383 2.183 13.95 3.486 20.642.304 28.013 1.535 56.275-1.31 84.132-3.33 5.945-11.543 2.74-16.925 3.97-29.26.455-58.77 1.685-87.878-1.202-5.932-3.343-2.73-11.54-3.96-16.922-.454-29.26-1.68-58.764 1.2-87.87 3.324-5.953 11.522-2.696 16.895-4.02 12.296-.42 24.602-.45 36.904-.49zm152.86 0c17.192.446 34.496-.654 51.587 1.76 5.464 5.383 2.182 13.95 3.484 20.642.305 28.013 1.537 56.275-1.31 84.132-3.33 5.945-11.54 2.74-16.923 3.97-29.262.455-58.772 1.685-87.88-1.202-5.93-3.343-2.73-11.54-3.958-16.922-.46-29.256-1.676-58.754 1.192-87.86 3.317-5.966 11.53-2.706 16.905-4.03 12.295-.42 24.6-.45 36.902-.49zm152.854 0c17.202.452 34.514-.663 51.612 1.767 5.414 5.404 2.203 13.936 3.463 20.633.297 28.018 1.537 56.285-1.316 84.146-3.346 5.927-11.538 2.73-16.922 3.96-29.26.454-58.764 1.68-87.87-1.202-5.94-3.334-2.738-11.54-3.968-16.924-.457-29.257-1.675-58.757 1.198-87.86 3.316-5.966 11.526-2.706 16.9-4.03 12.295-.42 24.6-.45 36.902-.49zM97.27 194.39c17.195.447 34.5-.653 51.59 1.76 5.467 5.384 2.183 13.952 3.486 20.645.304 28.014 1.535 56.274-1.31 84.13-3.332 5.946-11.544 2.74-16.927 3.97-29.262.455-58.77 1.684-87.878-1.202-5.93-3.342-2.728-11.54-3.96-16.922-.454-29.258-1.68-58.762 1.2-87.868 3.324-5.953 11.522-2.696 16.895-4.02 12.296-.42 24.602-.45 36.904-.49zm146.654 40.405v62.03h64.674v-62.03h-64.674zm191.904 0v62.03h64.674v-62.03h-64.674zm-191.904 97.037v55.512c0 21.636 5.366 40.318 16.16 57.24 10.83 16.977 25.548 29.995 45.176 39.703 19.56 9.675 41.61 14.598 66.953 14.598 25.342 0 47.39-4.923 66.95-14.598 19.63-9.708 34.35-22.726 45.18-39.703 10.793-16.922 16.16-35.604 16.16-57.24v-55.512h-64.675v55.512c0 8.49-2.126 16.91-6.74 24.066-3.89 6.03-8.793 11.28-14.963 15.03-5.316 3.23-11.242 5.565-17.62 7.206-5.6 1.442-10.153 2.415-14.692 2.793-3.283.273-6.48.415-9.6.415-3.12 0-6.32-.142-9.602-.416-4.538-.38-9.09-1.352-14.69-2.794-6.377-1.64-12.305-3.977-17.62-7.207-6.17-3.75-11.072-9-14.96-15.03-4.615-7.157-6.742-15.575-6.742-24.066v-55.512h-64.674zM97.27 347.246c17.194.447 34.497-.653 51.587 1.76 5.474 5.378 2.184 13.953 3.49 20.644.306 28.012 1.528 56.266-1.306 84.123-3.32 5.96-11.545 2.75-16.93 3.98-29.258.455-58.764 1.68-87.87-1.198-5.94-3.334-2.737-11.54-3.967-16.924-.453-29.26-1.685-58.773 1.202-87.88 3.333-5.94 11.52-2.69 16.892-4.012 12.296-.42 24.602-.454 36.904-.492z"}]]]))
(def alignment
(html
[:svg

View file

@ -131,7 +131,12 @@
{:alt "Grid (Ctrl + G)"
:class (when (contains? flags :grid) "selected")
:on-click (partial toggle :grid)}
i/grid]]
i/grid]
[:li.tooltip.tooltip-bottom
{:alt "Snap to grid"
:class (when (contains? flags :grid) "selected")
:on-click (partial toggle :grid)}
i/grid-snap]]
;; [:li.tooltip.tooltip-bottom
;; {:alt "Align (Ctrl + A)"}
;; i/alignment]]