PDA

View Full Version : [OPEN] [FIXED-EXTJSIV-407] Can't drag sprites



johanhaest
28 Mar 2011, 1:55 AM
Currently it's not possible to drag individual sprites within one surface.
In RaphaŽl this was possible (http://raphaeljs.com/graffle.html). And since the developer of RaphaŽl is part of Sencha it thought it would be in ExtJS4.

Is this intended or is this still being implemented?
Currently it's only possible to drag a whole surface around.

LesJ
7 Apr 2011, 2:39 PM
Please clarify if this feature will be implemented for the final release.

Jamie Avins
7 Apr 2011, 7:11 PM
We're trying to implement at least cursory support for this. The current DD Manager isn't really equipped to handle this type of functionality.

steffenk
8 Apr 2011, 2:22 AM
Jamie, look to this thread:
http://www.sencha.com/forum/showthread.php?128281-Ext.draw.*-Playground

We already managed DD (without using the DD manager)
It should be not that complicate as it's simular to normal DOM DD

Cursor is only css property, should be no problem.

Just a usecase: how cool would it be to use a chart for data manipulation like it's done here:
http://raphaeljs.com/ichart.html

vadimv
12 Jul 2012, 3:52 AM
is this feature working in 4.1.1 ? , I've setupped draggable to true to a sprite but its d&d is not working, I see that in SpriteDD class program's cursor enters only in getRegion function, I see the cursor but dragging is not working.

vadimv
12 Jul 2012, 5:13 AM
ook, works but only if sprite is added after the surface rendering and 'viewbox' is not used/true, otherwise an error is occurring in initDraggable call stack method because of undefined surface element. So for others who will look as I did, below I post the working code, and not working code:


//working.
var chrome = Ext.create('Ext.draw.Component', {
//viewBox: true,
gradients: [{
id: 'blackblue',
angle: 90,
stops: {
0: {
color: 'rgb(33, 33, 33)'
},
100: {
color: 'rgb(156, 178, 248)'
}
}
}],
listeners: {
'afterrender' : function(){
this.surface.add({
type: 'path',
path: 'M,162.7...............,z',
fill: 'url(#blackblue)',
draggable: true
});
}
}
});



//not working, when sprite is added, surface element is missing inside applyZindex, and seems that is not created too.

var chrome = Ext.create('Ext.draw.Component', {
//viewBox: true,
gradients: [{
id: 'blackblue',
angle: 90,
stops: {
0: {
color: 'rgb(33, 33, 33)'
},
100: {
color: 'rgb(156, 178, 248)'
}
}
}],
items: [{
type: 'path',
path: 'M,162.7.......',
fill: 'url(#blackblue)',
draggable: true
}] });