@stemy/ngx-utils 19.4.7 → 19.4.10

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -279,7 +279,7 @@ export interface IPoint {
279
279
  readonly y: number;
280
280
  }
281
281
  export interface IShape extends IPoint {
282
- distance(shape: IShape): number;
282
+ distance(shape: IPoint): number;
283
283
  }
284
284
  export type CanvasItemShape = "rect" | "circle";
285
285
  export type CanvasItemDirection = "horizontal" | "vertical" | "free" | "none";
@@ -1,6 +1,6 @@
1
1
  import { EventEmitter, OnChanges, OnDestroy } from "@angular/core";
2
2
  import { Subscription } from "rxjs";
3
- import { CanvasItemDirection, CanvasItemShape, InteractiveCanvas, InteractiveCanvasItem, InteractivePanEvent, IShape } from "../../common-types";
3
+ import { CanvasItemDirection, CanvasItemShape, InteractiveCanvas, InteractiveCanvasItem, InteractivePanEvent, IPoint, IShape } from "../../common-types";
4
4
  import { Point } from "../../utils/geometry";
5
5
  import * as i0 from "@angular/core";
6
6
  export declare class InteractiveItemComponent implements OnDestroy, OnChanges, InteractiveCanvasItem {
@@ -12,19 +12,19 @@ export declare class InteractiveItemComponent implements OnDestroy, OnChanges, I
12
12
  protected deltaY: number;
13
13
  set x(value: number);
14
14
  set y(value: number);
15
- set position(value: Point);
15
+ set position(value: IPoint);
16
16
  rotation: number;
17
17
  direction: CanvasItemDirection;
18
18
  disabled: boolean;
19
19
  onClick: EventEmitter<InteractiveCanvasItem>;
20
20
  onPan: EventEmitter<InteractivePanEvent>;
21
- onPanStart: EventEmitter<InteractiveCanvasItem>;
22
- onPanEnd: EventEmitter<InteractiveCanvasItem>;
21
+ onPanStart: EventEmitter<InteractivePanEvent>;
22
+ onPanEnd: EventEmitter<InteractivePanEvent>;
23
23
  active: boolean;
24
24
  index: number;
25
25
  get shapes(): ReadonlyArray<IShape>;
26
26
  get canvas(): InteractiveCanvas;
27
- get position(): Point;
27
+ get position(): IPoint;
28
28
  get x(): number;
29
29
  get y(): number;
30
30
  get shape(): CanvasItemShape;
@@ -1,4 +1,4 @@
1
- import { IShape } from "../common-types";
1
+ import { IPoint, IShape } from "../common-types";
2
2
  export declare class Rect implements IShape {
3
3
  readonly x: number;
4
4
  readonly y: number;
@@ -11,7 +11,7 @@ export declare class Rect implements IShape {
11
11
  get bottom(): number;
12
12
  get top(): number;
13
13
  constructor(x: number, y: number, width: number, height: number, rotation?: number);
14
- distance(p: Point): number;
14
+ distance(p: IPoint): number;
15
15
  }
16
16
  export declare class Circle implements IShape {
17
17
  readonly x: number;
@@ -24,7 +24,7 @@ export declare class Circle implements IShape {
24
24
  get bottom(): Point;
25
25
  get rect(): Rect;
26
26
  constructor(x: number, y: number, radius: number);
27
- distance(p: Point): number;
27
+ distance(p: IPoint): number;
28
28
  }
29
29
  export declare class Point implements IShape {
30
30
  readonly x: number;
@@ -36,7 +36,7 @@ export declare class Point implements IShape {
36
36
  add(p: Point): Point;
37
37
  subtract(p: Point): Point;
38
38
  multiply(p: Point | number): Point;
39
- distance(b: Point): number;
39
+ distance(b: IPoint): number;
40
40
  lerp(p: Point, ratio: number): Point;
41
41
  perpendicularTo(p: Point, length: number): Point;
42
42
  circleWith(a: Point, b: Point): Circle;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@stemy/ngx-utils",
3
- "version": "19.4.7",
3
+ "version": "19.4.10",
4
4
  "license": "MIT",
5
5
  "public": true,
6
6
  "repository": "https://github.com/stemyke/ngx-utils.git",