{"id":31797088,"url":"https://github.com/yang/jdragdrop","last_synced_at":"2025-10-10T20:55:12.129Z","repository":{"id":136289018,"uuid":"8404653","full_name":"yang/jdragdrop","owner":"yang","description":"A JavaScript library for drag/drop interactions, modeled after jquery.event.drag","archived":false,"fork":false,"pushed_at":"2013-03-01T08:33:20.000Z","size":131,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2023-03-10T19:50:46.433Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":false,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/yang.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2013-02-25T07:45:55.000Z","updated_at":"2023-03-10T20:21:51.345Z","dependencies_parsed_at":null,"dependency_job_id":"d0ffcc77-77d3-4725-9483-fba2eaf8a494","html_url":"https://github.com/yang/jdragdrop","commit_stats":null,"previous_names":[],"tags_count":null,"template":null,"template_full_name":null,"purl":"pkg:github/yang/jdragdrop","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yang%2Fjdragdrop","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yang%2Fjdragdrop/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yang%2Fjdragdrop/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yang%2Fjdragdrop/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/yang","download_url":"https://codeload.github.com/yang/jdragdrop/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yang%2Fjdragdrop/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":279005221,"owners_count":26083865,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-10-10T02:00:06.843Z","response_time":62,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2025-10-10T20:54:12.838Z","updated_at":"2025-10-10T20:55:12.121Z","avatar_url":"https://github.com/yang.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"\n# jdragdrop\n\nA JQuery add-on for flexible drag/drop interactions.\n\nThis library implements the API defined by ThreeDubMedia in their \n[jquery.event.drag](http://threedubmedia.com/code/event/drag) and\n[jquery.event.drop](http://threedubmedia.com/code/event/drop), but\nit is a separate implementation that does not share any code (and\nis implemented very differently).\n\n## Why?\n\nThe drag/drop plugins from ThreeDubMedia have the best API of any\nJavaScript drag/drop library I have found.  Benefits are:\n\n * **event-based approach**: the library only fires events, it does not\n   attempt to read or write the DOM directly, which allows for\n   greater decoupling.\n\n * **flexibility**: a wide variety of drag/drop interactions are possible,\n   as is illustrated in the demos, without having to put the logic\n   for complicated interactions in the library itself.\n\nHowever, when I tried to use the ThreeDubMedia libraries early in\n2012, I found that they didn't work correctly with jQuery 1.7.\nWhen I tried to fix this problem, I discovered that these libraries\nused a complicated feature of jQuery known as \"special events,\" and\ngenerally seemed more tightly coupled to jQuery internals than I\nwanted.\n\nI decided to try creating a different implementation of ThreeDubMedia's\nAPI that used only public jQuery functionality, in hopes that the\nresulting library would be less sensitive to changes in the internals\nof jQuery.\n\n## Differences\n\nThis library does not use the jQuery \"special events\" API.  It uses only\npublic jQuery functionality like `$.on()` and `$.trigger()` to register\nand trigger custom drag/drop functionality.  However there is one exception:\nthis library *does* use the `$(element).data(“events”)` interface which\nwas not officially documented and which was removed in jQuery 1.8.  Need\nto investigate the best way to resolve this problem.\n\nAnother major difference is that this library registers far fewer event\nhandlers on the DOM.  The ThreeDubMedia library registers a set of event\nhandlers (mousedown, mousemove, mouseup, etc) on *each* element of interest,\nand these handlers are registered all the time.  This means that even when\nno drag/drop interaction is currently happening, event handlers are firing\nand discarding uninteresting events.\n\nThis library, on the other hand, only registers a single \"mousedown\" event\nfor the whole document.  When the mouse is clicked, it looks for any matching\nelements and only installs \"mousemove\" and \"mouseup\" handlers for the duration\nof the drag/drop interaction.\n\n## Status\n\nCurrently the \"drag\" part of the library supports all the demos in Chrome\n(with one exception, see below).  Drop is not yet implemented.\n\n`dragtests/live.html` can lose the drag if you move the mouse too fast;\nthis should be fixed.\n\nI don't have too much time to devote to maintaining the library, but I'd\nlove to see any contributions of:\n\n * Functionality that makes it easier to test against multiple jQuery\n   versions.  Maybe all the demos should be embedded into a single html\n   page with a drop-down to select your jQuery version?\n\n * Anything that can automate the testing (seems like this should be\n   possible by manually triggering the mouse events and verifying that\n   callbacks are called correctly).\n\n * Any fixes for modern browsers, touchscreen functionality, etc!\n\n## Copyright / License\n\nCopyright (c) 2012 Google, Inc.\nReleased under Apache 2.0\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyang%2Fjdragdrop","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fyang%2Fjdragdrop","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyang%2Fjdragdrop/lists"}