-
Notifications
You must be signed in to change notification settings - Fork 95
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Arrow shapes - fixes #40 #42
base: master
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -665,6 +665,25 @@ | |
.newMockElement.note .editableArea, .mockElement.note .editableArea{ | ||
padding:0.5em; | ||
} | ||
|
||
.newMockElement.boxarrow { | ||
display: inline-block; | ||
} | ||
.newMockElement.boxarrow, .mockElement.boxarrow { | ||
width: 50px; | ||
height: 50px; | ||
background-color: transparent; | ||
} | ||
.newMockElement.boxarrow > svg, .mockElement.boxarrow > svg { | ||
width: 100%; | ||
height: 100%; | ||
} | ||
.newMockElement.boxarrow > .editableArea, .mockElement.boxarrow > .editableArea { | ||
display: none; | ||
} | ||
svg.hideme { | ||
height: 0; | ||
} | ||
</style> | ||
</head> | ||
|
||
|
@@ -918,6 +937,37 @@ <h1 class="editableArea">Headline1</h1> | |
</div> | ||
</div> | ||
</li> | ||
|
||
<li title="arrow"> | ||
<div class="newMockElement boxarrow"> | ||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100" preserveAspectRatio="none"> | ||
<path d="M0,0 Q25,75 100 100" marker-start="url(#arrowstart)" stroke="black" fill="none" stroke-width="2"/> | ||
</svg> | ||
</div> | ||
<div class="newMockElement boxarrow"> | ||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100" preserveAspectRatio="none"> | ||
<path d="M0,0 Q75,25 100 100" marker-end="url(#arrowend)" stroke="black" fill="none" stroke-width="2"/> | ||
</svg> | ||
</div> | ||
</li> | ||
<li title="arrow"> | ||
<div class="newMockElement boxarrow"> | ||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100" preserveAspectRatio="none"> | ||
<path d="M100,0 Q25,25 0 100" marker-start="url(#arrowstart)" stroke="black" fill="none" stroke-width="2"/> | ||
</svg> | ||
</div> | ||
<div class="newMockElement boxarrow"> | ||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100" preserveAspectRatio="none"> | ||
<path d="M100,0 Q75,75 0 100" marker-end="url(#arrowend)" stroke="black" fill="none" stroke-width="2"/> | ||
</svg> | ||
</div> | ||
</li> | ||
<svg class="hideme" xmlns="http://www.w3.org/2000/svg"> | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. would the change work without this hidden element? It is probably hard to reason about this, since it is hard to know where it belongs to and what it does. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The arrow SVGs reference the 2 marker tags inside the I apply the I hope this helps explain my reasoning! ??? |
||
<defs> | ||
<marker id="arrowstart" viewBox="0 -5 10 10" refX="0" refY="0" markerWidth="8" markerHeight="8" orient="auto"><path d="M10,-5L0,0L10,5"/></marker> | ||
<marker id="arrowend" viewBox="0 -5 10 10" refX="10" refY="0" markerWidth="8" markerHeight="8" orient="auto"><path d="M0,-5L10,0L0,5"/></marker> | ||
</defs> | ||
</svg> | ||
</ul> | ||
</div> | ||
|
||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would it be possible to have one element (
div
) in oneli
? – that would be consistent with the rest of the MockElementsThere was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It is, but because they're narrow and there's 4 of them, it just looked a lot lot better to have 2 side by side.