Skip to content

Commit 86b8edb

Browse files
committed
fix: apply isDisplaySnapDigit to gap guidelines #200
1 parent e52efca commit 86b8edb

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

packages/react-moveable/src/App.css

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ img {
9191
position: absolute;
9292
top: 100px;
9393
left: 100px;
94-
display: none;
94+
/* display: none; */
9595
}
9696
.App svg * {
9797
transform-origin: 20% 50%;

packages/react-moveable/src/App.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -351,7 +351,7 @@ class App extends React.Component<any, any> {
351351
>
352352
Learn React
353353
</a>
354-
<svg data-target="svg" viewBox="0 0 150 110" style={{width: "300px", border: "1px solid #fff"}}>
354+
<svg data-target="svg" style={{width: "300px", border: "1px solid #fff"}}>
355355
<path data-target="path1" d="M 74 53.64101615137753 L 14.000000000000027 88.28203230275507 L 14 19 L 74 53.64101615137753 Z" fill="#f55" stroke-linejoin="round" stroke-width="8" opacity="1" stroke="#5f5" origin="50% 50%" />
356356
<path data-target="path2" d="M 84 68.64101615137753 L 24.00000000000003 103.28203230275507 L 24 34 L 84 68.64101615137753 Z" fill="#55f" stroke-linejoin="round" stroke-width="8" opacity="1" stroke="#333" origin="50% 50%" />
357357
<g style={{transform: "translate(40px, 10px)"}}>

packages/react-moveable/src/react-moveable/ables/Snappable.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1269,7 +1269,7 @@ function renderGapGuidelines(
12691269
"guideline",
12701270
"gap",
12711271
)}
1272-
data-size={snapSize}
1272+
data-size={snapSize > 0 ? snapSize : ""}
12731273
key={`${otherType}GapGuideline${i}`} style={{
12741274
[posName1]: `${renderPos[index]}px`,
12751275
[posName2]: `${renderPos[otherIndex]}px`,

0 commit comments

Comments
 (0)