drag-and-drop

Drag & Drop not working properly on Retina iPad (createjs)

纵然是瞬间 提交于 2019-12-14 00:41:21
问题 I want to create a simple drag & drop exercise, but on the Retina iPad "drag & drop" is not working properly. Here is the code: var that = this; createjs.Touch.enable(stage); stage.enableMouseOver(10); function initPage() { var shape = new createjs.Shape(); shape.graphics.beginFill("#999999").drawRoundRect(100,100,140,60,8).endFill(); shape.on("mousedown", function(evt) { this.alpha = 0.8; this.offset = {x: this.x - evt.stageX, y: this.y - evt.stageY}; }); shape.on("pressmove", function(evt)

WPF DragDrop: Window.ShowModal() hangs Windows Explorer

拈花ヽ惹草 提交于 2019-12-13 22:06:47
问题 I have written code to allow dropping a file from Windows Explorer into a WPF application. In my drop event handler I launch a window which displays information about the dropped file. If I create this window using Window.ShowModally() then Windows Explorer will hang/freeze until the window in my app is closed. However, if I create the window using Window.Show() this problem does not occur. Unfortunately, I require this window to be shown modally. Presumably the Windows Explorer thread is

jQuery UI dragging, update target element

情到浓时终转凉″ 提交于 2019-12-13 21:07:45
问题 I am trying to develop a page that will allow users to drag an element(like a DIV) to another DIV. Once the dragged element is over the target div and the user lets go of the mouse, the target div should have something happen to it. For example it should change colour and have some text inserted into it. So basically what I want is for some how to know that the element has been dropped on the target div so that I can manipulated the target div however I want. Here is my jsfiddle prototype.

how to drag and drop a copy of another drag-n-dropped image using html5?

假装没事ソ 提交于 2019-12-13 20:30:31
问题 I have an implementation of using drag and drop for upload purposes using examples from http://robertnyman.com/html5/fileapi-upload/fileapi-upload.html This is what it looks like when it works. Before drag and drop: http://cl.ly/image/0c3f1m0M2K2D After drag and drop: http://cl.ly/image/0Z131N333n0L The droparea is a div that I call dropArea. Now the problem is out of the supposed 4 images I have drag-n-dropped, I then wished to select two of them to be of a special status. For eg, I want to

Java: mouseDragged and moving around in a graphical interface

落花浮王杯 提交于 2019-12-13 20:22:58
问题 newbie programmer here. I'm making a program that renders user-inputted equations in a Cartesian coordinate system. At the moment I'm having some issues with letting the user move the view around freely in the coordinate. Currently with mouseDragged the user can drag the view around a bit, but once the user releases the mouse and tries to move the view again the origin snaps back to the current position of the mouse cursor. What is the best way to let the user move around freely? Thanks in

RCP e4 buttons group D&D

∥☆過路亽.° 提交于 2019-12-13 19:33:32
问题 I want to implement the Drag and Drop that you can do with the buttons group on eclipse (positioned on the toolbar). The purpose is allowing to drag them to the sides of the main window. it's possible? 来源: https://stackoverflow.com/questions/31385417/rcp-e4-buttons-group-dd

c# drag drop DataObject

旧时模样 提交于 2019-12-13 19:26:48
问题 Im using C# 2.0 and i have created an explorer tree that i can drag information from into a windows form. right now, when i drag from the treeview that im using, it performs DoDragDrop(selectedpath, DragDropEffects.Copy); When i catch the event in my mainform, it is listed as a string. I am able to make this work but i want it to perform the same way that it does if i were to drag a file from my windows explorer window which is as follows Array name = (Array)e.Data.GetData(DataFormats

Drag & Drop in canvas

♀尐吖头ヾ 提交于 2019-12-13 18:25:59
问题 I created a tree with canvas like this: and source code is fiddle here. <div id="ways" style="width:1000px;margin:0 auto;height:100%;"> <canvas id="canvas" width="1000" height="1000"></canvas> </div> I clicked first circle(ltr) and now that circle content is "X" and too when click on 5th circle become content to "X". And now I want when I click on first circle,then highlight the adjacent circle(s) i.e. 2th and 4th circles.Namely this x character just go to one of two and when clicked adjacent

WPF - Drag & Drop on Listbox ITEM

我是研究僧i 提交于 2019-12-13 18:22:19
问题 I want to drop something not on the whole ListBox, but on a specific ListBoxItem. I'm handling the ListBox' Drop event - how can I find out, on which item the mouse is pointing? 回答1: if (e.Data.GetDataPresent(typeof(Songs))) { var result = VisualTreeHelper.HitTest(myCanvas, Mouse.GetPosition(this.Playlists)); } If using a canvas, try performing your hittest relative to the Canvas (replace "myCanvas" with the reference) 回答2: I managed to solve this now by setting AllowDrop and the Drop event

Resize a draggable fill with EaselJS

我的梦境 提交于 2019-12-13 18:04:33
问题 I've got a project where I'm using EaselJS to create a fill (rectangle) and text over it inside a container. My objective is to make this rectangle and text draggable to move it over the canvas. This is already done and working well. My problem is when I try to resize the rectangle using scaleX and scaleY using a onMouseOver handler. This is indeed done, BUT the rectangle just moves away from it's initial point to some other location... I've read I need to use the regX and regY properties to