
Security News
Attackers Are Hunting High-Impact Node.js Maintainers in a Coordinated Social Engineering Campaign
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.
ng2-img-map
Advanced tools
Responsive image mapping interface for Angular 2.
Markers can be placed on the image by inputting an array of co-ordinates. The co-ordinate values of a marker represent percentages of the dimensions of the image.
<img-map
src="http://placekitten.com/g/500/300"
[markers]="[[25, 25], [50, 50], [75, 75]]"
></img-map>
Markers can be created if the mark event has any observers.
New markers are pushed to the markers array.
markers: number[][] = [];
onMark(marker: number[]) {
console.log('Marker', marker);
console.log('Markers', this.makers);
}
<img-map
src="http://placekitten.com/g/500/300"
[markers]="markers"
(mark)="onMark($event)"
></img-map>
Markers can be selected if the change event has any observers.
markers: number[][] = [[25, 25], [50, 50], [75, 75]];
onChange(marker: number[]) {
console.log('Marker', marker);
}
<img-map
src="http://placekitten.com/g/500/300"
[markers]="markers"
(change)="onChange($event)"
></img-map>
The image map will draw automatically upon window resize or property changes. If the image map requires a draw upon an event outside of this scope then call the draw function of the image map component.
@ViewChild('imgMap')
imgMap: ImgMapComponent;
markers: number[][] = [];
ngOnInit() {
window.setTimeout(() => {
this.markers.push([25, 25], [50, 50], [75, 75]);
console.log('Markers', this.markers);
window.setTimeout(() => this.imgMap.draw(), 1000);
}, 1000);
}
<img-map
#imgMap
src="http://placekitten.com/g/500/300"
[markers]="markers"
></img-map>
FAQs
Responsive image mapping interface for Angular 2
The npm package ng2-img-map receives a total of 6 weekly downloads. As such, ng2-img-map popularity was classified as not popular.
We found that ng2-img-map demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.

Security News
Axios compromise traced to social engineering, showing how attacks on maintainers can bypass controls and expose the broader software supply chain.

Security News
Node.js has paused its bug bounty program after funding ended, removing payouts for vulnerability reports but keeping its security process unchanged.