Skip to content

Commit a55c117

Browse files
committed
Release 1.3.0
1 parent cc2dae2 commit a55c117

File tree

8 files changed

+65
-32
lines changed

8 files changed

+65
-32
lines changed

CHANGELOG.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,15 @@
1+
## 1.3.0 (04.10.2021)
2+
3+
### New
4+
5+
- [Wysiwyg](https://mdbootstrap.com/docs/b5/angular/plugins/wysiwyg-editor)
6+
7+
### Fixes and improvements:
8+
9+
- Popover/Tooltip - resolved problem with closing component when quickly moving mouse over trigger element
10+
11+
---
12+
113
## 1.2.0 (20.09.2021)
214

315
### New

README.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
MDB 5 Angular
22

3-
Version: FREE 1.2.0
3+
Version: FREE 1.3.0
44

55
Documentation:
66
https://mdbootstrap.com/docs/b5/angular/

package-lock.json

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "mdb-angular-ui-kit-free",
3-
"version": "1.2.0",
3+
"version": "1.3.0",
44
"scripts": {
55
"ng": "ng",
66
"start": "ng serve",

projects/mdb-angular-ui-kit/CHANGELOG.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,15 @@
1+
## 1.3.0 (04.10.2021)
2+
3+
### New
4+
5+
- [Wysiwyg](https://mdbootstrap.com/docs/b5/angular/plugins/wysiwyg-editor)
6+
7+
### Fixes and improvements:
8+
9+
- Popover/Tooltip - resolved problem with closing component when quickly moving mouse over trigger element
10+
11+
---
12+
113
## 1.2.0 (20.09.2021)
214

315
### New

projects/mdb-angular-ui-kit/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
"repository": "https://github.com/mdbootstrap/mdb-angular-ui-kit",
44
"author": "MDBootstrap",
55
"license": "MIT",
6-
"version": "1.2.0",
6+
"version": "1.3.0",
77
"peerDependencies": {
88
"@angular/common": "^12.0.0",
99
"@angular/core": "^12.0.0",

projects/mdb-angular-ui-kit/popover/popover.directive.ts

Lines changed: 18 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,6 @@ export class MdbPopoverDirective implements OnInit, OnDestroy {
8484
}
8585

8686
this._bindTriggerEvents();
87-
this._createOverlay();
8887
}
8988

9089
ngOnDestroy(): void {
@@ -191,10 +190,14 @@ export class MdbPopoverDirective implements OnInit, OnDestroy {
191190
}
192191

193192
show(): void {
194-
if (this._open) {
193+
if (this._hideTimeout) {
195194
this._overlayRef.detach();
195+
clearTimeout(this._hideTimeout);
196+
this._hideTimeout = null;
196197
}
197198

199+
this._createOverlay();
200+
198201
if (this._hideTimeout) {
199202
clearTimeout(this._hideTimeout);
200203
this._hideTimeout = null;
@@ -219,24 +222,28 @@ export class MdbPopoverDirective implements OnInit, OnDestroy {
219222
}
220223

221224
hide(): void {
222-
if (!this._open) {
223-
return;
224-
}
225-
226225
if (this._showTimeout) {
227226
clearTimeout(this._showTimeout);
228227
this._showTimeout = null;
228+
} else {
229+
return;
229230
}
230231

231232
this._hideTimeout = setTimeout(() => {
232233
this.popoverHide.emit(this);
233-
this._tooltipRef.instance._hidden.pipe(first()).subscribe(() => {
234+
if (!this._tooltipRef) {
234235
this._overlayRef.detach();
235236
this._open = false;
236-
this.popoverShown.emit(this);
237-
});
238-
this._tooltipRef.instance.animationState = 'hidden';
239-
this._tooltipRef.instance.markForCheck();
237+
this.popoverHidden.emit(this);
238+
} else {
239+
this._tooltipRef.instance._hidden.pipe(first()).subscribe(() => {
240+
this._overlayRef.detach();
241+
this._open = false;
242+
this.popoverHidden.emit(this);
243+
});
244+
this._tooltipRef.instance.animationState = 'hidden';
245+
this._tooltipRef.instance.markForCheck();
246+
}
240247
}, this.delayHide);
241248
}
242249

projects/mdb-angular-ui-kit/tooltip/tooltip.directive.ts

Lines changed: 19 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -55,8 +55,7 @@ export class MdbTooltipDirective implements OnInit, OnDestroy {
5555
constructor(
5656
private _overlay: Overlay,
5757
private _overlayPositionBuilder: OverlayPositionBuilder,
58-
private _elementRef: ElementRef,
59-
private _renderer: Renderer2
58+
private _elementRef: ElementRef
6059
) {}
6160

6261
ngOnInit(): void {
@@ -65,11 +64,10 @@ export class MdbTooltipDirective implements OnInit, OnDestroy {
6564
}
6665

6766
this._bindTriggerEvents();
68-
this._createOverlay();
6967
}
7068

7169
ngOnDestroy(): void {
72-
if (this._open) {
70+
if (this._open || this._showTimeout) {
7371
this.hide();
7472
}
7573

@@ -172,15 +170,14 @@ export class MdbTooltipDirective implements OnInit, OnDestroy {
172170
}
173171

174172
show(): void {
175-
if (this._open) {
173+
if (this._hideTimeout || this._open) {
176174
this._overlayRef.detach();
177-
}
178-
179-
if (this._hideTimeout) {
180175
clearTimeout(this._hideTimeout);
181176
this._hideTimeout = null;
182177
}
183178

179+
this._createOverlay();
180+
184181
this._showTimeout = setTimeout(() => {
185182
const tooltipPortal = new ComponentPortal(MdbTooltipComponent);
186183

@@ -200,24 +197,29 @@ export class MdbTooltipDirective implements OnInit, OnDestroy {
200197
}
201198

202199
hide(): void {
203-
if (!this._open) {
204-
return;
205-
}
206-
207200
if (this._showTimeout) {
208201
clearTimeout(this._showTimeout);
209202
this._showTimeout = null;
203+
} else {
204+
return;
210205
}
211206

212207
this._hideTimeout = setTimeout(() => {
213208
this.tooltipHide.emit(this);
214-
this._tooltipRef.instance._hidden.pipe(first()).subscribe(() => {
209+
210+
if (!this._tooltipRef) {
215211
this._overlayRef.detach();
216212
this._open = false;
217-
this.tooltipShown.emit(this);
218-
});
219-
this._tooltipRef.instance.animationState = 'hidden';
220-
this._tooltipRef.instance.markForCheck();
213+
this.tooltipHidden.emit(this);
214+
} else {
215+
this._tooltipRef.instance._hidden.pipe(first()).subscribe(() => {
216+
this._overlayRef.detach();
217+
this._open = false;
218+
this.tooltipHidden.emit(this);
219+
});
220+
this._tooltipRef.instance.animationState = 'hidden';
221+
this._tooltipRef.instance.markForCheck();
222+
}
221223
}, this.delayHide);
222224
}
223225

0 commit comments

Comments
 (0)