Release version 1.0.14
This commit is contained in:
parent
c76d6dbb1a
commit
ff241b1969
2 changed files with 17 additions and 3 deletions
18
README.md
18
README.md
|
|
@ -31,7 +31,7 @@ Import it in your Angular2 project like a module
|
||||||
|
|
||||||
```
|
```
|
||||||
|
|
||||||
1) Use it in your components
|
2) Use it in your components
|
||||||
```sh
|
```sh
|
||||||
import {Component} from '@angular/core';
|
import {Component} from '@angular/core';
|
||||||
|
|
||||||
|
|
@ -43,7 +43,21 @@ Import it in your Angular2 project like a module
|
||||||
})
|
})
|
||||||
|
|
||||||
export class LabelComponent {}
|
export class LabelComponent {}
|
||||||
|
```
|
||||||
|
|
||||||
|
**NEW! Support for autoresize input box!**
|
||||||
|
|
||||||
|
```sh
|
||||||
|
import {Component} from '@angular/core';
|
||||||
|
|
||||||
|
@Component({
|
||||||
|
selector: 'inputbox',
|
||||||
|
template: `<div #container>
|
||||||
|
<input [fittext]="true" [activateOnResize]="true" [activateOnInputEvents]="true" [container]="container">`,
|
||||||
|
</div>`
|
||||||
|
})
|
||||||
|
|
||||||
|
export class InputBoxComponent {}
|
||||||
```
|
```
|
||||||
|
|
||||||
Parameters:
|
Parameters:
|
||||||
|
|
@ -53,7 +67,7 @@ Import it in your Angular2 project like a module
|
||||||
| fittext | is the selector of the directive | true/false
|
| fittext | is the selector of the directive | true/false
|
||||||
| container | the container to fit | ElementRef
|
| container | the container to fit | ElementRef
|
||||||
| activateOnResize | enable/disable the autofit in case of window resize | true or false (default false)
|
| activateOnResize | enable/disable the autofit in case of window resize | true or false (default false)
|
||||||
|
| activateOnInputEvents | enbale/disable the autofit in case of input box events (keydown, keyup etc..) | true or false (default false)
|
||||||
|
|
||||||
|
|
||||||
### Development
|
### Development
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"name": "ng2-fittext",
|
"name": "ng2-fittext",
|
||||||
"version": "1.0.13",
|
"version": "1.0.14",
|
||||||
"description": "An Angular2 directive for autoscale the font size of an element to fit an upper level container.",
|
"description": "An Angular2 directive for autoscale the font size of an element to fit an upper level container.",
|
||||||
"main": "index.js",
|
"main": "index.js",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue