draggable

Java - visually drag a swing element

╄→гoц情女王★ 提交于 2019-12-30 07:48:22
问题 Is there a similar solution to http://allen-sauer.com/com.allen_sauer.gwt.dnd.demo.DragDropDemo/DragDropDemo.html#PaletteExample but for normal Java applications, i.e. allowing gui elements to be dragged around on a canvas? Thanks 回答1: Yes, it's possible. No it's not trivial. You'll want to become farmiluar with the code D'n'D API How to drag and drop with Java 2, Part 1 You may like to have a read through Smooth JList Drop Target Animation Smooth Tree Drop Animation My Drag Image is Better

What are the best light-weight solutions for Drag and Drop?

拜拜、爱过 提交于 2019-12-30 03:29:05
问题 I love and use jQuery quite a lot, but I am hoping to find an alternate solution for a special project. I am creating a bookmarklet which will interface with my application to allow users to enter information much quicker. One of the greatest pains in my application at the moment is uploading images. Users (understandly) hate the process of downloading images to their computers in an organized fashion, and then uploading them to the app. What I would love the bookmarklet to do is load in a

Uncaught TypeError: $(…).draggable is not a function [duplicate]

痴心易碎 提交于 2019-12-29 08:47:08
问题 This question already has answers here : jQuery UI - Draggable is not a function? (16 answers) Closed 3 years ago . hello everyone i am trying to make some divs draggable and i have managed to do that with jquery-ui. i also have a script that removes 2 divs and combine them in a single one (like if they have been merged together) but when i call the draggable function on the new "merged" div i get the error is the title... so what is the problem ? how is it possible that .draggable function

day6爬取京东

与世无争的帅哥 提交于 2019-12-29 02:44:47
''' Xpath语法 ''' from selenium import webdriver driver = webdriver.Chrome() try: # 隐式等待:卸载get请求前面 driver.implicitly_wait(10) driver.get('https://doc.scrapy.org/en/latest/_static/selectors-sample1.html') ''' <html> <head> <base href='http://example.com/' /> <title>Example website</title> </head> <body> <div id='images'> <a href='image1.html'>Name: My image 1 <br /><img src='image1_thumb.jpg' /></a> <a href='image2.html'>Name: My image 2 <br /><img src='image2_thumb.jpg' /></a> <a href='image3.html'>Name: My image 3 <br /><img src='image3_thumb.jpg' /></a> <a href='image4.html'>Name: My image 4

Restrict jQuery draggable items from overlapping/colliding with sibling elements

ぃ、小莉子 提交于 2019-12-28 02:06:32
问题 I need to use jQuery UI to restrict the containment area for draggable object with some additional restriction. I need prevent the draggable element from overlapping with other elements within the same container. I need to allow movement in "moveInHere" area but not "butNotHere" area. Is it possible? <div id="moveInHere"> <div id="dragMe"> </div> <div id="butNotHere"> </div> </div> <script type="text/javascript"> $("#dragMe").draggable({ containment: "#moveInHere" }); </script> 回答1: Edit: New

jQuery UI - Draggable is not a function?

前提是你 提交于 2019-12-27 23:35:55
问题 I've trying to use the draggable effect on some divs on a page, but whenever I load the page, I get the error message: Error: $(".draggable").draggable is not a function I've had a look around it seemed other people were having this problem as they had not included the jQuery UI javascript file, but I definitely have. The following is within the head tag of my page: <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.1/jquery.min.js" type="text/javascript"></script> <script src="http

Moveable/draggable <div>

三世轮回 提交于 2019-12-27 16:41:17
问题 This is my updated and modified script, it works completely, except I would like to universalize it... observe the **** how can I make it so that I don't have to do function(e){BOX.Draggable.elemen = e.target || e.srcElement; elementDraggable(e); everytime I need to use the dragable function for a different element? window.onload = addListeners; var BOX = function(){ return{ Draggable: function(){} }; }(); function addListeners(){ document.getElementById('div').addEventListener('contextmenu',

Moveable/draggable <div>

*爱你&永不变心* 提交于 2019-12-27 16:40:13
问题 This is my updated and modified script, it works completely, except I would like to universalize it... observe the **** how can I make it so that I don't have to do function(e){BOX.Draggable.elemen = e.target || e.srcElement; elementDraggable(e); everytime I need to use the dragable function for a different element? window.onload = addListeners; var BOX = function(){ return{ Draggable: function(){} }; }(); function addListeners(){ document.getElementById('div').addEventListener('contextmenu',

Dragging Item With Icon Following Pointer Unity C# [duplicate]

依然范特西╮ 提交于 2019-12-25 17:55:11
问题 This question already has answers here : Unity3D UI, calculation for position dragging an item? (3 answers) Closed 3 years ago . How To Dragging Item With Icon Following Pointer ? MAYBE IT WILL TAKE SOME TIMES TO SEE ALL THE CODE. Many thanks Before for your attention. But I have done a little Code Before. And it is run successful, but there is some mistake in my code. Actually the icon dragging is following the pointer but it just temporary. And my prediction is because i make an paging

simple jQuery draggable implemention without jQuery-UI - how to turn off?

有些话、适合烂在心里 提交于 2019-12-25 08:58:26
问题 I'm customizing a simplified "draggable" function available here: Draggable without jQuery-UI, and this is what I have so far: $.fn.extend({ canDragMe: function(){ return this.each(function() { var $this = $(this); $this = $(this); return $this.css('cursor', opt.cursor).on("mousedown", function(e) { var $drag = $this.addClass('draggable'); drg_h = $drag.outerHeight(), drg_w = $drag.outerWidth(), pos_y = $drag.offset().top + drg_h - e.pageY, pos_x = $drag.offset().left + drg_w - e.pageX; $drag