🚀 Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more
Socket
Book a DemoInstallSign in
Socket

ngx-polygon-draw-mod

Package Overview
Dependencies
Maintainers
1
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

ngx-polygon-draw-mod - npm Package Compare versions

Comparing version

to
1.0.9

2

package.json
{
"name": "ngx-polygon-draw-mod",
"version": "1.0.8",
"version": "1.0.9",
"description": "Simple lightweight library to draw polygons over images. This library was created to markup areas on the photo, where the computer vision algorithms will track events. Any other usecase is appreciated, contact me on issues.",

@@ -5,0 +5,0 @@ "author": "Malakhov Dmitriy",

@@ -19,14 +19,14 @@ import {Component, ElementRef, EventEmitter, Input, OnInit, Output, Renderer2, ViewChild} from '@angular/core';

@Input() private height: string;
@Input() private width: string;
@Input() private src: string;
@Input() public height: string = "";
@Input() public width: string = "";
@Input() public src: string = "";
@Output() private created = new EventEmitter();
@ViewChild('polygon') private polygon:ElementRef;
@ViewChild('polygon') private polygon:ElementRef = new ElementRef("");
perimeter = [];
perimeter: any[] = [];
complete = false;
private canvas;
private ctx;
private canvas: any;
private ctx: any;
private static line_intersects(p0, p1, p2, p3) {
private static line_intersects(p0: any, p1: any, p2: any, p3: any) {
let s1_x, s1_y, s2_x, s2_y;

@@ -46,3 +46,3 @@ s1_x = p1['x'] - p0['x'];

private point(x, y){
private point(x: any, y: any){
this.ctx.fillStyle="white";

@@ -69,3 +69,3 @@ this.ctx.strokeStyle = "white";

private draw(end){
private draw(end: any){
this.ctx.lineWidth = 1;

@@ -132,3 +132,3 @@ this.ctx.strokeStyle = "white";

point_it(event) {
point_it(event: any) {
if(this.complete){

@@ -135,0 +135,0 @@ // alert('Разметка уже создана');