drag

Drag a WPF Form around the desktop

耗尽温柔 提交于 2019-12-21 07:20:15
问题 i am trying to make a c# WPF form where i can drag it around the screen by clicking on it and moving with the mouse. the forms characteristics include being completely transparent and containing only one image. This being said the window style is none and it is not displayed in the taskbar. So essentially all you can see when the app is running is a little image - and ideally i want to be able to drag it around the desktop if i click and hold the left mouse button and move it about. Does

Android Drag onto screen layout

微笑、不失礼 提交于 2019-12-21 06:01:29
问题 How would you recreate the drag onto screen layout/effect similar to the one on some android home screen devices? Specifically there is a bar at the top of the home screen and that you can put your finger on and drag down. When you drag it another screen comes down from the top of the screen. On my phone this screen has shortcust to wifi, bluetooth, gps, etc.. 回答1: You want to use a slidingdrawer control. Here is a tutorial: http://android-journey.blogspot.com/2009/12/android-viewflipper-and

D3 force layout: making pan on drag (zoom) smoother

懵懂的女人 提交于 2019-12-21 04:16:11
问题 I've got a d3.js static force layout graph that can get rather big (sometimes parts of it are clipped), so I'd like to let the user pan the whole graph by dragging. I don't think I need dragging of individual nodes, I've got a feeling that's just going to be confusing, but would like to make it possible to show the parts of the graph that are clipped by the svg boundaries. I've got a minimal example at http://bl.ocks.org/3811811 which uses visF.append("rect") .attr("class", "background")

Drag & Drop - DataTransfer object

十年热恋 提交于 2019-12-21 04:12:23
问题 I'm building a simple drag n' drop uploader and I'm wondering why I can't see the file(s) I drop when I console.log(e) (DragEvent) and look at the DragEvent.dataTransfer.files it shows up empty, but... if I console.log(e.dataTransfer.files) it will show the dropped file(s). //CODE <!DOCTYPE html> <html> <head> <script> document.addEventListener("DOMContentLoaded", init); function init(){ var dropbox = document.getElementById('dropbox'); dropbox.addEventListener('dragover', drag.over); dropbox

How to create the drag and slide effect from this website?

六月ゝ 毕业季﹏ 提交于 2019-12-20 14:06:02
问题 If you drag and release quickly from the horizontal menu, the menu will auto slide for a distance. It seems to slide more the faster you drag and release. Source ->appear.dk How do i achieve this effect? Has it got to do with some complex formulaes? 回答1: This technique is called kinetic scrolling (you simulate kinetic energy). Since the dawn of the iphone this technique has been hyped, though it can be used on mobile devices with great benefit, I would refrain from using it inside a website

jQuery drag and draw

这一生的挚爱 提交于 2019-12-20 09:53:01
问题 I'm trying to build a jQuery plugin that allows you to drag and draw a rectangle (or a div with a border) but I'm not sure how to do it. I don't know of any that currently have this ability so I don't know where to look for an example of how to do this. How can I implement drag and draw in jQuery? 回答1: The basics for something like this are quite simple, when you think about it: Listen for mousedown events on some container (possible the entire document); Place an absolutely positioned

When dragging an Imageview goes outside the screen

China☆狼群 提交于 2019-12-20 04:30:36
问题 I want to implement a movable imageView when it is drag. The dragging is working perfectly alright. But when i drag to the end , the imageView goes out of the screen. How can i make the movable of the imageview only inside the screen ? This is my OnTouch listerner : public boolean onTouch(View view, MotionEvent event) { switch (event.getActionMasked()) { case MotionEvent.ACTION_DOWN: dX = view.getX() - event.getRawX(); dY = view.getY() - event.getRawY(); lastAction = MotionEvent.ACTION_DOWN;

Drag rectangle on JFrame in Java

雨燕双飞 提交于 2019-12-20 03:50:28
问题 I want to draw rectangle based on mousedrag event. if user dragging the mouse, then the rectangle on the applet should increase or decrease basing on current mouse coordinates. i have the following code. in the following code i am using SelectionArea class which extends a canvas on which i am performing drawing operation. i am using image variable in this class for double buffering to reduce flickering and to save the applet's previous state(i.e drawing content of applet) but the code is

Dragable objects in WPF in an ItemsControl?

血红的双手。 提交于 2019-12-19 03:39:55
问题 I want to be able to implement an ItemsControl with dragable items. The reason for the ItemsControl is so I can bind to my ViewModel in the background. I've tried using a Thumb Control in a canvas and it works perfect, except as soon as I stick it in an ItemsControl it stops working. Here is what I tried: <ItemsControl ItemsSource="{Binding MyItems}"> <ItemsControl.ItemTemplate> <DataTemplate> <Thumb Canvas.Left="0" Canvas.Top="0" Width="50" Height="50" DragDelta="MyThumb_DragDelta"/> <

Drag and drop cross domains, iframes, browsers windows

℡╲_俬逩灬. 提交于 2019-12-19 03:13:39
问题 Thanks stackoverflow i solved a lot of my javascript problems, but now i stopped at the point without hope. It is hard to describe, there is clear video shows my problem with drag drop cross-domains iframe. http://www.youtube.com/watch?v=v65mO27h75E First part in Iceweasel (and FF, Opera) = iframe d&d work OK. Second part in Chromium (and Chrome) = iframe d&d NOT work. and there are links to example iframes set and iframes sources: parent page: http:// msdrop.com/msdrop-jquery-test-iframe