draggable

D3 remove circle on dbclick

谁说我不能喝 提交于 2019-12-11 07:06:14
问题 I am using Bostock's Circle Dragging I and Will's D3 Mouse Event so i can click on svg and create a circle and also they are all draggable. That is working, although there is a side issue if I double click when creating a circle sometimes dragging circles causes them to jump around. But the main issue is that I would like to be able to double click on a circle and have it disappear but also remove it from the data. When circles are drawn I added a dbclick event which calls a function function

Trouble with dragged revert at multiple block movement

拥有回忆 提交于 2019-12-11 07:05:03
问题 At the following link : http://probl.frizi.net/ i'm trying to set variable size and position blocks. The colored blocks need to stay within the gray big block. Anyhow I'm trying to keep the colored blocks inside, they tend (at second movement) to deform or to go on a different possition as they started. Revert method is not working as it should or I didn't implemented it correctly. Till far, I'm trying to do the following (please rightclick and see the Jquery source on the page): var item; $(

Make jQuery-ui draggable handle cover entire page

帅比萌擦擦* 提交于 2019-12-11 07:02:28
问题 What would be the best way to make an element draggable when clicking anywhere in the window? Would I have to use a container <div> that covers the whole window? I tried making the body draggable but that didn't work. The problem with using a container <div> is that it moves and therefore doesn't cover the whole of the screen any more after it has been dragged. What about making a really vast container <div> that spans a large number of pixels in every direction so you would never get to the

Jquery draggables: Removing an element changes position of other dropped elements

落爺英雄遲暮 提交于 2019-12-11 06:57:29
问题 When elements are placed / dropped (by dragging from one DIV to another) and then removing one in the dropped DIV, some of them are changing the position. Here is a test scenario: http://jsfiddle.net/TcYHW/8/ And the main code: <div id="dropwin"></div> <div id="dragables"> <div id="d1" class="d"></div> <div id="d2" class="d"></div> <div id="d3" class="d"></div> <div id="d4" class="d"></div> </div> $(".d").draggable({ containment: '#dropwin', stack: '#dragables div', cursor: 'move', }); How

JqueryUI Draggable not working in IE?

≯℡__Kan透↙ 提交于 2019-12-11 06:55:54
问题 I'm using JQueryUI to help with the moveable items on this page: http://www.hiredavewaring.com If you scroll down, you'll see the png's that you can grab and move over my face to create a Mr. PotatoHead type effect. I know it's not the prettiest code in the world, but it is working great on every browser, except Internet Explorer. Does anyone know a fix to help these items become draggable in IE? Here's the code without the Google Analytics or Meta: <link rel="stylesheet" type="text/css" href

dragging objects in processing

徘徊边缘 提交于 2019-12-11 06:34:22
问题 I am having an issue implementing Daniel Shiffman's awesome dragging example into my sketch. I have used it before and it is great, however I am attempting to use it with some "fancy" for looping to apply it to multiple objects(in this case text) but to no avail. Everything works correctly except for the objects don't drag when they should. Logically, this makes since because the offsetX and offsetY properties in the Line class continue to update thus forcing the object to remain stationary.

Jquery event for breaking draggable containment

五迷三道 提交于 2019-12-11 06:24:15
问题 I want to add a callback for when a draggable item breaks it's containment. I have this function: function makeDraggable(){ $( ".draggable" ).draggable({ containment: "parent" , grid: [ 25, 25 ] }); } Is there a simple way to achieve this, without using collision detection? If not, how would I go about doing the collision detection? 回答1: You can check the 4 corners of the element when it is dropped against the 4 corners of another element to see if any of the corners are inside that element

One handed draggable clock with Raphael - cannot get mouse click position

断了今生、忘了曾经 提交于 2019-12-11 06:07:32
问题 i followed this tutorial to build a one handed clock <!-- language: lang-js --> window.onload = function(){ var canvas = Raphael("pane",0,0,500,500); canvas.circle(200,150,100).attr("stroke-width",2); canvas.circle(200,150,3).attr("fill","#000"); var angleplus = 360,rad = Math.PI / 180, cx = 200,cy =150 ,r = 85, startangle = -90,angle=15,x,y, endangle; for(i=1;i<=24;i++) { endangle = startangle + angle ; x = cx + r * Math.cos(endangle * rad); y = cy + r * Math.sin(endangle * rad); canvas.text

datasource mapping doesn't work when droppable is in nested dataList

北城余情 提交于 2019-12-11 05:25:01
问题 This is the main view which contains the draggable items. In this view I have a ui:include for including a UI fragment that also has the drop area. mainView.xhtml <p:dataList id="outerList" var="varOuter" value="#{myVO.getOuterList()}"> <div> <span>#{varOuter.someVal}</span> </div> <p:dataList id="innerList" var="innerVar" value="#{myVO.getInnerList()}"> <div class="crew-list"> <h:form> <h:panelGroup id="draggableItem" layout="block"> <span>#{innerVar.someVal}</span> </h:panelGroup> <p

Resize draggable objects background image on resize

大城市里の小女人 提交于 2019-12-11 05:21:35
问题 This question is related to : Resizable, draggable object in jquery. Possible? Hello all, I want to resize the background image of a div on jquery resize. How can I do it? Thank you 回答1: You can't set the size of a CSS background-image. But maybe this http://www.cssplay.co.uk/layouts/background.html or this will help http://css-tricks.com/how-to-resizeable-background-image/ 回答2: Basically this would consist of a resizable container (I'd say div) with a non-static position (that'll happen