NorthwoodsSoftware / GoJS

JavaScript diagramming library for interactive flowcharts, org charts, design tools, planning tools, visual languages.
http://gojs.net
Other
7.8k stars 2.86k forks source link

gojs's brush flow on the curving line #76

Closed tom-ssy closed 5 years ago

tom-ssy commented 5 years ago

when gojs's brush flow on the curving line. the color is always show at two side,how can I resolve this question. I am from china. English is very not good. forgive me the code: let height = link.naturalBounds.height let width = link.naturalBounds.width let a1 = startPoint.x / width let a2 = startPoint.y / height let a3 = stopPoint.x / width let a4 = stopPoint.y / height let obj = { start: new go.Spot(a1, a2), end: new go.Spot(a3, a4) } shape.strokeMiterLimit = 1000 shape.stroke = $(go.Brush, 'Linear', {0: bigScreenConfig.MAIN_COLOR, 0.5: bigScreenConfig.MIDDLE_COLOR, 1: bigScreenConfig.MAIN_COLOR, ...obj})

tom-ssy commented 5 years ago

linkAnimation = window.requestAnimationFrame(updatelightDots)

tom-ssy commented 5 years ago

Obtuse angle is normal and acute angle is not normal

WalterNorthwoods commented 5 years ago

If you are not reporting a problem with the library or its documentation or samples, please use the forum to ask questions.

It would help if you include a small screenshot showing the problem and showing what you wanted instead. It would also help if you provide enough code for us to be able to reproduce the problem.