Closed GoogleCodeExporter closed 8 years ago
i've been asked about this before. we'd need to be clear on what "20px from
the start of the connection" means. is it travel along the path inscribed by
the connector?
Original comment by simon.po...@gmail.com
on 12 Mar 2012 at 9:54
20px from the start is independent of the length of the connector.
Original comment by j.verdur...@2bmore.nl
on 12 Mar 2012 at 9:58
but i agree that calculating "20px from the start of the connection" for a
Bezier connector is difficult (and maybe not needed).
I just need a overlay which is on the same place on the connector, independent
of the connector length. How the 20px is calculated, and if it's accurate, is
not that important.
Original comment by j.verdur...@2bmore.nl
on 12 Mar 2012 at 10:00
Yes but is it 20px along the path inscribed by the connector. Or is it just
20px away from the start of the lone.
Original comment by simon.po...@gmail.com
on 12 Mar 2012 at 10:01
Dunno, I think the first. But is not that important as long as it is
independent of the connector length.
Original comment by j.verdur...@2bmore.nl
on 12 Mar 2012 at 10:12
It's the same for a car. The precise definition of a horsepower is not that
important for a customer, only that we can compare it with other cars and that
the scale is linear. The definition of one horsepower varies by country ;)
Original comment by j.verdur...@2bmore.nl
on 12 Mar 2012 at 10:14
Does it? I didn't know that.
Yeah what I was getting at was the bezier and state machine connectors - not as
straightforward as straight lines or flowchart. But jsBezier does have a
'pointAlongPathFrom' function which can provide the number we need.
I will see about getting this in to 1.3.8. It seems like a nice feature.
Original comment by simon.po...@gmail.com
on 12 Mar 2012 at 10:32
possible candidate for 1.3.10; wont make it into 1.3.9.
Original comment by simon.po...@gmail.com
on 23 May 2012 at 10:23
i've done the work for this now. it works like this:
- values greater than 1 or less than 0 are treated as absolute values, in
pixels, representing an amount of travel along the path inscribed by the
connector. negative values define a distance from the target of the connection.
- values provided as strings (without 'px' or 'pt' or whatever, just numbers)
are also treated as absolute values, in the same way. this pretty much just
caters for the case, possibly rare, that a user wishes to specify '1' or '-1'
pixels as an absolute offset.
- values between 0 and 1, inclusive, are still treated as a fraction of travel
along the entire path inscribed by the connector.
Original comment by simon.po...@gmail.com
on 22 Jun 2012 at 2:45
Original issue reported on code.google.com by
j.verdur...@2bmore.nl
on 12 Mar 2012 at 9:33Attachments: