npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

areamap-design

v1.0.1

Published

**The areamap design library provides a set of tools and components for integrating interactive area plan design into Angular applications.**

Downloads

22

Readme

Areamap design

The areamap design library provides a set of tools and components for integrating interactive area plan design into Angular applications.

node status

Stackblitz Example

https://stackblitz.com/edit/areamap-design

Output Screenshot

output

Basic Usage - Local Files

<nh-areamap-design 
  [enableZoom]="true"
  [readOnly]="true"
  [borderColor]="'red'" 
  [selectedPinColor]="'yellow'" 
  [defaultPinColor]="'red'"
  [viewCords]="true"
  [enablePinTooltip]="true"
  [defaultAreaPlan]="'./assets/white-background-500x500.jpg'"
  [areaPlan]="'assets/F43.pdf'"
  [pins]="pinlist"
  (pinChanged)="onpinSelected($event)"
  (createdPin)="onPinCreated($event)"
  ></nh-areamap-design>

Overview

Install

Angular >= 10

npm install areamap-design

Partial Ivy compilated library bundles.

Usage

Add AreamapDesignModule to your module's imports

import { NgModule } from '@angular/core';
import { BrowserModule } from '@angular/platform-browser';
import { AppComponent } from './app/app.component';

import { AreamapDesignModule} from 'areamap-design';

@NgModule({
  imports: [BrowserModule, AreamapDesignModule],
  declarations: [AppComponent],
  bootstrap: [AppComponent]
})

class AppModule {}

platformBrowserDynamic().bootstrapModule(AppModule);

And then use it in your component

import { Component } from '@angular/core';

@Component({
  selector: 'app-base',
  template: `
  <nh-areamap-design 
  [enableZoom]="true"
  [readOnly]="true"
  [borderColor]="'red'" 
  [selectedPinColor]="'yellow'" 
  [defaultPinColor]="'red'"
  [viewCords]="true"
  [enablePinTooltip]="true"
  [defaultAreaPlan]="areaplan"
  [areaPlan]="'assets/F43.pdf'"
  [pins]="pinlist"
  (pinChanged)="onpinSelected($event)"
  (createdPin)="onPinCreated($event)"
  ></nh-areamap-design>`
})
export class AppComponent {
  areaplan= "http://www.worldplumbing.org/wp-content/uploads/2016/11/white-background-500x500.jpg";
  pinlist = [{location: {x: 200, y: 200}, color: 'pink', name: 'Pin 1'}];

  onpinSelected(args) {
    console.log(args, 'pin selected')
  }

  onPinCreated(args) {
    console.log(args, 'pin created')
  }
}

Options

[enableZoom]

| Property | Type | Required | | --- | ---- | --- | | [enableZoom] | boolean | Required |

Allow zoom areamap

[enableZoom]="true"

[readOnly]

| Property | Type | Required | | --- | ---- | --- | | [readOnly] | boolean | Optional, default = false|

Readonly areamap if user don't want any integration with in

[readOnly]="true"

[borderColor]

| Property | Type | Required | | --- | ---- | --- | | [borderColor] | string | Required|

Border color for the pin on areamap

[borderColor]="'red'"

[selectedPinColor]

| Property | Type | Required | | --- | ---- | --- | | [selectedPinColor] | string | Required|

User selected pin color for the pin on areamap

[selectedPinColor]="'yellow'"

[defaultPinColor]

| Property | Type | Required | | --- | ---- | --- | | [selectedPinColor] | string | Required|

User default pin color for the pin on areamap

[defaultPinColor]="'gray'"

[viewCords]

| Property | Type | Required | | --- | ---- | --- | | [viewCords] | boolean | Required |

Enable to View X and Y coordinate of areamap

[viewCords]="true"

[enablePinTooltip]

| Property | Type | Required | | --- | ---- | --- | | [enablePinTooltip] | boolean | Required |

Enable hover tooltip of pin

[enablePinTooltip]="true"

[defaultAreaPlan]

| Property | Type | Required | | --- | ---- | --- | | [defaultAreaPlan] | string | Required |

Pass areamap default plan

[defaultAreaPlan]="'./assets/map-default.pdf'"

[areaPlan]

| Property | Type | Required | | --- | ---- | --- | | [areaPlan] | string | Required |

Actual areamap plan

[areaPlan]="'./assets/map-23.pdf'"

[pins]

| Property | Type | Required | | --- | ---- | --- | | [pins] | Array | Optional |

List of pins that user want to plot on areaplan

pinList = [
     {  location: 
         { x: 200, y: 200}, 
         color: 'pink',  
         name: 'Pin 1'
     }
  ];

(pinChanged)

| Property | Type | Required | | --- | ---- | --- | | (pinChanged) | callback | Optional |

Selected pin changed handling callback

Define callback in your component's class

onPinSelected(args: any) {
  // do anything
}

Then add it to nh-areamap-design in component's template

(error)="onPinSelected($event)"

(createdPin)

| Property | Type | Required | | --- | ---- | --- | | (createdPin) | callback | Optional |

New pin created handling callback

Define callback in your component's class

onPinCreated(args: any) {
  // do anything
}

Then add it to nh-areamap-design in component's template

(createdPin)="onPinCreated($event)"

License

MIT © Narendra Hinge