From b0500326735fc085618cedfae71abd63703479bb Mon Sep 17 00:00:00 2001 From: Tom Spencer Date: Wed, 11 Jan 2017 09:56:26 +0000 Subject: [PATCH] v0.12.0 --- .gitignore | 1 + CHANGELOG.md | 5 +++++ package.json | 14 +++++++------- src/elastic.directive.ts | 12 ++++-------- 4 files changed, 17 insertions(+), 15 deletions(-) diff --git a/.gitignore b/.gitignore index b8aa0d7..4245f1b 100644 --- a/.gitignore +++ b/.gitignore @@ -11,4 +11,5 @@ Thumbs.db *.map *.d.ts *.ngfactory.ts +*.ngsummary.json *.metadata.json diff --git a/CHANGELOG.md b/CHANGELOG.md index 0a400be..6e3a374 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,10 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](http://keepachangelog.com/) and this project adheres to [Semantic Versioning](http://semver.org/). +[0.12.0] - 2017-01-11 +### Fixed +- Support latest Ionic nightly build. + [0.11.1] - 2016-11-11 ### Fixed - Export Elastic directive so that apps built with `ngc` work properly. @@ -24,6 +28,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/). ### Added - Initial commit of elastic directive. +[0.12.0]: https://github.com/fiznool/angular2-elastic/compare/v0.11.1...v0.12.0 [0.11.1]: https://github.com/fiznool/angular2-elastic/compare/v0.11.0...v0.11.1 [0.11.0]: https://github.com/fiznool/angular2-elastic/compare/v0.10.1...v0.11.0 [0.10.1]: https://github.com/fiznool/angular2-elastic/compare/v0.10.0...v0.10.1 diff --git a/package.json b/package.json index 4851879..bbad98e 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "angular2-elastic", - "version": "0.11.1", + "version": "0.12.0", "description": "Angular 2 directive to auto expand textareas according to their contents.", "module": "index.js", "main": "index.js", @@ -27,11 +27,11 @@ "typings": "./index.d.ts", "homepage": "https://github.com/fiznool/angular2-elastic#readme", "devDependencies": { - "@angular/compiler": "2.1.2", - "@angular/compiler-cli": "2.1.2", - "@angular/core": "2.1.2", - "rxjs": "^5.0.0-beta.12", - "typescript": "2.0.9", - "zone.js": "0.6.26" + "@angular/compiler": "2.4.2", + "@angular/compiler-cli": "2.4.2", + "@angular/core": "2.4.2", + "rxjs": "5.0.3", + "typescript": "2.1.4", + "zone.js": "0.7.4" } } diff --git a/src/elastic.directive.ts b/src/elastic.directive.ts index c40ea55..243397e 100644 --- a/src/elastic.directive.ts +++ b/src/elastic.directive.ts @@ -1,10 +1,6 @@ -import { ElementRef, HostListener, Directive} from '@angular/core'; +import { ElementRef, HostListener, Directive, AfterViewInit, AfterViewChecked } from '@angular/core'; import { Observable } from 'rxjs/Rx'; -interface CSSStyleDeclarationWithResize extends CSSStyleDeclaration { - resize: string -} - @Directive({ selector: '[fz-elastic]' }) @@ -22,7 +18,7 @@ export class ElasticDirective { setupTextarea(textareaEl: HTMLTextAreaElement) { this.textareaEl = textareaEl; - const style: CSSStyleDeclarationWithResize = this.textareaEl.style as CSSStyleDeclarationWithResize; + const style = this.textareaEl.style; style.overflow = 'hidden'; style.resize = 'none'; @@ -32,7 +28,7 @@ export class ElasticDirective { .subscribe(() => this.adjust()); } - ngAfterContentInit() { + ngAfterViewInit() { if(this.isTextarea(this.element.nativeElement)) { this.setupTextarea(this.element.nativeElement); return; @@ -53,7 +49,7 @@ export class ElasticDirective { this.adjust(); } - ngAfterContentChecked(): void { + ngAfterViewChecked(): void { this.adjust(); }