yushiro / svg-edit

Automatically exported from code.google.com/p/svg-edit
MIT License
0 stars 0 forks source link

Live Updates to Dimensions #336

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Create a rectangle
2. Select it
3. Move it around

It would be nice if the x,y attributes in the contextual panel are updated
_AS YOU DRAG_.

NOTE: This is currently problematic because we temporarily use translation
transforms while we drag.

Original issue reported on code.google.com by codedr...@gmail.com on 19 Nov 2009 at 9:44

GoogleCodeExporter commented 9 years ago
It's not entirely impossible though - just means transforming the x,y point by 
its
current transformation matrix.

Original comment by codedr...@gmail.com on 3 Jan 2010 at 7:56

GoogleCodeExporter commented 9 years ago

Original comment by codedr...@gmail.com on 11 Jan 2010 at 11:14

GoogleCodeExporter commented 9 years ago

Original comment by codedr...@gmail.com on 29 Mar 2010 at 3:23

GoogleCodeExporter commented 9 years ago
Fixed in r1940, indeed transforming using its matrix. Code could probably be 
optimized though, as it currently jumps through quite a few hoops to accomplish 
this.

Original comment by adeve...@gmail.com on 27 Jan 2011 at 2:27

GoogleCodeExporter commented 9 years ago
Looks great.  For rect x,y...

Still need:

  - rect width, height
  - circle/ellipse cx,cy,rx,ry
  - line x1,y1,x2,y2

Original comment by codedr...@gmail.com on 27 Jan 2011 at 10:18

GoogleCodeExporter commented 9 years ago
But you only asked for the x,y attributes! :D

Okay okay, will take care of the rest.

Original comment by adeve...@gmail.com on 28 Jan 2011 at 2:30

GoogleCodeExporter commented 9 years ago
Actually I'm afraid this may not be as easy as it initially seemed...I see now 
that the x,y values are wrong on rotated rects (though can't quite tell why), 
and for other values we really need to run the math from recalculateDimensions 
and remapElement to get the same values. Is that really worth doing, do you 
think? 

We'd have to either rewrite the functions to be able to get the new attribute 
values without applying them / removing the transform, or we could create a 
dummy element and get the values from there, but to do so on each mousemove 
would seem like a bad idea. 

What do you think? Right now I'm thinking I may just undo what I've done here 
and maybe revisit for 2.7...

Original comment by adeve...@gmail.com on 28 Jan 2011 at 3:48

GoogleCodeExporter commented 9 years ago
I'm cool with that plan - thanks for the attempt though

Original comment by codedr...@gmail.com on 28 Jan 2011 at 3:58

GoogleCodeExporter commented 9 years ago
Alright, undone in r1944.

Original comment by adeve...@gmail.com on 28 Jan 2011 at 4:11

GoogleCodeExporter commented 9 years ago

Original comment by bret...@gmail.com on 7 Apr 2014 at 3:38

GoogleCodeExporter commented 9 years ago

Original comment by bret...@gmail.com on 7 Apr 2014 at 3:40