Closed davelandry closed 6 years ago
I found a brick wall in d3plus-shape, so I'm testing in d3plus-text 😃
I mean, I disabled .rotate()
in d3plus/shape: https://github.com/d3plus/d3plus-shape/blob/master/src/Shape/Shape.js#L467, and the results are:
So, I think that I can discard an issue related directly with d3plus-shape
.
It's probably related to not only the rotate
of TextBox but also the rotateAnchor. I drew a little diagram to make sure we're on the same page:
This diagram would have the rotate
of the Shape set to 45
I was experimenting and I think that the problem is related with rotateAnchor
and rotate(angle, cx, cy)
in d3plus-text
. I hope to have news ASAP.
Expected Behavior
When rotating a shape, the labels should rotate with it.
Current Behavior
Currently, as a shape rotates away from 0, the vertical alignment of the label becomes misaligned. Here is the code inside of
Shape.js
which sets the label rotation: https://github.com/d3plus/d3plus-shape/blob/master/src/Shape/Shape.js#L435-L439This might actually be an issue with
d3plus-text
, so maybe test it there if you're hitting a brick wall.Steps to Reproduce (for bugs)
https://jsfiddle.net/nfd9bo8q/54/