@visuallyjs/browser-ui 1.1.1 → 1.1.2
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.
- package/js/visuallyjs.browser-ui.cjs.js +51 -51
- package/js/visuallyjs.browser-ui.esm.js +51 -51
- package/package.json +1 -1
- package/types/core/geom.d.ts +5 -0
- package/types/ui/common/overlay.d.ts +2 -2
- package/types/ui/core/overlay/custom-overlay.d.ts +4 -4
- package/types/ui/core/overlay/label-overlay.d.ts +1 -1
- package/types/ui/core/params.d.ts +1 -1
- package/types/ui/core/view/edge-options.d.ts +2 -2
- package/types/version.d.ts +1 -1
package/package.json
CHANGED
package/types/core/geom.d.ts
CHANGED
|
@@ -277,3 +277,8 @@ export declare const chebyshevDistance: (x1: number, y1: number, x2: number, y2:
|
|
|
277
277
|
* @internal
|
|
278
278
|
*/
|
|
279
279
|
export declare const octileDistance: (x1: number, y1: number, x2: number, y2: number) => number;
|
|
280
|
+
/**
|
|
281
|
+
* Clamps the given angle to lie inside the range 0 - 360
|
|
282
|
+
* @param rangle
|
|
283
|
+
*/
|
|
284
|
+
export declare function clampAngle(angle: number): number;
|
|
@@ -92,9 +92,9 @@ export interface LabelOverlayOptions extends OverlayOptions {
|
|
|
92
92
|
*/
|
|
93
93
|
font?: FontSpec;
|
|
94
94
|
/**
|
|
95
|
-
*
|
|
95
|
+
* Sets whether the label can be rotated to match the gradient of the connector at that location at which it is positioned. If you supply boolean true here, the label will be made rotatable in "legible" mode, in which VisuallyJs ensures that the label is always easy to read, by avoiding rotating the text so that it is upside down or other awkward to read. You can set "strict" mode, which will rotate the label to the appropriate angle regardless of whether or not it will make the label difficult to read.
|
|
96
96
|
*/
|
|
97
|
-
rotatable?: boolean;
|
|
97
|
+
rotatable?: boolean | "legible" | "strict" | null;
|
|
98
98
|
}
|
|
99
99
|
/**
|
|
100
100
|
* An overlay specified by name and options.
|
|
@@ -12,9 +12,9 @@ import { BrowserUI } from "../../../browser-ui";
|
|
|
12
12
|
export interface CustomOverlayOptions<EL> extends OverlayOptions {
|
|
13
13
|
create: (c: Connection<EL>, edge: Edge, instance: BrowserUI, model: VisuallyJsModel) => EL;
|
|
14
14
|
/**
|
|
15
|
-
*
|
|
15
|
+
* Sets whether the overlay can be rotated to match the gradient of the connector at that location at which it is positioned. If you supply boolean true here, the overlay will be made rotatable in "legible" mode, in which VisuallyJs ensures that the overlay is always mostly 'upright, by avoiding rotating it so that it is upside down or other awkward to read. You can set "strict" mode, which will rotate the overlay to the appropriate angle regardless of whether or not it will make any text on it difficult to read.
|
|
16
16
|
*/
|
|
17
|
-
rotatable?: boolean;
|
|
17
|
+
rotatable?: boolean | "strict" | "legible" | null;
|
|
18
18
|
}
|
|
19
19
|
/**
|
|
20
20
|
* A custom overlay allows you to create the element that will be used to represent the overlay.
|
|
@@ -24,7 +24,7 @@ export interface CustomOverlayOptions<EL> extends OverlayOptions {
|
|
|
24
24
|
export interface CustomOverlay<EL> extends Overlay<EL> {
|
|
25
25
|
create: (c: Connection<EL>, edge: Edge, instance: BrowserUI, model: VisuallyJsModel) => EL;
|
|
26
26
|
isSimpleShape: boolean;
|
|
27
|
-
rotatable: boolean;
|
|
27
|
+
rotatable: boolean | "strict" | "legible" | null;
|
|
28
28
|
}
|
|
29
29
|
/**
|
|
30
30
|
* Custom overlay type.
|
|
@@ -42,7 +42,7 @@ export declare class CustomOverlayImpl<EL> extends Overlay<EL> implements Custom
|
|
|
42
42
|
*/
|
|
43
43
|
create: (c: Connection<EL>, edge: Edge, instance: BrowserUI, model: VisuallyJsModel) => EL;
|
|
44
44
|
isSimpleShape: boolean;
|
|
45
|
-
rotatable: boolean;
|
|
45
|
+
rotatable: boolean | "strict" | "legible" | null;
|
|
46
46
|
constructor(instance: UICore<EL>, connection: Connection<EL>, p: CustomOverlayOptions<EL>);
|
|
47
47
|
type: string;
|
|
48
48
|
updateFrom(d: any, context: ObjectData): void;
|
|
@@ -16,7 +16,7 @@ export declare class LabelOverlay<EL> extends Overlay<EL> {
|
|
|
16
16
|
static type: string;
|
|
17
17
|
type: string;
|
|
18
18
|
useHTMLElement: boolean;
|
|
19
|
-
rotatable: boolean;
|
|
19
|
+
rotatable: boolean | string;
|
|
20
20
|
font: FontSpec;
|
|
21
21
|
constructor(instance: UICore<EL>, connection: Connection<EL>, p: LabelOverlayOptions);
|
|
22
22
|
isSimpleShape: boolean;
|
|
@@ -40,7 +40,7 @@ export interface ConnectParams<E> {
|
|
|
40
40
|
/**
|
|
41
41
|
* When true, the label will be rotated so that it is at the same angle as the slope of the connector at the point at which the label is located.
|
|
42
42
|
*/
|
|
43
|
-
labelsRotatable?: boolean;
|
|
43
|
+
labelsRotatable?: boolean | "strict" | "legible" | null;
|
|
44
44
|
/**
|
|
45
45
|
* Spec for the connector used to paint the connection.
|
|
46
46
|
*/
|
|
@@ -80,9 +80,9 @@ export interface EdgeMapping extends BaseViewObjectMapping, LineStyle {
|
|
|
80
80
|
*/
|
|
81
81
|
labelFont?: FontSpec;
|
|
82
82
|
/**
|
|
83
|
-
*
|
|
83
|
+
* Sets whether the label can be rotated to match the gradient of the connector at that location at which it is positioned. If you supply boolean true here, the label will be made rotatable in "legible" mode, in which VisuallyJs ensures that the label is always easy to read, by avoiding rotating the text so that it is upside down or other awkward to read. You can set "strict" mode, which will rotate the label to the appropriate angle regardless of whether or not it will make the label difficult to read.
|
|
84
84
|
*/
|
|
85
|
-
labelsRotatable?: boolean;
|
|
85
|
+
labelsRotatable?: boolean | "strict" | "legible" | null;
|
|
86
86
|
/**
|
|
87
87
|
* Optional width of the edge's outline. Defaults to 0.
|
|
88
88
|
*/
|
package/types/version.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const VERSION = "1.1.
|
|
1
|
+
export declare const VERSION = "1.1.2";
|