Feature: allow to move and snap to a layer, fix #2120

This commit is contained in:
Pieter Vander Vennet 2024-09-04 00:07:23 +02:00
parent eb89427bfc
commit fdedb75954
34 changed files with 824 additions and 301 deletions

View file

@ -1065,6 +1065,14 @@
"https://phabricator.wikimedia.org/diffusion/GOJU/browse/master/AUTHORS.txt"
]
},
{
"path": "snap.svg",
"license": "CC0-1.0",
"authors": [
"Pieter Vander Vennet"
],
"sources": []
},
{
"path": "speech_bubble.svg",
"license": "CC-BY-4.0",
@ -1203,6 +1211,14 @@
],
"sources": []
},
{
"path": "unsnap.svg",
"license": "CC0-1.0",
"authors": [
"Pieter Vander Vennet"
],
"sources": []
},
{
"path": "wikidata.svg",
"license": "LOGO",

84
assets/svg/snap.svg Normal file
View file

@ -0,0 +1,84 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!-- Created with Inkscape (http://www.inkscape.org/) -->
<svg
width="120"
height="120"
viewBox="0 0 120 120"
version="1.1"
id="svg1"
xml:space="preserve"
inkscape:version="1.3.2 (1:1.3.2+202311252150+091e20ef0f)"
sodipodi:docname="snap.svg"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns="http://www.w3.org/2000/svg"
xmlns:svg="http://www.w3.org/2000/svg"><sodipodi:namedview
id="namedview1"
pagecolor="#ffffff"
bordercolor="#999999"
borderopacity="1"
inkscape:showpageshadow="2"
inkscape:pageopacity="0"
inkscape:pagecheckerboard="0"
inkscape:deskcolor="#d1d1d1"
inkscape:document-units="px"
showguides="true"
inkscape:zoom="4.5168066"
inkscape:cx="40.51535"
inkscape:cy="42.39721"
inkscape:window-width="1920"
inkscape:window-height="995"
inkscape:window-x="0"
inkscape:window-y="0"
inkscape:window-maximized="1"
inkscape:current-layer="layer1"><sodipodi:guide
position="315.49944,61.936443"
orientation="0,-1"
id="guide2"
inkscape:locked="false" /></sodipodi:namedview><defs
id="defs1" /><g
inkscape:label="Layer 1"
inkscape:groupmode="layer"
id="layer1"
transform="translate(-5,-5)"><path
id="path1-2"
style="fill:#808080;fill-opacity:1;stroke-width:3.93092"
d="m 72.294942,72.07284 c 0.948679,-0.909931 1.380066,-2.234124 1.148907,-3.527969 L 69.995854,51.284128 C 69.614243,49.146951 67.469637,47.282834 65.914649,48.798037 L 59.882054,54.677556 44.886208,39.828561 c -1.383257,-1.369713 -3.807955,-0.909932 -4.298111,-0.288099 -1.707154,2.165786 -0.138139,3.968458 0.177549,4.304093 l 14.45874,15.372473 -6.032604,5.879513 c -1.554665,1.51554 0.253754,3.707343 2.380393,4.143751 l 17.16644,3.89041 c 1.287478,0.264342 2.622313,-0.132882 3.556328,-1.057866 z"
sodipodi:nodetypes="cccccsssccccc" /><g
id="g8" /><g
id="g10"
transform="rotate(-175.99037,61.199753,60.156378)"><g
id="path1"
inkscape:transform-center-x="1.8238832"
inkscape:transform-center-y="31.570993"><path
style="color:#000000;fill:#000000;stroke-linecap:round;-inkscape-stroke:none"
d="M 10,90 45,10"
id="path3" /><path
id="path4"
style="color:#000000;fill:#000009;stroke-linecap:round;-inkscape-stroke:none"
d="M 45.097656,5.0019531 A 5,5 0 0 0 43.177734,5.34375 5,5 0 0 0 40.419922,7.9960938 L 35.865234,18.40625 c 3.405007,0.669609 6.469474,2.331825 8.867188,4.679688 L 49.580078,12.003906 A 5,5 0 0 0 47.003906,5.4199219 5,5 0 0 0 45.097656,5.0019531 Z M 22.177734,49.691406 5.4199219,87.996094 a 5,5 0 0 0 2.5761719,6.583984 5,5 0 0 0 6.5839842,-2.576172 L 31.621094,53.052734 c -3.513941,-0.175553 -6.76611,-1.396873 -9.44336,-3.361328 z" /></g><path
style="fill:#000000;fill-opacity:1;stroke:#000000;stroke-width:0;stroke-linecap:round;stroke-opacity:1"
id="path9"
sodipodi:type="arc"
sodipodi:cx="32.616085"
sodipodi:cy="35.55938"
sodipodi:rx="12.741771"
sodipodi:ry="12.741771"
sodipodi:start="0"
sodipodi:end="6.26046"
sodipodi:open="true"
sodipodi:arc-type="arc"
d="M 45.357856,35.55938 A 12.741771,12.741771 0 0 1 32.688475,48.300945 12.741771,12.741771 0 0 1 19.875137,35.704157 12.741771,12.741771 0 0 1 32.398925,22.81946 12.741771,12.741771 0 0 1 45.354566,35.269844" /></g><path
style="fill:#808080;fill-opacity:1;stroke:#000000;stroke-width:0;stroke-linecap:round;stroke-opacity:1"
id="path10"
sodipodi:type="arc"
sodipodi:cx="26.067774"
sodipodi:cy="26.136267"
sodipodi:rx="12.741771"
sodipodi:ry="12.741771"
sodipodi:start="0"
sodipodi:end="6.26046"
sodipodi:open="true"
sodipodi:arc-type="arc"
d="M 38.809545,26.136267 A 12.741771,12.741771 0 0 1 26.140164,38.877832 12.741771,12.741771 0 0 1 13.326826,26.281044 12.741771,12.741771 0 0 1 25.850614,13.396347 12.741771,12.741771 0 0 1 38.806255,25.846731" /></g></svg>

After

Width:  |  Height:  |  Size: 4.2 KiB

View file

@ -0,0 +1,2 @@
SPDX-FileCopyrightText: Pieter Vander Vennet
SPDX-License-Identifier: CC0-1.0

83
assets/svg/unsnap.svg Normal file
View file

@ -0,0 +1,83 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!-- Created with Inkscape (http://www.inkscape.org/) -->
<svg
width="120"
height="120"
viewBox="0 0 120 120"
version="1.1"
id="svg1"
xml:space="preserve"
inkscape:version="1.3.2 (1:1.3.2+202311252150+091e20ef0f)"
sodipodi:docname="unsnap.svg"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns="http://www.w3.org/2000/svg"
xmlns:svg="http://www.w3.org/2000/svg"><sodipodi:namedview
id="namedview1"
pagecolor="#ffffff"
bordercolor="#999999"
borderopacity="1"
inkscape:showpageshadow="2"
inkscape:pageopacity="0"
inkscape:pagecheckerboard="0"
inkscape:deskcolor="#d1d1d1"
inkscape:document-units="px"
showguides="true"
inkscape:zoom="4.5168066"
inkscape:cx="51.695815"
inkscape:cy="69.186048"
inkscape:window-width="1920"
inkscape:window-height="995"
inkscape:window-x="0"
inkscape:window-y="0"
inkscape:window-maximized="1"
inkscape:current-layer="layer1"><sodipodi:guide
position="315.49944,61.936443"
orientation="0,-1"
id="guide2"
inkscape:locked="false" /></sodipodi:namedview><defs
id="defs1" /><g
inkscape:label="Layer 1"
inkscape:groupmode="layer"
id="layer1"
transform="translate(-5,-5)"><path
id="path1-2"
style="fill:#000000;fill-opacity:1;stroke-width:3.93092"
d="m 91.670867,40.074491 c 0.948679,0.909931 1.380066,2.234124 1.148907,3.527969 l -3.447995,17.260743 c -0.381611,2.137177 -2.526217,4.001294 -4.081205,2.486091 L 79.257979,57.469775 64.262133,72.31877 c -1.383257,1.369713 -3.807955,0.909932 -4.298111,0.288099 -1.707154,-2.165786 -0.138139,-3.968458 0.177549,-4.304093 L 74.600311,52.930303 68.567707,47.05079 c -1.554665,-1.51554 0.253754,-3.707343 2.380393,-4.143751 l 17.16644,-3.89041 c 1.287478,-0.264342 2.622313,0.132882 3.556328,1.057866 z"
sodipodi:nodetypes="cccccsssccccc" /><g
id="g8"
transform="matrix(-1,0,0,1,132.686,0)" /><g
id="g10"
transform="matrix(0.99755231,-0.06992414,-0.06992414,-0.99755231,14.642674,124.44485)"><path
style="color:#000000;fill:#000000;stroke-linecap:round;-inkscape-stroke:none"
d="M 10,90 45,10"
id="path3" /><path
id="path4"
style="color:#000000;fill:#808080;stroke-linecap:round;-inkscape-stroke:none;stroke:none;stroke-opacity:1;fill-opacity:1"
d="M 45.097656,5.0019531 A 5,5 0 0 0 43.177734,5.34375 5,5 0 0 0 40.419922,7.9960938 L 35.865234,18.40625 c 3.405007,0.669609 6.469474,2.331825 8.867188,4.679688 L 49.580078,12.003906 A 5,5 0 0 0 47.003906,5.4199219 5,5 0 0 0 45.097656,5.0019531 Z M 22.177734,49.691406 5.4199219,87.996094 a 5,5 0 0 0 2.5761719,6.583984 5,5 0 0 0 6.5839842,-2.576172 L 31.621094,53.052734 c -3.513941,-0.175553 -6.76611,-1.396873 -9.44336,-3.361328 z" /><path
style="fill:#808080;fill-opacity:1;stroke:#000000;stroke-width:0;stroke-linecap:round;stroke-opacity:1"
id="path9"
sodipodi:type="arc"
sodipodi:cx="32.616085"
sodipodi:cy="35.55938"
sodipodi:rx="12.741771"
sodipodi:ry="12.741771"
sodipodi:start="0"
sodipodi:end="6.26046"
sodipodi:open="true"
sodipodi:arc-type="arc"
d="M 45.357856,35.55938 A 12.741771,12.741771 0 0 1 32.688475,48.300945 12.741771,12.741771 0 0 1 19.875137,35.704157 12.741771,12.741771 0 0 1 32.398925,22.81946 12.741771,12.741771 0 0 1 45.354566,35.269844" /></g><path
style="fill:#000000;fill-opacity:1;stroke:#000000;stroke-width:0;stroke-linecap:round;stroke-opacity:1"
id="path10"
sodipodi:type="arc"
sodipodi:cx="-106.61823"
sodipodi:cy="26.136267"
sodipodi:rx="12.741771"
sodipodi:ry="12.741771"
sodipodi:start="0"
sodipodi:end="6.26046"
sodipodi:open="true"
sodipodi:arc-type="arc"
d="m -93.876462,26.136267 a 12.741771,12.741771 0 0 1 -12.669378,12.741565 12.741771,12.741771 0 0 1 -12.81334,-12.596788 12.741771,12.741771 0 0 1 12.52379,-12.884697 12.741771,12.741771 0 0 1 12.955638,12.450384"
transform="scale(-1,1)" /></g></svg>

After

Width:  |  Height:  |  Size: 4.2 KiB

View file

@ -0,0 +1,2 @@
SPDX-FileCopyrightText: Pieter Vander Vennet
SPDX-License-Identifier: CC0