ng-inline-svg
Advanced tools
Comparing version 6.2.0 to 6.2.1
@@ -21,3 +21,3 @@ import { ComponentFactoryResolver, ElementRef, EventEmitter, OnChanges, OnDestroy, OnInit, Renderer2, SimpleChanges, ViewContainerRef } from '@angular/core'; | ||
fallbackImgUrl: string; | ||
onSVGLoaded: (svg: SVGElement) => SVGElement; | ||
onSVGLoaded: (svg: SVGElement, parent: Element | null) => SVGElement; | ||
onSVGInserted: EventEmitter<SVGElement>; | ||
@@ -24,0 +24,0 @@ onSVGFailed: EventEmitter<any>; |
@@ -80,3 +80,3 @@ "use strict"; | ||
if (_this.onSVGLoaded) { | ||
svg = _this.onSVGLoaded(svg); | ||
svg = _this.onSVGLoaded(svg, _this._el.nativeElement); | ||
} | ||
@@ -83,0 +83,0 @@ _this._insertEl(svg); |
{ | ||
"name": "ng-inline-svg", | ||
"version": "6.2.0", | ||
"version": "6.2.1", | ||
"description": "Angular directive for inserting an SVG inline within an element.", | ||
@@ -5,0 +5,0 @@ "repository": { |
@@ -87,3 +87,3 @@ # ng-inline-svg | ||
| fallbackImgUrl | string | | URL for a regular image to be displayed as a fallback if the SVG fails to load. | | ||
| onSVGLoaded | `(svg: SVGElement) => SVGElement` | | Lifecycle hook that allows the loaded SVG to be manipulated prior to insertion. | | ||
| onSVGLoaded | `(svg: SVGElement, parent: Element | null) => SVGElement` | | Lifecycle hook that allows the loaded SVG to be manipulated prior to insertion. | | ||
@@ -90,0 +90,0 @@ #### Outputs |
@@ -39,3 +39,3 @@ import { | ||
@Input() fallbackImgUrl: string; | ||
@Input() onSVGLoaded: (svg: SVGElement) => SVGElement; | ||
@Input() onSVGLoaded: (svg: SVGElement, parent: Element | null) => SVGElement; | ||
@@ -132,3 +132,3 @@ @Output() onSVGInserted: EventEmitter<SVGElement> = new EventEmitter<SVGElement>(); | ||
if (this.onSVGLoaded) { | ||
svg = this.onSVGLoaded(svg); | ||
svg = this.onSVGLoaded(svg, this._el.nativeElement); | ||
} | ||
@@ -135,0 +135,0 @@ |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
54048