draggable

Drag and drop UIButton but limit to boundaries

白昼怎懂夜的黑 提交于 2020-01-01 19:53:03
问题 I’m not asking for givemesamplecodenow responses, just a nudge in the right direction would be much appreciated. My searches haven’t been any good. I have a UIButton that I am able to move freely around the screen. I would like to limit the drag area on this object so it can only be moved up and down or side to side. I believe I need to get the x,y coordinates of the boundaries and then restrict movement outside this area. But that’s a far as I have got. My knowledge doesn’t stretch any

A container that is sortable, droppable and draggable

倾然丶 夕夏残阳落幕 提交于 2020-01-01 17:27:28
问题 This question related to jQuery's UI. Can anybody provide an example the does the following: Container A is sortable and droppable Any element can be dragged into Container A and then sorted. Any element can be dragged out of Container A and then simply become draggable around the page. Container A is also draggable around the page This is what I have so far: $(function() { $("#sortable").sortable().droppable(); $("#sortable").disableSelection(); $("#drop").droppable({ accept: "#sortable li",

A container that is sortable, droppable and draggable

时光毁灭记忆、已成空白 提交于 2020-01-01 17:27:08
问题 This question related to jQuery's UI. Can anybody provide an example the does the following: Container A is sortable and droppable Any element can be dragged into Container A and then sorted. Any element can be dragged out of Container A and then simply become draggable around the page. Container A is also draggable around the page This is what I have so far: $(function() { $("#sortable").sortable().droppable(); $("#sortable").disableSelection(); $("#drop").droppable({ accept: "#sortable li",

jQuery-UI Draggable and Sortable

本秂侑毒 提交于 2020-01-01 15:41:03
问题 So I've been working with this example: http://jqueryui.com/demos/draggable/#sortable and I've accomplished it on my product. However I want to make two significant changes. I don't want the second list(toList in my example) to be sortable on it's own. I only want it to accept items from the first list(fromList in my example). When a user drags an item from the first list(fromList) and drops it into the second list(toList) I want that item to be forced to the bottom. Suggestions? Here is a

jQuery-UI Draggable and Sortable

杀马特。学长 韩版系。学妹 提交于 2020-01-01 15:40:57
问题 So I've been working with this example: http://jqueryui.com/demos/draggable/#sortable and I've accomplished it on my product. However I want to make two significant changes. I don't want the second list(toList in my example) to be sortable on it's own. I only want it to accept items from the first list(fromList in my example). When a user drags an item from the first list(fromList) and drops it into the second list(toList) I want that item to be forced to the bottom. Suggestions? Here is a

jQuery UI Multiple Droppable - drag whole div element & clone

Deadly 提交于 2020-01-01 15:09:31
问题 I've just started using jQuery UI to drag divs into a columns in a table. I have a couple different draggable divs with different background-colors and text inside them, and I need them to be able to dragged up to the drop area as a clone. This worked fine by using jQuery UI's example shopping cart code, but I've edited it so the whole object is dragged instead of just the text, but this then eliminates the clone functionality for some reason, even though I have helper:clone. Here is my code:

jQuery UI Draggable Constraint

北城余情 提交于 2020-01-01 11:40:36
问题 what I am trying to do is have an large image contained within a smaller div that the user can drag around within the containing div (easy enough)... similar to http://oneblackbear.com/draggable/index.html but I want to prevent users from dragging it any further then the container boundary. With the above example the user can drag the image completely outside of the containing div... I want to prevent the user from ever dragging the image outside of the parent div at all. I have tried using

jQuery ui.draggable event/status on revert

旧城冷巷雨未停 提交于 2020-01-01 06:10:11
问题 Is there a way to get information if an element that's draggable is reverted? I'm stuck on this. I want to make an element droppable again, but only if the draggable that was lying there is moved elsewhere (meaning doesn't revert). 回答1: Doesn't looks like jQuery UI has support for it so you could add it yourself like this: $.ui.draggable.prototype._mouseStop = function(event) { //If we are using droppables, inform the manager about the drop var dropped = false; if ($.ui.ddmanager && !this

Draggable window with pyqt4

风流意气都作罢 提交于 2020-01-01 03:49:12
问题 just a simple question: I'm using pyqt4 to render a simple window. Here's the code, I post the whole thing so it easier to explain. from PyQt4 import QtGui, QtCore, Qt import time import math class FenixGui(QtGui.QWidget): def __init__(self): super(FenixGui, self).__init__() # setting layout type hboxlayout = QtGui.QHBoxLayout(self) self.setLayout(hboxlayout) # hiding title bar self.setWindowFlags(QtCore.Qt.FramelessWindowHint) # setting window size and position self.setGeometry(200, 200, 862

jQuery UI draggable/sortable/droppable disable drop when droppable limit is reached

家住魔仙堡 提交于 2019-12-31 04:45:09
问题 JS Bin demo Task: I'm creating an event scheduler using jQuery UI. Events are of a certain length (in minutes) and they can be dragged into different days, each with their own maximum length (in minutes). In the example, each day's maximum length is 480 minutes, and no more than 480 minutes worth of "events" should be allowed to drop in. Problem: If the "event" will cause the "day" to exceed its maximum time length (based on the combined times of elements already dropped on it), that "day"