Opened 9 years ago

Closed 4 years ago

#11487 closed defect (patchwelcome)

Unwanted padding in Dnd Avatar from a tree

Reported by: Eric Pasquier Owned by: Eugene Lazutkin
Priority: high Milestone: 1.13
Component: DnD Version: 1.5
Keywords: dnd avatar tree Cc:
Blocked By: Blocking:

Description

When dragging from a tree, the avatar is created from the current node. When using a tree, the current node have a large padding-left value depending on tree level. This padding value should be reset when creating the Dnd Avatar to avoid a huge blank area on the left.

Suggested change :

dojo.dnd.Avatar (file dojo/dnd/Avatar.js)
// methods
construct: function(){
- - -
node.id = "";
dojo.style(node, "padding", "0"); //<-- added
tr = dojo.create("tr", null, b);
td = dojo.create("td", null, tr);
td.appendChild(node);
- - -

A change also need to be done in themes to display avatars correctly in some situations:

Common.css (files dijit/themes/xxxxx/Common.js)  xxxxx=soria,tundra,...
.soria table.dojoDndAvatar {- - -; width:auto;}
.soria .dojoDndAvatar img { display: inline; }

Change History (11)

comment:1 Changed 9 years ago by Eric Pasquier

Do you need more information ? Eric.

comment:2 Changed 9 years ago by Eric Pasquier

Please find below a drawing with the explanation of the problem :

http://www.bepconcept.com/Dojo_report/avatar.png

If you do not have time to correct it, can you please tell me the procedure to make the correction for the next release (I already signed the CLA) ?

Thanks, Eric.

comment:3 Changed 9 years ago by Eugene Lazutkin

Milestone: tbd1.6
Status: newassigned

comment:4 Changed 9 years ago by Eric Pasquier

Hi Eugene, Is it possible to have a feedback for this problem ? Thanks, Eric

comment:5 Changed 9 years ago by bill

Milestone: 1.61.7

comment:6 Changed 8 years ago by Chris Mitchell

Milestone: 1.71.8

comment:7 in reply to:  4 Changed 7 years ago by Eugene Lazutkin

Replying to Eric P:

Is it possible to have a feedback for this problem ?

I plan to test and commit before 1.8.

comment:8 Changed 7 years ago by Colin Snover

Milestone: 1.82.0

1.8 is frozen. Move all enhancements to next release. If you need an exemption from the freeze for this ticket, contact me immediately.

comment:9 Changed 7 years ago by bill

Milestone: 2.01.8
Summary: Enhancement in Dnd Avatar from a treeUnwanted padding in Dnd Avatar from a tree
Type: enhancementdefect

This isn't really an enhancement, it's just a bug fix to how avatars look.

PS: if there was a way for each source to specify it's own avatar, then Tree could solve this problem itself... but AFAICT the only way to override the avatar method is to override it for every Source.

Last edited 7 years ago by bill (previous) (diff)

comment:10 Changed 7 years ago by Colin Snover

Milestone: 1.82.0

1.8 has been tagged; moving all outstanding tickets to next major release milestone.

comment:11 Changed 4 years ago by dylan

Milestone: 2.01.12
Resolution: patchwelcome
Status: assignedclosed

Given that no one has shown interest in creating a patch in the past 5+ years, I'm closing this as patchwelcome.

Note: See TracTickets for help on using tickets.