chenbo007 / svg-edit

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

Manipulate Poly Nodes (Path Editing Phase 2) #117

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
It should be possible to select one or more poly points and manipulate them:

1) selected poly points should be visibly different than non-selected points
2) should be able to delete any points selected
3) should be able to clone any point that is selected (generates a
zero-length path segment)

This will obviously require a poly_point contextual panel

Original issue reported on code.google.com by codedr...@gmail.com on 24 Aug 2009 at 8:36

GoogleCodeExporter commented 9 years ago
One thing which is a bit of a problem when editing the polyline nodes is that 
the
cursor is a cross with arrows, and is placed just above the node. So, in fact, 
it's
hard to see what you're doing with enough precision.

Once the selected node will be highlighted as mentionned in issue 118 (it is 
already
sometimes, but I couldn't figure exactly how :-) ), I think that then the cursor
should be a normal arrow, which allows "more" precision and doesn't get on the 
node :-)

Original comment by worms_...@yahoo.com on 7 Sep 2009 at 4:21

GoogleCodeExporter commented 9 years ago
I've started to think about this, and the more I do the more I come to realize 
that
it should be the SEGMENTS that you can select and will have a context panel.  
You
will still be able to drag the endpoints of a segment as you can today, but 
it's the
segment itself that will be selected.

In the segment context panel for this Issue, I would say:

- only one segment at a time can be selected, it needs to be visibly 
highlighted as
well as its endpoints
- a Delete button will be present - if this is the last segment, it will delete 
the
poly completely
- a Clone button will be present - if clicked, this will literally clone the 
segment
(since we store segments using relative positioning, this shouldn't be a 
problem)

Original comment by codedr...@gmail.com on 13 Sep 2009 at 4:41

GoogleCodeExporter commented 9 years ago
I've added the ability to select a single node in r763. While I agree that 
segment
selection should be an option too, I think it makes sense to still be able to 
select
nodes and delete/clone them. So that's what I'll start with right now, while 
keeping
segment-selection in mind for later.

Original comment by adeve...@gmail.com on 5 Oct 2009 at 2:00

GoogleCodeExporter commented 9 years ago
Yeah i'm fully on board with point manipulation now.  I haven't tried your 
update from this morning but 
I'm excited :)

Original comment by codedr...@gmail.com on 5 Oct 2009 at 2:35

GoogleCodeExporter commented 9 years ago
Nice! That's very handy!

One minor problem I see is with open polylines, but that's related to issue 
118#c28 I
guess.

Original comment by worms_...@yahoo.com on 5 Oct 2009 at 2:38

GoogleCodeExporter commented 9 years ago
Thanks guys! Deleting nodes is now possible as of r765. There's at least one bug
related to this where under certain conditions the control line does not move 
with
its grip after a node has been deleted, but I've haven't been able to figure 
out when
exactly that happens. If you can reproduce it, please let me know the steps.

Original comment by adeve...@gmail.com on 5 Oct 2009 at 7:13

GoogleCodeExporter commented 9 years ago
r774 now takes care of cloning nodes (splits the adjacent segment in two). I've 
also 
improved the code here and there to make sure the bug in comment 6 doesn't 
occur.

One major issue unfortunately is that cloning/deleting nodes causes problems 
and can 
even crash Webkit browsers. :( I've more or less discovered the cause, but 
finding a 
solution may be tricky.

So all that's left now is fixing the remaining Webkit, non-closed polys, and 
rotation bugs.

Original comment by adeve...@gmail.com on 7 Oct 2009 at 4:12

GoogleCodeExporter commented 9 years ago
Oops, some zoom bugs left on node-cloning too.

Original comment by adeve...@gmail.com on 7 Oct 2009 at 4:48

GoogleCodeExporter commented 9 years ago
Fixed zoom and non-closed poly bugs in r775.

Remaining: Rotation and Webkit issues. Ugh.

Original comment by adeve...@gmail.com on 7 Oct 2009 at 6:57

GoogleCodeExporter commented 9 years ago
I am not sure if this belongs to issue 117 or issue 118 or if it should be filed
under a new "enhancement request" issue, but would it be possible to have 
something
which would show all the grips (handles) of a polyline at once? 

I often get confused and click on the wrong node to get the grips, which 
results in
getting a previously curved segment flat again, so I have to Undo, etc.

Showing (optionally?) the grips for all the segments would avoid that and would 
be
cooooollllll :-) (If possible)

Original comment by worms_...@yahoo.com on 7 Oct 2009 at 7:16

GoogleCodeExporter commented 9 years ago
Related to issue 117 comment 6: Wow. I like being able to clone/delete nodes! 
Thank you!

Original comment by worms_...@yahoo.com on 7 Oct 2009 at 7:23

GoogleCodeExporter commented 9 years ago
Related to comment #10: I just realized that AFTER having shown the grips, 
clicking
on the polyline shows them all at once. So my question applies to BEFORE 
editing the
segment, just after creating a polyline.

It should definitely be optionnal, because sometimes you might went to keep some
segments straight, but still see their grips, and "extracting" the grips would 
change
all segments to random curves, which is not the desired effect.

(I hope I'm clear :-) In fact, maybe my question is: 
right after creating a poly and entering the editing mode, would it be possible 
to
show all the possible grips, but NOT change segments to curves?

It would just be an aid. The current behavior is OK too. 

Original comment by worms_...@yahoo.com on 7 Oct 2009 at 7:35

GoogleCodeExporter commented 9 years ago
There is a little problem when you try to delete the first or last node of an 
open
poly. Not sure what the "right" behavior should be, though.
I like being able to add a node to a remaining "single" node.

Original comment by worms_...@yahoo.com on 7 Oct 2009 at 8:04

GoogleCodeExporter commented 9 years ago
I think I know what you mean in comment #12, I definitely agree there needs to 
be a
clearer way to know which segment will become curve/straight by double-clicking 
(or
another method). I'd like to have the future ability to clearly have one segment
selected that can then change type.

In regards to showing control grips even when segments are still straight, I'm 
not
sure. Technically they don't HAVE control points (since it's just a straight 
line),
so pretending they have them would be tricky to do (and possibly confusing)

Also thanks for the bug mentioned in comment #13, forgot about that one. :)

Original comment by adeve...@gmail.com on 7 Oct 2009 at 8:11

GoogleCodeExporter commented 9 years ago
Maybe this is for codedread :) 
Could we get rid (at least temporarily) of the green/red mark to a "certain" 
node,
which actually means nothing right now and tends to be confusing - "if it's 
there, it
must mean something, but what" ? 

Original comment by worms_...@yahoo.com on 7 Oct 2009 at 9:07

GoogleCodeExporter commented 9 years ago
After editing a polyline and moving its handles, the colorpicker is broken in 
two ways:

A) - Edit the nodes of a polyline and stay in edit mode
- Click on the colorpicker in the bottom bar
---> Colorpicker is unusable (has unpredictable results, can crash or hover the 
CPU...)

B) After filing a polyline which has edited segments with a color from the
colorpicker, you can't add new elements to the drawing

Original comment by worms_...@yahoo.com on 8 Oct 2009 at 11:32

GoogleCodeExporter commented 9 years ago
Is there already a way to select several nodes instead of just one, like it was
implied in issue17#c1 ? (just asking because I didn't find a way)

Original comment by worms_...@yahoo.com on 8 Oct 2009 at 12:03

GoogleCodeExporter commented 9 years ago
Closing this issue since it seems to work happily now.

Some notes on recent comments:
 #16: Since nodes/segment are being edited, color picking can be confusing. 
Interface could be handled better though, and should be done in version 2.5.
 #17: Not yet, but planned for future.

Original comment by adeve...@gmail.com on 12 Oct 2009 at 8:22