Threaded View
-
29 Jul 2011 1:51 AM #1
Unanswered: Drag a draw component
Unanswered: Drag a draw component
I'm trying to give drag and drop capabilities to a draw component created with touch-charts.js. I have a simple code that draws a red rectangle but I fail to call Ext.util.Draggable which returns an error:
- "Uncaught TypeError: Cannot call method 'addCls' of null"
Is this possible with touch-charts.js?
Code:... onReady: function() { // Create a draw component var drawComponent = new Ext.draw.Component({ height: 400, width: 400, viewBox: false }); // Create a window to place the draw component in this.rootpanel = new Ext.Panel({ fullscreen:true, layout: 'fit', items: [drawComponent] }); var redRectangle = drawComponent.surface.add({ type: 'path', path: 'M 50 50 h 300 v 300 h -300 Z', fill: '#F44' }); redRectangle.animate({ duration: 1 }); new Ext.util.Draggable(redRectangle, { revert: true });
Thank you for reporting this bug. We will make it our priority to review this report.


Reply With Quote