similar to: Sanity check of my Draggable code

Displaying 20 results from an estimated 1000 matches similar to: "Sanity check of my Draggable code"

2006 Jan 26
0
cloneNode not draggable in IE
Here''s the problem: I have a div, id=mydiv, which I clone using: var clonedDiv = document.getElementById(''mydiv'').cloneNode(true); I then set the id to be mynewdiv: cloneDiv.id = "mynewdiv"; //not using setAttribute to accomodate IE I then remove the original div: Element.remove(document.getElementById(''mydiv'')); I then insert the new
2008 May 02
2
making an element draggable after it's been dropped in a drop zone
Hi, I have this code which allows me to drop a draggable item in to a droppable zone. It works fine but what i want to happen is once the item ( droppable) has been dropped in to the drop zone (dropp) for the item to be draggable again. At the moment once ive dropped the item in the drop zone i can''t make it draggable again.....even if i repeat this line: new
2005 Nov 11
0
A couple of draggable patches...
Hi all, I've just raised a ticket <http://dev.rubyonrails.com/ticket/2826> with a patch for enabling 'snapToGrid' feature for draggables. I'm writing a framework on top of scriptaculous and it appeared to me that this would be something that could belong to core Draggable objects. To activate, just add to draggable options on creation. (By default gridSize is set to 10)
2006 Apr 30
1
Draggable - how start action on start dragging and end action on droppping
Hi all. I have got situation that I made element draggable - and when element is dragged I want to start some action (e.g. shown AJAX indicator, and change one of CSS class in dragging element). What is the best way to achieve this? I search source code of the Draggable and I saw that there is 2 method: Draggable.initDrag and Draggable.endDrag so it looks like in initDrag method i should
2006 Feb 14
0
Another draggable/droppable performance booster
This one is as much for Thomas as for the rest of the list (might be a good one for the official build)... I made a change to the dragdrop.js file that significantly improves overall performance of dragging when there are more than one (or many more) droppables on the page. I modified the Draggables.updateDrag method, and added another method below it, and then in Draggable.updateDrag I
2006 Jan 30
0
Adding a handler for a pre-existing draggable
Is it possible to add a handler for an event to a draggable that already exists? That is, if I have in a Widget class: var Widget = Class.create(); Widget.prototype = { ... this.draggable = new Draggable(this.element); ... } and I create several Widgets, then later, I want to add a handler for the draggable.onDrag function, what''s the appropriate method to do so? Thanks in advance!
2005 Sep 01
1
FW: In-place editor inside a Draggable
I was able to do a cheap workaround By putting this: this.editField.focus(); at the end of the enterEditMode: function() this still does not allow highlighting with the mouse. Also if there are regular forms in a draggable the end user is screwed especially when using firefox. -----Original Message----- From: Stephen Major [mailto:smajor@gmail.com] Sent: Thursday, September 01, 2005 3:28 AM
2006 Jan 13
1
Capturing the position of a draggable element
I would like to capture the position of a draggable element after it''s being dragged, but I am running into problem using several options, such as "change", "revert" and "onEnd". My callback handler would only fire when the page loads, and not when the element is dragged. How can I make this happen? <html> <head> <script
2006 Mar 06
0
Problems with unregister draggable
hi! i am working on a tree which allows moving nodes/subtrees via drag&drop. since i am not a javascript expert i try to stick to the script.aculo.us library without modifying anything. the nodes are loaded dynamically from my rails-app and have a unique ID. when a node gets moved to another folder, it disappears at its original destination (via Element.remove()) and gets drawn as soon
2006 Jan 08
0
how-to: Draggable
Was looking up the scriptaculous site, but couldn''t find more information on how to use the change option: This is what it says: Callback Description change Called whenever the Draggable is moved by dragging. The called function gets the Draggable instance as its parameter. Could anybody please elaborate on how to use this? Another question: let''s say, I have
2005 Dec 16
0
Bug in script.aculo.us Draggable in 1.5
I have a Draggable object that contains a SELECT with some OPTION tags. When I select one of the OPTION tags, the entire Draggable acts as though it is being dragged. There is code in the Draggable object to stop this for Firefox: initDrag: function(event) { if(Event.isLeftClick(event)) { // abort on form elements, fixes a Firefox issue var src =
2007 Aug 23
0
Draggable on IE & Opera
Hi, all! Have anybody problems with draggable in IE and Opera. The problem is i''m creating simple draggable object like this: new Draggable(my_div); In firefox it works very fine. But in IE when I''m moving(dragging) cursor div is stalling and drags very slow. and in Opera it keeping tracks colored in color of the div. Is reason in browser or there is the bug in framework?
2008 Jul 01
0
Draggable item absolutely positioned inside relative div
Actually, it''s a bit more complicated than that... I have a div (we''ll call it the "portal") of a fixed size and absolute positioning, with an overflow: scroll set. Inside, I have a container div with relative positioning. This inner container has a series of absolutely-positioned elements which are draggable with a vertical constraint. The height of the container is
2006 Feb 24
2
declaring draggable object that holds it position
Hi i posted this question earlier on how to create a droppable div(New to Ajax), and i have just realised that my code does work, however the function doesn''t work the way I expected it to, I would like my draggable to remain where it was dropped, currently I have a draggable div and a droppable div. I would like to try create a puzzle type game which has a set amount of droppables and an
2006 Jan 30
0
Draggable with auto-scroll
Thomas, I''m mostly writing this to you. A couple weeks ago I grabbed the latest SVN version of dragdrop.js because I needed the auto-scroll functionality. I just fixed something in that script that wasn''t working correctly and thought you might want to hear about it. You may have already caught it since I grabbed the script but here it is anyway. In the updateDrag() function
2006 Jun 20
1
Simple draggable
I just download 1.6 and tried doing a simple draggable , but it doesn''t work. Firefox console / evaluate : Error: uncaught exception: [Exception... "Component returned failure code: 0x80070057 (NS_ERROR_ILLEGAL_VALUE) [nsIWebNavigation.loadURI]" nsresult: "0x80070057 (NS_ERROR_ILLEGAL_VALUE)" location: "JS frame :: chrome://global/content/viewSource.js ::
2005 Oct 17
1
Passing a draggable element''s attributes to controller on drop
I''ve browsed the list and noticed a few similar questions in the archive about maintaining the position of a draggable element after dropping it ... but I couldn''t find any conclusion about the problem. Has there been anyone found or implemented a solution? Or does prototype still need to be extended to allow the persistence of the draggable object''s position?
2006 Jan 31
1
Finding Final Position with a Draggable Object
Hello, I have a draggable window. I would like to have it so that when they come back to the page with the draggable window that it remembers where they left it when they last visited. How would I get the final position after the dragging has been stopped? I have been looking threw the wiki and couldn''t find anything.
2006 Mar 29
0
Draggable question
This question is more about prototype than RoR (sorry), but can anyone tell me how to make a Draggable element with an inner scroll bar not have the scroll bar included in the area that is Draggable? Thank you much! -- Posted via http://www.ruby-forum.com/.
2006 Feb 04
0
Clicking a Draggable
Is there a standard way to catch single click on Draggable divs? Ideally I''d be able to receive an x,y position of a click on a div (I''m thinking onmouseup) when the map has not been dragged, but when the map is dragged, I don''t receive (or can easily ignore) an onclick event. I this something I have to hack into Draggable or is there something I can use there already?