风吹小机机 Posted December 4, 2020 Share Posted December 4, 2020 How to get the coordinates of a tree node by dragging it to the panel code TreeView01.ClientEvents.UniEvents.Values['beforeInit'] := ' function beforeInit(sender, config){' + ' config.viewConfig = {' + ' plugins: {' + ' ptype: ' + QuotedStr('treeviewdragdrop') + ',' + ' ddGroup: ''FieldDrag'',' + ' enableDrop: false' + ' }' + ' };' + ' }'; Panel01.ClientEvents.ExtEvents.Values['afterrender'] := 'function afterrender(sender, eOpts){' + ' var me = sender;' + ' me.dropTarget = Ext.create(''Ext.dd.DropTarget'', me.getEl(), {' + ' ddGroup: ''FieldDrag'',' + ' notifyDrop: function(source, evt, data) {' //Drag the tree node to the coordinates of the panel???? + ' ajaxRequest(me, ''dropped'', [''text='' + data.records[0].data.text,''id='' + data.records[0].data.id]);' + ' },' + ' notifyEnter: function() {' + ' }' + ' });' + ' }'; Quote Link to comment Share on other sites More sharing options...
风吹小机机 Posted December 4, 2020 Author Share Posted December 4, 2020 The coordinates created after dragging are all 0. What can I do to get its coordinates Quote Link to comment Share on other sites More sharing options...
风吹小机机 Posted December 7, 2020 Author Share Posted December 7, 2020 ask for help Quote Link to comment Share on other sites More sharing options...
Sherzod Posted December 7, 2020 Share Posted December 7, 2020 1 hour ago, 风吹小机机 said: ask for help Hello, Can you send us a simple test case? Quote Link to comment Share on other sites More sharing options...
风吹小机机 Posted December 8, 2020 Author Share Posted December 8, 2020 On 12/7/2020 at 12:57 PM, Sherzod said: Hello, Can you send us a simple test case? Sorry, I'm busy recently. I'll reply now For example, please check: DragDemo.rar Quote Link to comment Share on other sites More sharing options...
Sherzod Posted December 8, 2020 Share Posted December 8, 2020 36 minutes ago, 风吹小机机 said: DragDemo.rar 56.33 kB · 0 downloads evt.browserEvent.offsetX evt.browserEvent.offsetY Quote Link to comment Share on other sites More sharing options...
风吹小机机 Posted December 8, 2020 Author Share Posted December 8, 2020 1 hour ago, Sherzod said: evt.browserEvent.offsetX evt.browserEvent.offsetY Thank you very much. Finally it worked I can have a good sleep dragview.mp4 1 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.