Opened 9 years ago
Closed 5 years ago
#15296 closed enhancement (patchwelcome)
[patch][ccla]Add shape to group at a given child position
Reported by: | Richard Fairhurst | Owned by: | Eric Durocher |
---|---|---|---|
Priority: | undecided | Milestone: | 1.13 |
Component: | DojoX GFX | Version: | 1.7.2 |
Keywords: | Cc: | cjolif, Eugene Lazutkin | |
Blocked By: | Blocking: |
Description
At present the support for reordering objects is fairly basic - moveToFront and moveToBack. It would be good to be able to insert into Groups at a given position, a la Node.insertBefore.
This could perhaps be implemented as an optional second parameter to .add - i.e. group.add(shape [,position]).
I'm a novice with Dojo but happy to have a go at working up a patch if this would be considered useful.
Attachments (2)
Change History (13)
comment:1 Changed 9 years ago by
Owner: | changed from Eugene Lazutkin to Patrick Ruzand |
---|---|
Status: | new → assigned |
comment:2 Changed 8 years ago by
Cc: | cjolif added |
---|
Changed 8 years ago by
Attachment: | 15296.patch added |
---|
comment:3 Changed 8 years ago by
Summary: | Add shape to group at a given child position → [patch][ccla]Add shape to group at a given child position |
---|
comment:4 Changed 8 years ago by
This patch proposes the following API:
Group.insertAfter(/*Shape*/ newShape, /*Shape*/ after) Inserts the specified shape after the given shape in the list of children.
Group.insertBefore(/*Shape*/ newShape, /*Shape*/ before) Inserts the specified shape before the given shape in the list of children.
Shape.moveAfter(/*Shape*/ after) moves this shape after the specified shape in its parent's list of shapes.
Shape.moveBefore(/*Shape*/ before) moves this shape before the specified shape in its parent's list of shapes
comment:5 Changed 8 years ago by
Milestone: | tbd → 1.9 |
---|
comment:6 Changed 8 years ago by
Cc: | Eugene Lazutkin added |
---|
comment:7 Changed 8 years ago by
Add a new patch, with better code factorization. The proposed API is still the same.
comment:8 Changed 8 years ago by
Hmm, insertBefore(shape, after)
?
Nevertheless all my objections to the proposed API for the previous version of this patch still stand. Obviously I cannot force you to rewrite the patch, and we can always remove it in 2.0.
comment:10 Changed 8 years ago by
Owner: | changed from Patrick Ruzand to Eric Durocher |
---|
comment:11 Changed 5 years ago by
Milestone: | future → 1.12 |
---|---|
Resolution: | → patchwelcome |
Status: | assigned → closed |
Given that no one has shown interest in creating a patch in the past 3+ years, I'm closing this as patchwelcome.
Possible patch (by pruzand, IBM, CCLA)