@jsplumb/util
Advanced tools
Comparing version 5.0.0-RC23 to 5.0.0-RC26
{ | ||
"name": "@jsplumb/util", | ||
"version": "5.0.0-RC23", | ||
"version": "5.0.0-RC26", | ||
"description": "", | ||
@@ -5,0 +5,0 @@ "main": "js/jsplumb.util.cjs.js", |
@@ -11,2 +11,3 @@ /** | ||
* @param p2 | ||
* @public | ||
*/ | ||
@@ -90,2 +91,3 @@ export declare function add(p1: PointXY, p2: PointXY): PointXY; | ||
* @returns True if r1 encloses r2, false otherwise. | ||
* @public | ||
*/ | ||
@@ -99,2 +101,4 @@ export declare function encloses(r1: RectangleXY, r2: RectangleXY, allowSharedEdges?: boolean): boolean; | ||
* instead extend from `OptimisticEventGenerator`, which has a default implementation of `shouldFireEvent` that returns true. | ||
* | ||
* @public | ||
*/ | ||
@@ -114,2 +118,3 @@ export declare abstract class EventGenerator { | ||
* @param originalEvent Optional original event that caused this event to be fired. | ||
* @public | ||
*/ | ||
@@ -119,3 +124,3 @@ fire<T>(event: string, value?: T, originalEvent?: Event): any; | ||
* Drain the queue of pending event notifications | ||
* @private | ||
* @internal | ||
*/ | ||
@@ -128,2 +133,3 @@ private _drain; | ||
* @param listener If `eventOrListener` is defined, this is the event handler to unbind. | ||
* @public | ||
*/ | ||
@@ -134,2 +140,3 @@ unbind(eventOrListener?: string | Function, listener?: Function): EventGenerator; | ||
* @param forEvent | ||
* @public | ||
*/ | ||
@@ -139,2 +146,3 @@ getListener(forEvent: string): Array<any>; | ||
* Returns whether not event firing is currently suspended | ||
* @public | ||
*/ | ||
@@ -144,2 +152,3 @@ isSuspendEvents(): boolean; | ||
* Sets whether not event firing is currently suspended | ||
* @public | ||
*/ | ||
@@ -153,2 +162,3 @@ setSuspendEvents(val: boolean): void; | ||
* @param insertAtStart Whether or not to insert this listener at the head of the listener queue. Defaults to false. | ||
* @public | ||
*/ | ||
@@ -159,2 +169,3 @@ bind<T = any>(event: string | Array<String>, listener: (a: T, e?: any) => any, insertAtStart?: boolean): EventGenerator; | ||
* @param fn | ||
* @public | ||
*/ | ||
@@ -279,2 +290,3 @@ silently(fn: Function): void; | ||
* @returns The gradient of a line between the two points. | ||
* @public | ||
*/ | ||
@@ -306,2 +318,3 @@ export declare function gradient(p1: PointXY, p2: PointXY): number; | ||
* @returns True if the rectangles intersect, false otherwise. | ||
* @public | ||
*/ | ||
@@ -377,2 +390,3 @@ export declare function intersects(r1: RectangleXY, r2: RectangleXY): boolean; | ||
* @returns A point if an intersection found, null otherwise. | ||
* @public | ||
*/ | ||
@@ -386,2 +400,3 @@ export declare function lineIntersection(l1: LineXY, l2: LineXY): PointXY | null; | ||
* @returns The length of a line between the two points. | ||
* @public | ||
*/ | ||
@@ -395,2 +410,3 @@ export declare function lineLength(p1: PointXY, p2: PointXY): number; | ||
* @returns An array of intersection points. If there are no intersection points the array will be empty, but never null. | ||
* @public | ||
*/ | ||
@@ -505,2 +521,3 @@ export declare function lineRectangleIntersection(line: LineXY, r: RectangleXY): Array<PointXY>; | ||
* @returns The gradient of a normal to a line between the two points. | ||
* @public | ||
*/ | ||
@@ -517,2 +534,3 @@ export declare function normal(p1: PointXY, p2: PointXY): number; | ||
* Subclass of EventGenerator with a default implementation of `shouldFireEvent`, which returns true always. | ||
* @public | ||
*/ | ||
@@ -529,2 +547,3 @@ export declare class OptimisticEventGenerator extends EventGenerator { | ||
* @returns Perpendicular line of the required length. | ||
* @public | ||
*/ | ||
@@ -539,2 +558,3 @@ export declare function perpendicularLineTo(fromPoint: PointXY, toPoint: PointXY, length: number): LineXY; | ||
* @returns Point on the line, in the form `{ x:..., y:... }`. | ||
* @public | ||
*/ | ||
@@ -567,2 +587,5 @@ export declare function pointOnLine(fromPoint: PointXY, toPoint: PointXY, distance: number): PointXY; | ||
/** | ||
* @public | ||
*/ | ||
export declare type Quadrant = 1 | 2 | 3 | 4; | ||
@@ -575,2 +598,3 @@ | ||
* @returns The quadrant - 1 for upper right, 2 for lower right, 3 for lower left, 4 for upper left. | ||
* @public | ||
*/ | ||
@@ -669,2 +693,3 @@ export declare function quadrant(p1: PointXY, p2: PointXY): Quadrant; | ||
* @returns The point to which the position was snapped, given the constraints of the grid. | ||
* @public | ||
*/ | ||
@@ -690,2 +715,3 @@ export declare function snapToGrid(pos: PointXY, grid: Grid, thresholdX?: number, thresholdY?: number): PointXY; | ||
* @returns a new Point, with p2 subtracted from p1. | ||
* @public | ||
*/ | ||
@@ -707,2 +733,3 @@ export declare function subtract(p1: PointXY, p2: PointXY): PointXY; | ||
* @returns The angle between the two points. | ||
* @public | ||
*/ | ||
@@ -713,2 +740,3 @@ export declare function theta(p1: PointXY, p2: PointXY): number; | ||
* Definition of 2 PI | ||
* @public | ||
*/ | ||
@@ -715,0 +743,0 @@ export declare const TWO_PI: number; |
105344
3411