Socket
Book a DemoInstallSign in
Socket

angular-elements-resizer

Package Overview
Dependencies
Maintainers
1
Versions
11
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

angular-elements-resizer

Angular directive that allows element to be resized in all directions. Works without adding borders to the element.This directive is very light and will not trigger change Detection because it works outside of NgZone

latest
Source
npmnpm
Version
2.1.2
Version published
Maintainers
1
Created
Source

AngularElementsResizer

Angular directive that allows element to be resized in all directions. Works without adding borders to the element. This directive is very light and will not trigger change Detection because it works outside of NgZone

GitHub stars

Demo

https://aregsargsyan.github.io/DemoForResizerReusableModule/

Usage

Step 1: Install angular-resize-element

npm i angular-elements-resizer

Step 2: Import angular resize element module into your app module

....
import { AngularElementsResizerModule } from 'angular-elements-resizer';

....

@NgModule({
    ...
    imports: [
        ....
        AngularElementsResizerModule
    ],
    ....
})
export class AppModule { }

Step 3: Add ts code to the component

import { Component } from '@angular/core';

@Component({
  selector: 'app-root',
  template: `<div resizable></div>`,
  styles: ['div { position: absolute; width: 300px;height: 400px; background: red; }']
})
export class AppComponent {
}

Note: The css part here is only for example (for visualization) you can use whatever styles you want

API

OutputsTypeDescription
resizingStart() => EventInterfaceThis event is fired when resize is started (only one time)
resizingElement() => EventInterfaceThis event is fired when mouse move and size is changed
resizingEnd() => EventInterfaceThis event is fired when mouse up and resize is finished (only one time)

Further help

In case of questions feel free to contact me https://linkedin.com/in/areg-sargsyan

License

MIT

Keywords

Angular

FAQs

Package last updated on 20 Oct 2020

Did you know?

Socket

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.

Install

Related posts