draggable

Jquery UI Draggable Snapping with margin

*爱你&永不变心* 提交于 2019-12-10 20:17:54
问题 I'm working on a project where users can customize their own dashboard page. This means they can drag components onto the page and position them as they like. To get a nicely layout page I want the components to snap to each other. At this moment I'm using the snap: true property, which will place the components right next to each other. However, I'd like to have some space in between the components after they snapped. So instead of snapping to the exact position of the other component, it

How to make html text box draggable and resizable using jQuery UI plugins?

一笑奈何 提交于 2019-12-10 16:54:25
问题 Using jquery ui draggable plugin, I've made html text box draggable in this way: <script type="text/javascript" language="javascript"> $(document).ready(function() { $("#Text1").draggable({ containment: "parent", cancel: null }); }); </script> <form id="form1" runat="server"> <div> <div id="dialog" title="Dialog Box" style="border: solid 1px black;"> <input id="Text1" type="text" style="width: 200px; height: 20px;" value="Text1" /> </div> </div> </form> But, how to make it resizable using

d3 v4 drag line chart with x and y axes

做~自己de王妃 提交于 2019-12-10 16:16:29
问题 I'm new to d3.js. I wanted to drag a line chart using its points. It is working fine without the x and y axes. I have used this example as reference: https://bl.ocks.org/mbostock/4342190 With the axes to the line chart the line is not plotting correcly. Please have a look into the snippet below. Thanks in advance. <!DOCTYPE html> <svg width="500" height="350"></svg> <script src="https://d3js.org/d3.v4.min.js"></script> <script> var svg = d3.select("svg"), margin = {top: 20, right: 20, bottom:

Make the rows of the datagrid draggable in GWT

ε祈祈猫儿з 提交于 2019-12-10 15:59:14
问题 I want to make a datagrid in which rows will be draggable so that a person can move rows up and down by dragging the rows. As row of the datagrid will be get as an element. I know how to make the widgets draggable, but how the rows of the datagrid can be made draggable? I don't want to use any extra plugin or library for achieving this. 回答1: The only library I know of that support drag&drop with(in) cell widgets is GwtQuery with droppable plugin, see their showcase. I suggest your to give it

jeditable accidentally triggering on Draggable on nested items

孤街浪徒 提交于 2019-12-10 15:22:04
问题 I'm using jquery-ui's draggable for drag-and-drop, and jeditable for inline editing. When I drag and drop an element that's also editable, right after it's dropped jeditable kicks in and pops into 'edit mode'. How can I disable this behavior? Edit - the problem happens because of netsting - see this example. I also added draggable to the mix to make the example more realistic (the actual real problem is in this site that I'm working on) Note - even though this question has an accepted answer

Making the whole ion-item in an ItemReorder draggable

点点圈 提交于 2019-12-10 14:24:27
问题 In my application I've got an ItemReorder as described in the docs: <ion-list reorder="true"> <ion-item *ngFor="let item of items">{{ item }}</ion-item> </ion-list> It works as intended, I can drag the ion-items by pointing at the reoder icon (see freehand circle): Testing with potential users on a tablet I found out, many users don't see the icon at first and/or try to drag the ion-item without pointing at the icon. They expect the whole ion-item to be draggable: How can I implement this?

Drag image change while drag over grid

喜你入骨 提交于 2019-12-10 13:58:22
问题 I'm creating an instance of my custom DragObject on StartDrag: procedure TForm1.GridStartDrag(Sender: TObject; var DragObject: TDragObject); begin DragObject := TMyDragControlObject.Create(Sender as TcxGridSite); end; Lately on another grid on DragOver: procedure TForm1.SecondGridDragOver(Sender, Source: TObject; X, Y: Integer; State: TDragState; var Accept: Boolean); begin Accept := False; if Source is TMyDragControlObject then with TMyDragControlObject(Source) do // using TcxGrid if

How can I drop an image to a container and then update the container based on what was dropped to it?

a 夏天 提交于 2019-12-10 13:57:08
问题 I'd like to be able to drag an image into one of two containers (container 1 and container 2). From there, depending on which container the image was dropped to, I'd like to update that container with a database call (or just update a row in one of my tables). I'd like to use http://jqueryui.com/demos/droppable/ to achieve this, but I'm not sure how to process the request, and how to get each container to listen for an event handler (dropping of the image). I've drawn a really bad diagram

Jquery draggable constrain using drag function

偶尔善良 提交于 2019-12-10 11:49:22
问题 I need to use jQuery draggable in quite a complicated geometrical shape, and it is not possible to calculate the frame beforehand. So, containment option isn't cut for solving this problem. I've been thinking about drag function, checking my condition and returning false to prevent dragging. But, the problem is, that after returning false from drag function for the first time, dragging process stops, as if user have released the mouse button. Any suggestions on preventing dragging out of the

Draggable toolbar

孤街醉人 提交于 2019-12-10 10:39:22
问题 how to make draggable/dockable toolbar with JFace/SWT like Eclipse has? Could you post a simple example of ApplicationWindow or link good source of how to make it. Thanks. 回答1: SWT has a component called CoolBar, You can create CoolBars fairly easily by using CoolBarManager, or you can manually use just them (API Doc) 回答2: In case that someone found this question I have prepared small example. My problem was in incorrect use of add method. You have to use add(IToolBarManager toolBarManager)