From 2c1ecf394d02f616aa5fa2d3c06830e213859fd4 Mon Sep 17 00:00:00 2001 From: Lorenzo Iovino Date: Mon, 6 May 2019 12:48:31 +0200 Subject: [PATCH] Fix: added deprecated useMaxFontSize to prevent broken builds --- .idea/markdown-navigator.xml | 78 +++++ .../markdown-navigator/profiles_settings.xml | 3 + .idea/workspace.xml | 290 +++++++++--------- README.md | 1 + examples/dev/src/app/ng2-fittext.directive.ts | 4 + package.json | 2 +- publishPackage.json | 2 +- src/directives/ng2-fittext.directive.ts | 4 + 8 files changed, 245 insertions(+), 139 deletions(-) create mode 100644 .idea/markdown-navigator.xml create mode 100644 .idea/markdown-navigator/profiles_settings.xml diff --git a/.idea/markdown-navigator.xml b/.idea/markdown-navigator.xml new file mode 100644 index 0000000..076726f --- /dev/null +++ b/.idea/markdown-navigator.xml @@ -0,0 +1,78 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/markdown-navigator/profiles_settings.xml b/.idea/markdown-navigator/profiles_settings.xml new file mode 100644 index 0000000..57927c5 --- /dev/null +++ b/.idea/markdown-navigator/profiles_settings.xml @@ -0,0 +1,3 @@ + + + \ No newline at end of file diff --git a/.idea/workspace.xml b/.idea/workspace.xml index 428dc97..9a45df7 100644 --- a/.idea/workspace.xml +++ b/.idea/workspace.xml @@ -4,9 +4,9 @@ - + - + @@ -83,12 +83,13 @@ - + + - + @@ -100,20 +101,21 @@ - - - - - + + + + + - - - - + + + + + @@ -121,42 +123,45 @@ - - - + + + - + - - + + + - - - - - - - - + + + + + + + + + + - + - - + + @@ -171,25 +176,10 @@ - + - - - - - - - - - - - - - - - - - + + @@ -199,14 +189,11 @@ - + - - - - - + + @@ -215,16 +202,19 @@ - + - + - - + + + + + @@ -232,8 +222,17 @@ - - + + + + + + + + + + + @@ -293,14 +292,14 @@ @@ -323,10 +322,10 @@ - @@ -498,12 +497,21 @@ - + + + + 1557130876740 + + - @@ -515,7 +523,7 @@ - + @@ -541,6 +549,10 @@ + + + @@ -584,13 +596,6 @@ - - - - - - - @@ -632,13 +637,6 @@ - - - - - - - @@ -656,16 +654,6 @@ - - - - - - - - - - @@ -673,20 +661,6 @@ - - - - - - - - - - - - - - @@ -697,31 +671,14 @@ - + - - - - - - - - - - - - - - - - - - - + + @@ -731,23 +688,82 @@ + + + + + + + + + + + + + + + + + - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + - + - - - - - + + + + + + + + + diff --git a/README.md b/README.md index bcd734f..9bddfd0 100644 --- a/README.md +++ b/README.md @@ -106,6 +106,7 @@ Import it in your Angular2 project like a module | 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) | maxFontSize | maximal font size | number, default is 1000 + | **!deprecated!** useMaxFontSize | use max font size if is true | deprecated! | minFontSize | minimal font size | number, default is 7 | modelToWatch | pass model to watch, when this model changes -> font size is automatically recalculated | any type of model diff --git a/examples/dev/src/app/ng2-fittext.directive.ts b/examples/dev/src/app/ng2-fittext.directive.ts index be04819..bee0c66 100644 --- a/examples/dev/src/app/ng2-fittext.directive.ts +++ b/examples/dev/src/app/ng2-fittext.directive.ts @@ -20,6 +20,10 @@ export class Ng2FittextDirective implements AfterViewInit, OnInit, OnChanges, Af @Input('activateOnInputEvents') activateOnInputEvents: boolean; @Input('minFontSize') minFontSize = 7; @Input('maxFontSize') maxFontSize = 1000; + + /* Deprecated */ + @Input('useMaxFontSize') useMaxFontSize = true; + @Input('modelToWatch') modelToWatch: any; private fontSize = 1000; private speed = 1.05; diff --git a/package.json b/package.json index ffa1183..839122d 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "ng2-fittext", - "version": "1.2.4", + "version": "1.2.5", "description": "Ng2 Fittext, an Angular library", "main": "./bundles/ng2-fittext.umd.js", "module": "./ng2-fittext.es5.js", diff --git a/publishPackage.json b/publishPackage.json index 9070969..e14de7e 100644 --- a/publishPackage.json +++ b/publishPackage.json @@ -1,6 +1,6 @@ { "name": "ng2-fittext", - "version": "1.2.4", + "version": "1.2.5", "description": "Ng2-fittext: An Angular2+ directive that change the font size until it fit the upper level container dimension.", "main": "./bundles/ng2-fittext.umd.js", "module": "./ng2-fittext.es5.js", diff --git a/src/directives/ng2-fittext.directive.ts b/src/directives/ng2-fittext.directive.ts index 8d85b56..81e0b60 100644 --- a/src/directives/ng2-fittext.directive.ts +++ b/src/directives/ng2-fittext.directive.ts @@ -20,6 +20,10 @@ export class Ng2FittextDirective implements AfterViewInit, OnInit, OnChanges, Af @Input('activateOnInputEvents') activateOnInputEvents: boolean; @Input('minFontSize') minFontSize = 7; @Input('maxFontSize') maxFontSize = 1000; + + /* Deprecated */ + @Input('useMaxFontSize') useMaxFontSize = true; + @Input('modelToWatch') modelToWatch: any; private fontSize = 1000; private speed = 1.05;