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
Added bothSize function, lineHead and lineTail #165
Conversation
I'm concerned that this gives counterintuitive results all around, because the argument to I actually think it would make sense to specify the Second, aStyle = (with & arrowTail .~ dart' & tailSize .~ 0.6)
example = centerY $ vcat' (with & sep .~ 1)
[ arrowBetween' aStyle ((-1)^&0) (1^&0)
, arrowBetween' (aStyle & bothSize .~ 0.6) ((-1)^&0) (1^&0)
, arrowBetween' (aStyle & bothSize *~ 2) ((-1)^&0) (1^&0)
]
main = renderSVG "bothSize-test.svg" (Width 400) $ example <> square 3 |
The argument to |
@bergey There is a problem with redefining the semantics of |
Personally I would rather leave this until after the 1.1 release. I am not yet convinced we have settled on the best design, and it just creates a lot more work sticking in a new feature this late. We're getting really close with 1.1 and I'd like to get it out the door. |
That makes sense, especially since I'm out of town and won't be able to On Thu, Mar 6, 2014 at 5:09 PM, Brent Yorgey notifications@github.comwrote:
|
Looks good to me. We should be sure to add a description & examples to the arrow tutorial. |
Oh, the travis build is failing because of the redundant import of |
Added bothSize function, lineHead and lineTail
Never mind, I just removed the redundant import myself. |
I think this is ready to merge but there are two caveats.
arrowHead
andarrowTail
after usingbothSize
instead of before might give unintuitive results.bothSize
is still asymmetric since we use the arrowhead to calculate the width for both the head and tail. The only ways around it would be 1) to specify the width instead of the size, which is inconsistent with the rest of the API. Or 2) to provide 2 functionsbothSizeHead
andbothSizeTail
such thatbothSizeHead
is the currentbothSize
andbothSizeTail
bases the width on the arrow tail, which I think is unnecessarily complicated.