2.1.2 • Published 4 years ago

angular-elements-resizer v2.1.2

Weekly downloads
24
License
MIT
Repository
github
Last release
4 years ago

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

2.1.2

4 years ago

2.1.1

4 years ago

2.1.0

4 years ago

1.0.10

4 years ago

0.0.10

4 years ago

0.0.9

4 years ago

0.0.5

4 years ago

0.0.6

4 years ago

0.0.3

4 years ago

0.0.4

4 years ago

0.0.2

4 years ago

0.0.1

4 years ago