Research
Security News
Quasar RAT Disguised as an npm Package for Detecting Vulnerabilities in Ethereum Smart Contracts
Socket researchers uncover a malicious npm package posing as a tool for detecting vulnerabilities in Etherium smart contracts.
front-angular-resizable
Advanced tools
A directive for creating resizable containers in angular.
A directive for creating resizable containers.
All other resizable directive concepts I came across include layout logic in the directive. I wanted a directive that only handled the resize logic. This way, the layout logic is quarantined to the CSS.
npm install angular-resizable
or bower install angular-resizable
or clone/download this repoangular-resizable.min.js
in your project.angular-resizable.min.css
in your project as well (this provides default styling for the resize handles).angular.module('app', ['angularResizable'])
<section resizable r-directions="['bottom', 'right']" r-flex="true">
Include any sides you want to be resizable in an array inside r-directions
. Accepts 'top','right','bottom', and 'left'. You can style the handles however you want. Just override the styles in the css in your own stylesheet.
Attributes | Default | Accepts | Description |
---|---|---|---|
rDirections | ['right'] | ['top', 'right', 'bottom', 'left',] | Determines which sides of the element are resizable. |
rFlex | false | boolean | Set as true if you are using flexbox. See this codepen. |
rCenteredX | false | boolean | If set as true, the velocity of horizontal resizing will be doubled. |
rCenteredY | false | boolean | If set as true, the velocity of vertical resizing will be doubled. |
rWidth | false | integer or $scope variable | If set, the resizable element will be rendered with a predefined width relative to this value in pixels and a watcher will be set on the 'rWidth' attribute. See this codepen. |
rHeight | false | integer or $scope variable | If set, the resizable element will be rendered with a predefined height relative to this value in pixels and a watcher will be set on the 'rHeight' attribute. See this codepen. |
rGrabber | <span></span> | string | Defines custom inner html for the grabber. |
rNoThrottle | false | boolean | Disables angular-resizable.resizing throttling (see events section below). |
For an example using the events, see this codepen.
This event is emitted at the beginning of a resize with the following info object:
info.width
: The width of the directive at time of resize start. Will be false if resizing verticallyinfo.height
: The height of the directive at time of resize start. Will be false if resizing horizontallyinfo.id
: The id of the directive. Will be false if there is no id set.info.evt
: original mouse event objectCalled repeatedly while the mouse is being moved. By default, only calls once every 100ms to keep CPU usage low. For smooth resizing, use the rNoThrottle
attribute. This event is emitted during the resizing of the element with the following object as an argument:
info.width
: The width of the directive at time of resize end. Will be false if resizing verticallyinfo.height
: The height of the directive at time of resize end. Will be false if resizing horizontallyinfo.id
: The id of the directive. Will be false if there is no id set.info.evt
: original mouse event objectThis event is emitted at the end of a resize with the following object as an argument:
info.width
: The width of the directive at time of resize end. Will be false if resizing verticallyinfo.height
: The height of the directive at time of resize end. Will be false if resizing horizontallyinfo.id
: The id of the directive. Will be false if there is no id set.info.evt
: original mouse event objectMIT
FAQs
A directive for creating resizable containers in angular.
We found that front-angular-resizable demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer 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
Security News
Socket researchers uncover a malicious npm package posing as a tool for detecting vulnerabilities in Etherium smart contracts.
Security News
Research
A supply chain attack on Rspack's npm packages injected cryptomining malware, potentially impacting thousands of developers.
Research
Security News
Socket researchers discovered a malware campaign on npm delivering the Skuld infostealer via typosquatted packages, exposing sensitive data.