
Research
Malicious npm Packages Impersonate Flashbots SDKs, Targeting Ethereum Wallet Credentials
Four npm packages disguised as cryptographic tools steal developer credentials and send them to attacker-controlled Telegram infrastructure.
draggable-elm
Advanced tools
This package has been replaced by a modern alternative.
See draggables on npm.
Makes elements draggable. Vanilla style.
const draggable = require('draggable-elm');
const myElm = document.getElementById('target');
draggable(myElm, {options});
classname
- String. A replacement for the draggable
classname.axis
- String. Restrict movement along a single axis, 'x'
or 'y'
.grip
- Element | String (element selector). A grip handle element to activate draggability upon mouse down. By default you can start dragging from anywhere within the main element.Calling the draggable()
function returns a Draggable
instance:
const d = draggable(elm);
It has the following methods:
Toggle draggability. When disabled, the main element gets a 'drag-disabled'
classname.
Sets a new grip handle. Argument could be either an HTML Element or an element selector string (e.g. '#my-grip'
). See the grip
option above.
Listen to drag and drop events:
'drag-start'
- dragging started, on mouse down.'dragging'
- moving around, on mouse move (with mouse down)'drag-stop'
- dragging stopped, on mouse up.Event Aliases
For extra convenience, anything that contains start
, stop
/end
/drop
or ing
will match its respective event.
Sets the element relative position. It utilizes css translate(x, y)
.
Does not accumulate. Every call sets the element position relative to its original position and not relative to its current position.
This method wan't made to be used during an active dragging, but for one-time positioning.
Kills the Draggable
instance for good, unbinds events, releases element references.
For styling, the main element will be given the following classes:
'draggable'
- from initialization until destruction.'dragging'
- on mouse down, until mouse up.Any element that is set as a grip handle will be given the classname: 'drag-grip-handle'
.
FAQs
Makes elements draggable. Vanilla style.
The npm package draggable-elm receives a total of 0 weekly downloads. As such, draggable-elm popularity was classified as not popular.
We found that draggable-elm demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Research
Four npm packages disguised as cryptographic tools steal developer credentials and send them to attacker-controlled Telegram infrastructure.
Security News
Ruby maintainers from Bundler and rbenv teams are building rv to bring Python uv's speed and unified tooling approach to Ruby development.
Security News
Following last week’s supply chain attack, Nx published findings on the GitHub Actions exploit and moved npm publishing to Trusted Publishers.