redraphael icon indicating copy to clipboard operation
redraphael copied to clipboard

Followers not in sync with the leader's updates.

Open AyanGhatak opened this issue 8 years ago • 3 comments

Create a text, e.g. t = paper.text().attr({x:100,y:100, text: "Ayan", 'text-bound': ["#ff0000","#00ff00",2,5,10]});

Now keep on applying for a repeated times

t.attr({transform: 't10,10'});

After some transformations, text although remains intact, the bounding-box(i.e. the text-bound) gets shifted with no capping.

AyanGhatak avatar May 18 '16 13:05 AyanGhatak

Creating a PR for the same.

AyanGhatak avatar May 18 '16 13:05 AyanGhatak

Extending the issue:

In the text created and stored under the variable named 't' in above comment, doing the operations:

  • t.show()
  • t.hide()
  • t.rotate(deg, cx, cy)
  • t.scale(sx, sy, cx, cy)
  • t.translate(dx, dy)

do not update the text-bounding rectangular element. So it should be internally managed by the graphics engine RedRaphael that if the element has follower element, operating on the leader element should ideally be followed by its followers.

AyanGhatak avatar May 20 '16 04:05 AyanGhatak

Creating a PR for the extension of the issue discussed in the above comment.

AyanGhatak avatar May 20 '16 04:05 AyanGhatak