draggable

Remember position and size in a cookie

陌路散爱 提交于 2019-12-24 09:54:23
问题 I have no idea what is to do. Please help. I have built a website with draggable scaleable items on a page. You can see what I've done here... http://www.hagueandhague.co.uk/test/hagueandhague/httpdocs/index.html It uses java script from... http://ajax.googleapis.com/ajax/libs/jqueryui/1.7.2/jquery-ui.js What I need the site to do is remember the position and scale of the items so that when visitors return to the site the items are where they left them. I believe it is possible to store this

Draggable AND clickable pushpin in silverlight bing map

情到浓时终转凉″ 提交于 2019-12-24 06:43:09
问题 I'm trying to create a pushpin in a Silverlight Bing Map that is both draggable as well as clickable. I found some code here http://pietschsoft.com/post/2010/05/30/Draggable-Pushpins-using-Bing-Maps-Silverlight-Control.aspx to achieve the draggable part. I've mapped mouseclick on the map to drop a pin. However, the problem (and this exists with the default pushpin as well) is that clicking on the pushpin seems to be handled by the map control first so I end up dropping another pin, instead of

Prevent draggable divs from being placed near eachother

£可爱£侵袭症+ 提交于 2019-12-24 06:07:34
问题 I'm using jQuery UI to make some pins which can be dragged & dropped onto a map. Each pin needs a certain amount of clear space from other pins (cannot be placed within about 30px of any other pin) which is shown with a dark halo around it during drag. At the moment the pins can be dragged above and placed on top of each other, whereas I'd like the pin being dragged to manoeuvre around any pins already placed, like so: Is there a simple/lightweight enough way to do that? Thanks in advance! $

Prevent draggable divs from being placed near eachother

ぃ、小莉子 提交于 2019-12-24 06:07:18
问题 I'm using jQuery UI to make some pins which can be dragged & dropped onto a map. Each pin needs a certain amount of clear space from other pins (cannot be placed within about 30px of any other pin) which is shown with a dark halo around it during drag. At the moment the pins can be dragged above and placed on top of each other, whereas I'd like the pin being dragged to manoeuvre around any pins already placed, like so: Is there a simple/lightweight enough way to do that? Thanks in advance! $

Issue with Drag and Drop API or?

落爺英雄遲暮 提交于 2019-12-24 05:53:25
问题 I'm encountering an issue with the HTML5 Drag and Drop API. Long story short, there are three events other than dragstart , dragover , and drop , which are critical to my objective. Those three events are mousedown , mouseup , and mouseleave . onmousedown When the user triggers a mousedown event on a given element, the following function applies attributes and listeners to itself and the target element. function doThis() { d.setAttribute('draggable', true) d.addEventListener('dragstart',

jquery draggable stop event

我与影子孤独终老i 提交于 2019-12-24 05:28:09
问题 I have searched a lot of.But I can't find answer.Maybe dublicate.Here is a bit of my code: $(".box").draggable({ revert:"invalid", stop:function(ev,ui){ //if(dropped) alert(ui.item.attr("id"); //else alert("Not dropped"); } }); $(".box").droppable({ accept:function(drag){ return $(drag).attr("data-id")===$(this).attr("data-id"); }, drop:function(ev,ui){ } }); I have looked droppable options and draggable options.But it isn't helpfull.In other word how to access dropped element using draggable

apply a javascript function to draggable copy

狂风中的少年 提交于 2019-12-24 05:10:11
问题 I want to apply function called copie_contenue that change the div parent id on the copy I created after I dragged my original,but my script change the original not the copy I also tried ui.helper in the place of this but nothing happen $('#model_1').draggable({ connectToSortable:'#global_div', addClasses: false, helper:'clone', stop: function(e,ui) { $(this).replaceWith(copie_contenue("model_1")); } }) 回答1: To change the newly inserted item, you should use the sortable's receive event.

complex clipping boundary in kinetic.js with draggable image

谁说我不能喝 提交于 2019-12-24 04:11:30
问题 Check out my html5 based clipping constraint on http://shedlimited.debrucellc.com/test3/canvaskinclip.html (messing with jsfiddle on http://jsfiddle.net/aqaP7/4/) So, in html5 I can easily draw a shaped boundary like the following: context.beginPath(); context.moveTo(5, 5); context.lineTo(34, 202); context.lineTo(2, 405); context.lineTo(212, 385); context.lineTo(425, 405); context.lineTo(400, 202); context.lineTo(415, 10); context.lineTo(212, 25); context.clip(); In kinetic.js though, all I

How to make a window Draggable(C# Winforms)?

只谈情不闲聊 提交于 2019-12-24 03:24:10
问题 I have form. I have enabled the transparency on the form and I have removed it's Title Bar and Border. Inside that i have created a Custom UI, Which have the same features like a window. Basically, my idea is to create custom window. Everything is working as expected but only the windows dragging is not working. I am not sure how to enable it. I googled for this. But i didn't find any useful info for me. Please help me to implement this window dragging. 回答1: I've implemented this behavior by

How to Create a Draggable Line in HTML5 Canvas?

狂风中的少年 提交于 2019-12-23 17:25:24
问题 So if you draw a line on an HTML5 canvas, what is the best way to make it draggable onMouseDrag? I know you can do this very easily in SVG, but since the canvas is not as easy to work with, I would like to know a good solution to this. 回答1: Here's one way create draggable lines on html5 canvas. A Note about html5 canvas: You can't really move anything that has already been drawn on html5 canvas. Instead you simulate movement by clearing the canvas and redrawing everything in it's new position