Merge branch 'test' of https://git.code.tencent.com/lian-cbtc/jl-client into test
This commit is contained in:
commit
1dfa8f5b19
@ -57,16 +57,17 @@ export default class ELines extends Group {
|
||||
const triangleB = new JTriangle(startPointB, endPointB);
|
||||
let lineDirect = 1;
|
||||
if (triangleA.getRotation() > 0) { lineDirect = -1; } else { lineDirect = 1; }
|
||||
const new1Point1 = {x:startPointA.x - lineDirect * offset * triangleA.getSinRate(), y:startPointA.y - offset * triangleA.getCosRate()};
|
||||
const new1Point2 = {x:startPointA.x + lineDirect * offset * triangleA.getSinRate(), y:startPointA.y + offset * triangleA.getCosRate()};
|
||||
const new2Point1 = {x:endPointA.x - lineDirect * offset * triangleA.getSinRate(), y:endPointA.y - offset * triangleA.getCosRate()};
|
||||
const new2Point2 = {x:endPointA.x + lineDirect * offset * triangleA.getSinRate(), y:endPointA.y + offset * triangleA.getCosRate()};
|
||||
// - offset * triangleA.getCosRate()
|
||||
const new1Point1 = {x:startPointA.x - lineDirect * offset / triangleA.getSinRate(), y:startPointA.y };
|
||||
const new1Point2 = {x:startPointA.x + lineDirect * offset / triangleA.getSinRate(), y:startPointA.y};
|
||||
const new2Point1 = {x:endPointA.x - lineDirect * offset / triangleA.getSinRate(), y:endPointA.y };
|
||||
const new2Point2 = {x:endPointA.x + lineDirect * offset / triangleA.getSinRate(), y:endPointA.y};
|
||||
|
||||
if (triangleB.getRotation() > 0) { lineDirect = -1; } else { lineDirect = 1; }
|
||||
const new3Point1 = {x:startPointB.x + lineDirect * offset * triangleB.getSinRate(), y:startPointB.y + offset * triangleB.getCosRate()};
|
||||
const new3Point2 = {x:startPointB.x - lineDirect * offset * triangleB.getSinRate(), y:startPointB.y - offset * triangleB.getCosRate()};
|
||||
const new4Point1 = {x:endPointB.x + lineDirect * offset * triangleB.getSinRate(), y:endPointB.y + offset * triangleB.getCosRate()};
|
||||
const new4Point2 = {x:endPointB.x - lineDirect * offset * triangleB.getSinRate(), y:endPointB.y - offset * triangleB.getCosRate()};
|
||||
const new3Point1 = {x:startPointB.x + lineDirect * offset / triangleB.getSinRate(), y:startPointB.y};
|
||||
const new3Point2 = {x:startPointB.x - lineDirect * offset / triangleB.getSinRate(), y:startPointB.y};
|
||||
const new4Point1 = {x:endPointB.x + lineDirect * offset / triangleB.getSinRate(), y:endPointB.y};
|
||||
const new4Point2 = {x:endPointB.x - lineDirect * offset / triangleB.getSinRate(), y:endPointB.y};
|
||||
// getCosRate
|
||||
// getSinRate
|
||||
const point1 = segmentsIntr(new1Point1, new2Point1, new3Point2, new4Point2);
|
||||
|
Loading…
Reference in New Issue
Block a user